query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Shows model stats (asynchronously) Shows the model score and last training time
public okhttp3.Call showModelStatsAsync(String workspaceId, String modelId, final ApiCallback<ModelApiResponse> _callback) throws ApiException { okhttp3.Call localVarCall = showModelStatsValidateBeforeCall(workspaceId, modelId, _callback); Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildModel() {\n double loss_pre = Double.MAX_VALUE;\n for (int iter = 0; iter < maxIter; iter ++) {\n Long start = System.currentTimeMillis();\n if (showProgress)\n System.out.println(\"Iteration \"+(iter+1)+\" started\");\n // Update user latent vectors\n IntStream.range(0,userCount).parallel().peek(i->update_user(i)).forEach(j->{});\n /*\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n */\n if (showProgress) {\n System.out.println(\"Users updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n IntStream.range(0,itemCount).parallel().peek(i->update_item(i)).forEach(j->{});\n // Update item latent vectors\n /*\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n */\n if (showProgress) {\n System.out.println(\"Items updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n // Show loss\n if (showLoss)\n loss_pre = showLoss(iter, start, loss_pre);\n\n\n } // end for iter\n\n }", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "public void getResults() {\n\t\tSystem.out.println(\"|V| : \" + g.getV());\n\t\tSystem.out.println(\"|E| : \" + g.getE());\n\t\tSystem.out.println(\"Max flow : \" + g.getVertex(sink).e);\n\t\tSystem.out.println(\"Run time : \" + (System.currentTimeMillis()-timeStart) + \" ms\"+\"\\n\");\n\t}", "public static void display() { System.err.println(\"Train parameters: smooth=\" + smoothing + \" PA=\" + PA + \" GPA=\" + gPA + \" selSplit=\" + selectiveSplit + \" (\" + selectiveSplitCutOff + (deleteSplitters != null ? \"; deleting \" + deleteSplitters : \"\") + \")\" + \" mUnary=\" + markUnary + \" mUnaryTags=\" + markUnaryTags + \" sPPT=\" + splitPrePreT + \" tagPA=\" + tagPA + \" tagSelSplit=\" + tagSelectiveSplit + \" (\" + tagSelectiveSplitCutOff + \")\" + \" rightRec=\" + rightRec + \" leftRec=\" + leftRec + \" xOverX=\" + xOverX + \" collinsPunc=\" + collinsPunc + \" markov=\" + markovFactor + \" mOrd=\" + markovOrder + \" hSelSplit=\" + hSelSplit + \" (\" + HSEL_CUT + \")\" + \" compactGrammar=\" + compactGrammar() + \" leaveItAll=\" + leaveItAll + \" postPA=\" + postPA + \" postGPA=\" + postGPA + \" selPSplit=\" + selectivePostSplit + \" (\" + selectivePostSplitCutOff + \")\" + \" tagSelPSplit=\" + tagSelectivePostSplit + \" (\" + tagSelectivePostSplitCutOff + \")\" + \" postSplitWithBase=\" + postSplitWithBaseCategory + \" fractionBeforeUnseenCounting=\" + fractionBeforeUnseenCounting + \" openClassTypesThreshold=\" + openClassTypesThreshold); }", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "public void show() {\n\t\t\n\t\tSystem.out.println(\"time (tree setup) = \" + treeSetup + \" ms\");\n\t\tSystem.out.println(\"time (average search) = \" + (totalSearch/(float)countSearch) + \" ms\");\n\t\tSystem.out.println(\"time (average at) = \" + (totalAt/(float)countAt) + \" ms\");\n \t}", "public void run() {\r\n ouputProgressModel.setPogressStarted(true);\r\n try {\r\n for (int i = 0; i <= 100; i += 10) {\r\n // pause the thread\r\n Thread.sleep(PROCCESS_SLEEP_LENGTH);\r\n // update the percent value\r\n ouputProgressModel.setPercentComplete(i);\r\n SessionRenderer.render(\"progressExample\");\r\n }\r\n }\r\n catch (InterruptedException e) { }\r\n ouputProgressModel.setPogressStarted(false);\r\n }", "public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}", "public void reportStats() {\n System.out.println(\"Number of requests: \" + (requestCount - warmUpRequests));\n System.out.println(\"Number of hits: \" + hitCount);\n System.out.println(\"hit ratio: \" + (double) hitCount / (requestCount - warmUpRequests));\n System.out.println(\"Average hit cost: \" + (double) hitCost / hitCount);\n }", "public void displayResults() {\r\n Preferences.debug(\" ******* FitMultiExponential ********* \\n\\n\", Preferences.DEBUG_ALGORITHM);\r\n dumpTestResults();\r\n }", "protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }", "public void stats() {\n\t\tSystem.out.println(\"The score is: \" + score \n\t\t\t\t+ \"\\nNumber of Astronauts rescused: \" + rescuedAstronauts \n\t\t\t\t+ \"\\nNumber of Astronauts roaming: \" + roamingAstronauts\n\t\t\t\t+ \"\\nNumber of Aliens rescued: \" + rescuedAliens\n\t\t\t\t+ \"\\nNumber of Aliens roaming: \" + roamingAliens);\n\t}", "public void computeStats() {\n\t\tstats = new Stats();\t\t\n\t}", "private static void printStats()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords found: \" + keywordHits);\r\n\t\tSystem.out.println(\"Links found: \" + SharedLink.getLinksFound());\r\n\t\tSystem.out.println(\"Pages found: \" + SharedPage.getPagesDownloaded());\r\n\t\tSystem.out.println(\"Failed downloads: \" + SharedPage.getFailedDownloads());\r\n\t\tSystem.out.println(\"Producers: \" + fetchers);\r\n\t\tSystem.out.println(\"Consumers: \" + parsers);\r\n\t}", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public void run() {\n GenerationDetail detail = ga.getDetail();\n generationLabel.setText(String.valueOf(detail.getGeneration()+1));\n averageFitnessLabel.setText(String.valueOf(detail.getAverageFitness()));\n maxFitnessLabel.setText(String.valueOf(detail .getMaxFitness()));\n minFitnessLabel.setText(String.valueOf(detail.getMinFitness()));\n progressBar.setValue(100 * (detail.getGeneration())/ Integer.valueOf(times-1));\n }", "private static void printStats(Stats stats) {\n long elapsedTime = (System.nanoTime() - startTime) / 1000000;\n System.out.println(\"Analysis completed - \" + keyCount + \" keys processed in \" + elapsedTime + \" ms\");\n getConsole().println(\"Analysis completed - \" + keyCount + \" keys processed in \" + elapsedTime + \" ms\");\n stats.print();\n }", "public void statistics(){\n\t\tSystem.out.println(\"heads: \"+ heads+\"\\ttails: \"+tails);\n\t\t\n\t}", "private void statsOutput(long startTime, long endTime ,Stat stat, int taskSize, List<Stat> listStat) {\n\n System.out.println();\n System.out.println(\" !!! END OF REQUEST !!!\");\n System.out.println();\n System.out.println(\"----------------------------------\");\n System.out.println(\" STATISTICS\");\n System.out.println(\"----------------------------------\");\n System.out.println(\"1. Number of threads: \" + taskSize);\n System.out.println(\"2. Total run time: \" + (endTime - startTime));\n System.out.println(\"3. Total request sent: \" + stat.getSentRequestsNum());\n System.out.println(\"4. Total successful request: \" + stat.getSuccessRequestsNum());\n System.out.println(\"5. Mean latency: \" + stat.getMeanLatency());\n System.out.println(\"6. Median latency: \" + stat.getMedianLatency());\n System.out.println(\"7. 95th percentile latency: \" + stat.get95thLatency());\n System.out.println(\"8. 99th percentile latency: \" + stat.get99thLatency());\n\n if(listStat!=null){\n OutputChart outputChart = new OutputChart(listStat);\n outputChart.generateChart(\"Part 1\");\n }\n\n }", "public static void showStatistics(){\n\n }", "public static void displaySta() {\n System.out.println(\"\\n\\n\");\n System.out.println(\"average service time: \" + doAvgProcessingTime() /100 + \" milliseconds\");\n System.out.println(\"max service time: \" + maxProcessingTime /100 + \" milliseconds\");\n System.out.println(\"average turn around time \" + doAvgTurnAroundTime()/100 + \" milliseconds\");\n System.out.println(\"max turn around time \" + maxTurnAroundTime/100 + \" milliseconds\");\n System.out.println(\"average wait time \" + doAvgWaitTime()/10000 + \" milliseconds\");\n System.out.println(\"max wait time \" + maxWaitTime/10000 + \" milliseconds\");\n System.out.println(\"end time \" + endProgramTime);\n System.out.println(\"start time \" + startProgramTime);\n System.out.println(\"processor utilization: \" + doCPU_usage() + \" %\");\n System.out.println(\"Throughput: \" + doThroughPut());\n System.out.println(\"---------------------------\");\n\n\n }", "private final void updateStatistics(){\r\n\t\tstatisticsText_.setLength(0); \t//reset\r\n\t\t\r\n\t\tRegion[][] regions = Map.getInstance().getRegions();\r\n\t\tVehicle[] vehicles;\r\n\t\tVehicle vehicle;\r\n\t\tint i, j, k;\r\n\t\tint activeVehicles = 0;\r\n\t\tint travelledVehicles = 0;\r\n\t\tint wifiVehicles = 0;\r\n\t\tlong messagesCreated = 0;\r\n\t\tlong IDsChanged = 0;\r\n\t\tdouble messageForwardFailed = 0;\r\n\t\tdouble travelDistance = 0;\r\n\t\tdouble travelTime = 0;\r\n\t\tdouble speed = 0;\r\n\t\tdouble knownVehicles = 0;\r\n\t\tfor(i = 0; i < regions.length; ++i){\r\n\t\t\tfor(j = 0; j < regions[i].length; ++j){\r\n\t\t\t\tvehicles = regions[i][j].getVehicleArray();\r\n\t\t\t\tfor(k = 0; k < vehicles.length; ++k){\r\n\t\t\t\t\tvehicle = vehicles[k];\r\n\t\t\t\t\tif(vehicle.getTotalTravelTime() > 0){\r\n\t\t\t\t\t\t++travelledVehicles;\r\n\t\t\t\t\t\ttravelDistance += vehicle.getTotalTravelDistance();\r\n\t\t\t\t\t\ttravelTime += vehicle.getTotalTravelTime();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(vehicle.isActive()){\r\n\t\t\t\t\t\t++activeVehicles;\r\n\t\t\t\t\t\tspeed += vehicle.getCurSpeed();\r\n\t\t\t\t\t\tif(vehicle.isWiFiEnabled()){\r\n\t\t\t\t\t\t\t++wifiVehicles;\r\n\t\t\t\t\t\t\tmessageForwardFailed += vehicle.getKnownMessages().getFailedForwardCount();\r\n\t\t\t\t\t\t\tknownVehicles += vehicle.getKnownVehiclesList().getSize();\r\n\t\t\t\t\t\t\tIDsChanged += vehicle.getIDsChanged();\r\n\t\t\t\t\t\t\tmessagesCreated += vehicle.getMessagesCreated();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.currentTime\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(Renderer.getInstance().getTimePassed()));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.activeVehicles\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(activeVehicles));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageSpeed\")); //$NON-NLS-1$\r\n\t\tif(activeVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(speed/activeVehicles/100000*3600));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" km/h\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageTravelDistance\")); //$NON-NLS-1$\r\n\t\tif(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelDistance/travelledVehicles/100));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" m\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageTravelTime\")); //$NON-NLS-1$\r\n\t\tif(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelTime/travelledVehicles/1000));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" s\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.wifiVehicles\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(wifiVehicles));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageKnownVehicles\")); //$NON-NLS-1$\r\n\t\tif(wifiVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(knownVehicles/wifiVehicles));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.uniqueMessages\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(messagesCreated));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.failedMessages\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(messageForwardFailed));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.totalIDchanges\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(IDsChanged));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tstatisticsTextArea_.setText(statisticsText_.toString());\r\n\t}", "public void run() {\n updateSyncStats();\n\n double d = uploadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveUploads() == 0)\n {\n // Hide KB/s when not active uploads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n uploadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_uploads\"));\n } else {\n String s = Format.formatDecimal(d);\n uploadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_uploads_active\", s));\n }\n d = downloadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveDownloads() == 0)\n {\n // Hide KB/s when no active downloads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n downloadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_downloads\"));\n } else {\n String s = Format.formatDecimal(d);\n downloadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_downloads_active\", s));\n }\n }", "public void printStats() {\n\t\tSystem.out.println(\"============= RULEGROWTH - STATS ========\");\n\t\tSystem.out.println(\"Sequential rules count: \" + ruleCount);\n\t\tSystem.out.println(\"Total time: \" + (timeEnd - timeStart) + \" ms\");\n\t\tSystem.out.println(\"Max memory: \" + MemoryLogger.getInstance().getMaxMemory());\n\t\tSystem.out.println(\"==========================================\");\n\t}", "@Scheduled(fixedRate = 3600_000, initialDelay = 3600_000)\n public static void showAllStatsJob() {\n showStats(allStats, \"All stats\");\n }", "public static void main(String[] args) throws Exception {\n final int numRows = 28;\n final int numColumns = 28;\n int outputNum = 10; // number of output classes\n int batchSize = 128; // batch size for each epoch\n int rngSeed = 123; // random number seed for reproducibility\n int numEpochs = 15; // number of epochs to perform\n String modelPath = \"モデルパスを入力\";\n\n //Get the DataSetIterators:\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\n\n\n System.out.println(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(rngSeed) //include a random seed for reproducibility\n // use stochastic gradient descent as an optimization algorithm\n .updater(new Nesterovs(0.006, 0.9))\n .l2(1e-4)\n .list()\n .layer(new DenseLayer.Builder() //create the first, input layer with xavier initialization\n .nIn(numRows * numColumns)\n .nOut(1000)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .build())\n .layer(new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\n .nIn(1000)\n .nOut(outputNum)\n .activation(Activation.SOFTMAX)\n .weightInit(WeightInit.XAVIER)\n .build())\n .build();\n\n\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n //print the score with every 1 iteration\n UIServer uiServer = UIServer.getInstance();\n InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n model.setListeners(new StatsListener(statsStorage),new ScoreIterationListener(1));\n\n System.out.println(\"Train model....\");\n model.fit(mnistTrain, numEpochs);\n\n\n\n\n System.out.println(\"Evaluate model....\");\n Evaluation eval = model.evaluate(mnistTest);\n System.out.println(eval.stats());\n ModelSerializer.writeModel(model, new File(modelPath), false);\n System.out.println(\"****************Example finished********************\");\n\n }", "public void runAnalysis ()\n\t{\n\t\tif (isBatchFile()) { runBatch(false); return; }\n\n\t\tfinal String modelText = editor.getText();\n\t\tString iterations = toolbar.getIterations();\n\t\tmodel = Model.compile (modelText, frame);\n\t\tif (model == null) return;\n\t\tTask task = model.getTask();\n\t\tfinal int n = (iterations.equals(\"\")) ? task.analysisIterations()\n\t\t\t\t: Integer.valueOf(iterations);\n\t\t(new SwingWorker<Object,Object>() {\n\t\t\tpublic Object doInBackground() {\n\t\t\t\tif (!core.acquireLock(frame)) return null;\n\t\t\t\tstop = false;\n\t\t\t\tupdate();\n\t\t\t\tclearOutput();\n\t\t\t\toutput (\"> (run-analysis \" + n + \")\\n\");\n\t\t\t\tif (model != null && model.getTask() != null) \n\t\t\t\t{\n\t\t\t\t\tTask[] tasks = new Task[n];\n\t\t\t\t\tfor (int i=0 ; !stop && i<n ; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel = Model.compile (modelText, frame);\n\t\t\t\t\t\t//brainPanel.setVisible (false);\n\t\t\t\t\t\tshowTask (model.getTask());\n\t\t\t\t\t\tmodel.setParameter (\":real-time\", \"nil\");\n\t\t\t\t\t\tmodel.run();\n\t\t\t\t\t\tmodel.getTask().finish();\n\t\t\t\t\t\ttasks[i] = model.getTask();\n\t\t\t\t\t}\n\t\t\t\t\tif (!stop && model!=null)\n\t\t\t\t\t\tmodel.getTask().analyze (tasks, true);\n\t\t\t\t\t//model = null;\n\t\t\t\t\thideTask();\n\t\t\t\t}\n\t\t\t\tcore.releaseLock (frame);\n\t\t\t\tupdate();\n\t\t\t\treturn null;\n\t\t\t}\n }).execute();\n\t}", "public void displayStats()\n {\n if(graph == null)\n {\n clearStats();\n }\n else\n { \n pathJTextArea.setText(graph.getPathString(pathList));\n costJTextField.setText(decimal.format(graph.getPathCost(pathList)));\n timeJTextField.setText(String.valueOf(timePassed));\n }\n }", "public void runLastTime(){\n\t\t/*try {\n\t\t\tlong timeDiff = 100;\n\t\t\t\n\t\t\tFeatureListController controller = new FeatureListController(timeDiff);\n\t\t\tTestSensorListener listener1 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener1);\n\t\t\tTestSensorListener listener2 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener2);\n\t\t\t\n\t\t\t\n\t\t\t//20 samples in total\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0;i<2;++i){\n\t\t\t\tSensorListener listener;\n\t\t\t\tif(i==0)\n\t\t\t\t\tlistener = listener1;\n\t\t\t\telse \n\t\t\t\t\tlistener = listener2;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"LISTENER\" + (i+1));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Now:\" + new Date().getTime());\n\t\t\t\tList<FeatureList> featureLists = controller.getLastFeatureListsInMilliseconds(listener, -1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with milliseconds method\");\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with n method\");\n\t\t\t\tList<FeatureList> featureLists2 = controller.getLastNFeatureList(listener, -1);\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last milliseconds \" + 40);\n\t\t\t\tList<FeatureList> featureLists3 = controller.getLastFeatureListsInMilliseconds(listener, 40);\n\t\t\t\tfor(FeatureList l : featureLists3)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last N Feature Lists \" + 6);\n\t\t\t\tList<FeatureList> featureLists4 = controller.getLastNFeatureList(listener, 6);\n\t\t\t\tfor(FeatureList l : featureLists4)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t}\n\t\t\t\n\n\t\t} catch (InterruptedException ex) {\n\t\t\tSystem.out.println(ex.getLocalizedMessage());\n//Logger.getLogger(CaseFeatureListController.class.getName()).log(Level.SEVERE, new double[10], ex);\n\t\t}*/\n\t\t\n\t}", "public void showStatistic() {\n timeline.pause();\n startButton.setText(\"Start\");\n isRunning = false;\n\n //Creates a text input dialog window so that the user can choose the number of iterations.\n textInputDialogStatistics.setHeaderText(\"Show Statistics\");\n textInputDialogStatistics.setContentText(\"Enter statistic length\");\n Optional<String> result =textInputDialogStatistics.showAndWait();\n\n String out = \"\";\n\n //Checks if the input dialog is empty, and else sets the input as \"out\"\n if(result.isPresent() && !textInputDialogStatistics.getResult().isEmpty()){\n out = textInputDialogStatistics.getResult();\n }\n\n if(!out.equals(\"\")){\n try {\n //Tries to load the fxml and sets the statisticsController from that.\n int iterations = Integer.parseInt(out);\n\n progressStage = new Stage();\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/Progress.fxml\"));\n Parent root = loader.load();\n progressController = loader.getController();\n\n //Sets iterations and the GameOfLife object to be considered.\n progressController.setIterations(iterations);\n progressController.setGameOfLife(gOL);\n\n //Opens and waits\n progressStage.setTitle(\"Loading statistics..\");\n progressStage.setScene(new Scene(root, 300, 150));\n progressStage.showAndWait();\n\n } catch (IOException ioe){\n //Shows a warning should the loading of the FXML fail.\n PopUpAlerts.ioAlertFXML();\n }\n }\n }", "public void printStats() {\n\t\tSystem.out.println(\"========== LCMFreq v0.96r18 - STATS ============\");\n\t\tSystem.out.println(\" Freq. itemsets count: \" + frequentCount);\n\t\tSystem.out.println(\" Total time ~: \" + (endTimestamp - startTimestamp)\n\t\t\t\t+ \" ms\");\n\t\tSystem.out.println(\" Max memory:\" + MemoryLogger.getInstance().getMaxMemory());\n\t\tSystem.out.println(\"=====================================\");\n\t}", "void statistics();", "public void display(){\n double avg;\n avg=getAvg();\n System.out.println(\"\\nThe Average of the times is : \"+avg+\" Milliseconds\");\n }", "public void printModelInfo() {\n\t\tDebug.info(\"Jay3dModel\",\n\t\t\t\t\"Obj Name: \\t\\t\" + name + \"\\n\" +\n\t\t\t\t\"V Size: \\t\\t\" + modelVertices.size() + \"\\n\" +\n\t\t\t\t\"Vt Size: \\t\\t\" + textureVertices.size() + \"\\n\" +\n\t\t\t\t\"Vn Size: \\t\\t\" + normalVertices.size() + \"\\n\" +\n\t\t\t\t\"G Size: \\t\\t\" + groups.size() + \"\\n\" +\n\t\t\t\t\"S Size: \\t\\t\" + getSegmentCount() + \"\\n\" + \n\t\t\t\t\"F Size: \\t\\t\" + ((segments.size()>0)?segments.get(0).faces.size():0) + \"\\n\");\n\t}", "private void updateView() {\n model.inlezenHighscore();\n for (int i = 0; i < 10; i++) {\n view.getNaamLabels(i).setText(model.getNaam(i));\n view.getScoreLabels(i).setText(model.getScores(i));\n }\n }", "public void showAVL() {\n\n\t\tSystem.out.println(\"time (tree setup) = \" + treeSetup + \" ms\");\n\t\tSystem.out.println(\"time (average search) = \" + (totalSearch/(float)countSearch) + \" ms\");\n\t\tSystem.out.println(\"time (average at) = \" + (totalAt/(float)countAt) + \" ms\");\n \t}", "public void displayModelDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeightInFeetAndInches());\n System.out.println(\"Weight: \" + getWeight() + \" pounds\");\n String travelMessage = canTravel ? \"yep\" : \"nope\";\n System.out.println(\"Travels: \" + travelMessage);\n String smokeMessage = smokes ? \"yep\" : \"nope\";\n System.out.println(\"Smokes\" + smokeMessage);\n System.out.println(\"Hourly rate: $\" + calculatePayDollarsPerHour());\n }", "public void updateDataModel() {\n //this.dataModel = new TelemetryChartDataModel();\n this.dataModel.\n setModel(getStartDate(), getEndDate(), selectedProjects, telemetryName, parameters);\n Thread thread = new Thread() {\n @Override\n public void run() {\n dataModel.loadData();\n }\n };\n thread.start();\n }", "public static void outputStatistics(StatisticsResults results)\n\t{\n\t\tLogger logger = Log.getLogger();\n\t\t\n\t\tlogger.info(\"Size/number of statements of model: \" + results.getSize() + \"\\n\"\n\t\t\t\t\t+ \"Number of different resources: \" + results.getResources() + \"\\n\"\n\t\t\t\t\t+ \"Number of different subjects: \" + results.getSubjects() + \"\\n\"\n\t\t\t\t\t+ \"Number of different predicates: \" + results.getPredicates() + \"\\n\"\n\t\t\t\t\t+ \"Number of different objects: \" + results.getObjects() + \"\\n\"\n\t\t\t\t\t+ \"Number of different object resources: \" + results.getObjectResources() + \"\\n\"\n\t\t\t\t\t+ \"Number of different literals: \" + results.getLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Total number of object resources: \" + results.getTotalObjectResources() + \"\\n\"\n\t\t\t\t\t+ \"Total number of literals: \" + results.getTotalLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Average number of outgoing links per subject: \" + results.getAvgOutgoingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of outgoing links per subject: \" + results.getMinOutgoingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of outgoing links per subject: \" + results.getMaxOutgoingLinks() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of outgoing links per subject: \" + results.getOutgoingLinks25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of outgoing links per subject: \" + results.getOutgoingLinks50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of outgoing links per subject: \" + results.getOutgoingLinks75() + \"\\n\"\n\t\t\t\t\t+ \"Average number of incoming links per object resource: \" + results.getAvgIncomingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of incoming links per object resource: \" + results.getMinIncomingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of incoming links per object resource: \" + results.getMaxIncomingLinks() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of incoming links per object resrouce: \" + results.getIncomingLinks25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of incoming links per object resource: \" + results.getIncomingLinks50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of incoming links per object resource: \" + results.getIncomingLinks75() + \"\\n\"\n\t\t\t\t\t+ \"Average number of literals per subject: \" + results.getAvgLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of literals per subject: \" + results.getMinLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of literals per subject: \" + results.getMaxLiterals() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of literals per subject: \" + results.getLiterals25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of literals per subject: \" + results.getLiterals50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of literals per subject: \" + results.getLiterals75() + \"\\n\"\n\t\t\t\t\t+ \"Average number of object resources per subject: \" + results.getAvgObjectResources() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of object resources per subject: \" + results.getMinResObjects() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of object resources per subject: \" + results.getMaxResObjects() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of object resources per subject: \" + results.getResObjects25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of object resources per subject: \" + results.getResObjects50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of object resources per subject: \" + results.getResObjects75() + \"\\n\");\n\t}", "public void printStatistics() {\r\n\t\tLog.info(\"*** Statistics of Sequence Selector ***\");\r\n\r\n\t\t// chains\r\n\t\tLog.info(String.format(\"Chains: %d\", chains.size()));\r\n\t\tLog.info(String.format(\"Executable Chains: %d\", execChains.size()));\r\n\t\tLog.info(String.format(\"Causal Executable Chains: %d\",\r\n\t\t\t\tcausalExecChains.size()));\r\n\r\n\t\t// bushes\r\n\t\tLog.info(String.format(\"Bushes: %d\", bushes.size()));\r\n\t\tLog.info(String.format(\"Executable Bushes: %d\", execBushes.size()));\r\n\t\tLog.info(String.format(\"Required Bushes: %d\", requiredExecBushes.size()));\r\n\t\tLog.info(String.format(\"Redundant Bushes: %d\",\r\n\t\t\t\tredundantExecBushes.size()));\r\n\r\n\t\t// total\r\n\t\tLog.info(String.format(\"Bushes in Chains: %d\", bushesInChains.size()));\r\n\t\tLog.info(String.format(\"Total Sequences: %d\", totalSequences.size()));\r\n\r\n\t\t// time\r\n\t\tLog.info(String.format(\"Total Time: %d ms\", stopWatch.getTime()));\r\n\t\tLog.info(String.format(\"Time per Event: %d ms\", stopWatch.getTime()\r\n\t\t\t\t/ events.size()));\r\n\t}", "private void cmdInfoModel() throws NoSystemException {\n MSystem system = system();\n MMVisitor v = new MMPrintVisitor(new PrintWriter(System.out, true));\n system.model().processWithVisitor(v);\n int numObjects = system.state().allObjects().size();\n System.out.println(numObjects + \" object\"\n + ((numObjects == 1) ? \"\" : \"s\") + \" total in current state.\");\n }", "void printStats();", "@Override\r\n\tpublic void showSpeed() {\n\t\tSystem.out.println(\"i can run at 100km/h\");\r\n\t}", "public void recognizeStats() {\n\n if (recognitionStats){\n setUiState(STATE_NOSTATICS);\n recognitionStats = false;\n }else{\n setUiState(STATE_STATICS);\n recognitionStats = true;\n }\n }", "java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();", "public void showMetrics() {\n }", "public void printStatistics() {\n\t// Skriv statistiken samlad så här långt\n stats.print();\n }", "public void printStats() {\n\n System.out.println(\"Number of Users Arrived: \" + numIn);\n System.out.println(\"Number of Users Exited: \" + numOut);\n System.out.println(\"Average Time Spent Waiting for Cab: \" + (totTimeWait / numIn));\n if (numOut != 0) {\n System.out.println(\"Average Time Spent Waiting and Travelling: \" + (totTime / numOut));\n }\n }", "private void updateStatus() {\n String statusString = dataModel.getStatus().toString();\n if (dataModel.getStatus() == DefinitionStatus.MARKER_DEFINITION) {\n statusString += \" Number of markers: \" + dataModel.getNumberOfMarkers() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n if (dataModel.getStatus() == DefinitionStatus.POINTS_DEFINITION) {\n statusString += \" Number of point fields: \" + dataModel.getNumberOfPoints() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n statusLabel.setText(statusString);\n }", "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"==STATISTICS FOR THE RESTAURANT==\");\n\t\tSystem.out.println(\"Most used Ingredients:\");\n\t\tmanager.printIngredients();\n\t\tSystem.out.println(\"Most ordered items:\");\n\t\tmanager.printMenuItems();\n\t\tSystem.out.println(\"==END STATISTICS==\");\n\t}", "public void printStats() {\n\t\tSystem.out.println(\"QuickSort terminates!\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Duration: \" + getDuration() + \" seconds\");\n\t\tSystem.out.println(\"Comparisons: \" + this.comparisonCounter);\n\t\tSystem.out.println(\"Boundary: \" + this.b);\n\t}", "private static void compute_performances(Server server) {\n System.out.println(\"E[N]: Average number of packets in the buffer/queue: \" + round((double) runningBufferSizeCount / totalTicks));\n System.out.println(\"E[T]: Average sojourn time: \" + round((double) server.getTotalPacketDelay() / totalPackets + (double) serviceTime)\n + \"/packet\");\n System.out.println(\"P(idle): The proportion of time the server is idle: \"\n + round((double) server.getIdleServerCount() / totalTicks * 100) + \"%\");\n if (maxBufferSize >= 0) {\n System.out.println(\"P(loss): The packet loss probability: \" + round((double) droppedPacketCount / totalPackets * 100) + \"%\");\n }\n }", "public void step() {\n stats.record();\n updateGraph();\n }", "public void updatePlayerModel() {\n double average = 0.0;\n for (int i = 0; i < playerModelDiff1.size(); i++) {\n average += (double) playerModelDiff1.get(i);\n }\n if ( playerModelDiff1.size() > 0 )\n average = average / playerModelDiff1.size();\n playerModel[0] = average;\n\n //Update playerModel[1] - difficulty 4\n average = 0.0;\n for (int i = 0; i < playerModelDiff4.size(); i++) {\n average += (double) playerModelDiff4.get(i);\n }\n if ( playerModelDiff4.size() > 0 )\n average = average / playerModelDiff4.size();\n playerModel[1] = average;\n\n //Update playerModel[2] - difficulty 7\n average = 0.0;\n for (int i = 0; i < playerModelDiff7.size(); i++) {\n average += (double) playerModelDiff7.get(i);\n }\n if ( playerModelDiff7.size() > 0 )\n average = average / playerModelDiff7.size();\n playerModel[2] = average;\n }", "private void runOnlineModel() {\n myScenario.setProbe(myProbe);\n myScenario.setSynchronizationMode(mySrcSelector);\n try {\n myScenario.resync();\n myScenario.run();\n } catch (SynchronizationException e) {\n System.out.println(e);\n } catch (ModelException e) {\n System.out.println(e);\n }\n }", "@Override\n\n protected Integer doInBackground(Integer... params) {\n Bitmap resized_image = ImageUtils.processBitmap(bitmap, 224);\n\n //Normalize the pixels\n floatValues = ImageUtils.normalizeBitmap(resized_image, 224, 127.5f, 1.0f);\n\n //Pass input into the tensorflow\n tf.feed(INPUT_NAME, floatValues, 1, 224, 224, 3);\n\n //compute predictions\n tf.run(new String[]{OUTPUT_NAME});\n\n //copy the output into the PREDICTIONS array\n tf.fetch(OUTPUT_NAME, PREDICTIONS);\n\n //Obtained highest prediction\n Object[] results = argmax(PREDICTIONS);\n\n\n int class_index = (Integer) results[0];\n float confidence = (Float) results[1];\n\n\n try {\n\n final String conf = String.valueOf(confidence * 100).substring(0, 5);\n\n //Convert predicted class index into actual label name\n final String label = ImageUtils.getLabel(getAssets().open(\"labels.json\"), class_index);\n\n\n //Display result on UI\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n progressBar.dismiss();\n resultView.setText(label + \" : \" + conf + \"%\");\n\n }\n });\n\n } catch (Exception e) {\n\n\n }\n\n\n return 0;\n }", "public void displayResults(ExperimentGameResultViewModel viewModel) {\n mNameIconView.setDescription(viewModel.gameName);\n mTypeIconView.setDescription(viewModel.gameType);\n mActualTimeIconView.setDescription(String.valueOf(viewModel.gameActualTime));\n mEstimatedTimeIconView.setDescription(String.valueOf(viewModel.gameEstimatedTime));\n mWasInterruptedIconView.setDescription(viewModel.wasInterrupted ? getStringByResourceId(R.string.yes) : getStringByResourceId(R.string.no));\n if (viewModel.customJsonInfo != null && !viewModel.customJsonInfo.isEmpty()) {\n mAdditionalInfoIconView.setVisibility(View.VISIBLE);\n mAdditionalInfoIconView.setDescription(viewModel.customJsonInfo);\n } else {\n mAdditionalInfoIconView.setVisibility(View.GONE);\n }\n }", "public void startTrainingMode() {\n\t\t\r\n\t}", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "org.tensorflow.proto.profiler.XStat getStats(int index);", "@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tsummaryPanel.updatePanel();\n\t\t\t\tsummaryPanel.updatePlayerStatus(\"\");\n\t\t\t}", "public void tune() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "@Override\n public void run() {\n descriptionActivity.mReadingScore.setText(\"Reading: \"+ read);\n descriptionActivity.mMathScore.setText(\"Math: \" + math);\n descriptionActivity.mWritingScore.setText(\"Writing: \" + writing);\n }", "public void model() \n\t{\n\t\t\n\t\ttry \n\t\t{\n\t\t GRBEnv env = new GRBEnv();\n\t\t GRBModel model = new GRBModel(env, \"resources/students.lp\");\n\n\t\t model.optimize();\n\n\t\t int optimstatus = model.get(GRB.IntAttr.Status);\n\n\t\t if (optimstatus == GRB.Status.INF_OR_UNBD) {\n\t\t model.getEnv().set(GRB.IntParam.Presolve, 0);\n\t\t model.optimize();\n\t\t optimstatus = model.get(GRB.IntAttr.Status);\n\t\t }\n\n\t\t if (optimstatus == GRB.Status.OPTIMAL) {\n\t\t double objval = model.get(GRB.DoubleAttr.ObjVal);\n\t\t System.out.println(\"Optimal objective: \" + objval);\n\t\t } else if (optimstatus == GRB.Status.INFEASIBLE) {\n\t\t System.out.println(\"Model is infeasible\");\n\n\t\t // Compute and write out IIS\n\t\t model.computeIIS();\n\t\t model.write(\"model.ilp\");\n\t\t } else if (optimstatus == GRB.Status.UNBOUNDED) {\n\t\t System.out.println(\"Model is unbounded\");\n\t\t } else {\n\t\t System.out.println(\"Optimization was stopped with status = \"\n\t\t + optimstatus);\n\t\t }\n\n\t\t // Dispose of model and environment\n\t\t model.write(\"resources/model.sol\");\n\t\t model.dispose();\n\t\t env.dispose();\n\n\t\t } catch (GRBException e) {\n\t\t System.out.println(\"Error code: \" + e.getErrorCode() + \". \" +\n\t\t e.getMessage());\n\t\t }\n\t\t\n\t}", "private static void writeExecutionTime() {\n \t\n \tendMs = System.currentTimeMillis();\n \tlong elapsed = endMs - startMs;\n \tlong hours = elapsed / 3600000;\n long minutes = (elapsed % 3600000) / 60000;\n long seconds = ((elapsed % 3600000) % 60000) / 1000;\n \n try {\n \t\n \tFileSystem fs = FileSystem.get(Mediator.getConfiguration());\n \tPath outputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/time.txt\");\n \tOutputStream os = fs.create(outputPath);\n \tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));\n \t\n \t/**\n \t * Write total execution time\n \t */\n \tbw.write(\"Total execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+(elapsed/1000)+\" seconds)\\n\");\n \t\n \t/**\n \t * Write Mappers execution time avg.\n \t */\n \tPath inputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/\"+Mediator.TIME_STATS_DIR);\n \tFileStatus[] status = fs.listStatus(inputPath);\n \tBufferedReader br = null;\n \tString buffer;\n \tlong sumMappers = 0;\n \tint numMappers = 0;\n \tfor (FileStatus fileStatus:status){\n \t\t// Read Stage 1\n \t\tif (fileStatus.getPath().getName().contains(\"mapper\")){\n \t\t\tnumMappers ++;\n \t\t\tbr=new BufferedReader(new InputStreamReader(fs.open(fileStatus.getPath())));\n \t\t\tbuffer = br.readLine();\n \t\t\tsumMappers += Long.parseLong(buffer.substring(buffer.indexOf(\":\")+1).trim());\n \t\t}\n \t\tbr.close();\n \t}\n \t// Write AVG\n \telapsed = sumMappers / numMappers;\n \thours = elapsed / 3600;\n minutes = (elapsed % 3600) / 60;\n seconds = (elapsed % 3600) % 60;\n bw.write(\"Mappers avg. execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+elapsed+\" seconds)\\n\");\n \t\n \tbw.close();\n \tos.close();\n \t\n \t// Remove time stats directory\n \tfs.delete(inputPath,true);\n \t\n }\n catch(Exception e){\n \tSystem.err.println(\"\\nERROR WRITING EXECUTION TIME\");\n\t\t\te.printStackTrace();\n }\n \t\n }", "@Override\n public void refreshGui() {\n int count = call(\"getCountAndReset\", int.class);\n long nextTime = System.currentTimeMillis();\n long elapsed = nextTime - lastTime; // ms\n double frequency = 1000 * count / elapsed;\n lastTime = nextTime;\n stats.addValue(frequency);\n\n outputLbl.setText(String.format(\"%3.1f Hz\", stats.getGeometricMean()));\n }", "public void display() {\n\t\ttry{\n\t\t\tload();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"error\");\n\t\t}\n\t\tfor (ModelObserver mo : controllers){\n\t\t\tmo.init();\n\t\t}\n\t}", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void updateBest() {\n\t\tbestScoreView.setText(\"Best: \" + bestScore);\n\t}", "public void act()\n {\n trackTime();\n showScore();\n \n }", "public OutputProgressController() {\r\n outputProgressModel = new OutputProgressModel();\r\n SessionRenderer.addCurrentSession(\"progressExample\");\r\n }", "public OutputProgressModel getOutputProgressModel() {\r\n return outputProgressModel;\r\n }", "public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }", "public void infer() {\n runTime.setStartTime(System.currentTimeMillis());\n runTime.setIter(newModel.test_iters);\n System.out.println(\"Sampling \" + newModel.test_iters + \" testing iterations!\");\n\n for (int currentIter = 1; currentIter <= newModel.test_iters; currentIter++) {\n System.out.println(\"Iteration \" + currentIter + \"...\");\n\n for (int d = 0; d < newModel.D; d++) {\n\n for (int n = 0; n < newModel.corpus.docs[d].length; n++){\n HiddenVariable hv = infSZSampling(d, n);\n newModel.sAssign[d][n] = hv.sentiment;\n newModel.zAssign[d][n] = hv.topic;\n }\n } // end for each document\n } // end iterations\n runTime.setEndTime(System.currentTimeMillis());\n System.out.println(\"Gibbs sampling for inference completed!\");\n System.out.println(\"Saving the inference outputs!\");\n\n computeNewPi();\n computeNewTheta();\n computeNewPhi();\n newModel.computePerplexity();\n newModel.evaluateSentiment();\n newModel.saveModel(oldModel.modelName + \"-inference\", runTime);\n newModel.corpus.localDict.writeWordMap(option.model_dir + File.separator + oldModel.modelName + \"-inference\" + Model.wordMapSuffix);\n\n }", "private void updateInfoLabel() {\n\n int achievementTotal = 0;\n int achievementDone = 0;\n\n for (Game game : tableView.getItems()) {\n if (game.isPopulated() && game.getHasStats()) {\n achievementTotal += game.achievementsTotalProperty().get();\n achievementDone += game.achievementsDoneProperty().get();\n }\n }\n\n int percentage = 100;\n if (achievementTotal > 0) {\n percentage = achievementDone * 100 / achievementTotal;\n }\n\n lblInfo.setText(\"Games loaded: \" + tableView.getItems().size() + \", Achievements: \" + achievementTotal + \", Unlocked: \" + achievementDone + \" (\" + percentage + \"%)\");\n\n }", "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "public void utilization() {\r\n\t\tfloat fAktuell = this.aktuelleLast;\r\n\t\tfloat fMax = this.raumsonde.getMaxNutzlast();\r\n\t\tfloat prozent = fAktuell / fMax * 100;\r\n\r\n\t\tSystem.out.println(\" \" + fAktuell + \"/\" + fMax + \" (\" + prozent + \"%)\");\r\n\t}", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\n }", "public String getStatistics() throws IOException{\n initiateWordCount();\n getHamStatistics(); \n getSpamStatistics();\n return printStatistics(); \n }", "@FXML\n final void btnStatisticsClick() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.STATISTICS)).start();\n }", "public static void main(String[] args) throws IOException {\n\t\tMain t = new Main();\n\t\tSystem.out.println(\"The model is trained: \");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"Check validation in example of \\\"AB\\\":\");\n\t\tt.checkValid(\"AB\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= unsmoothed models =============================================================================\");\n\t\tSystem.out.print(\"Unigram: \");\n\t\tSystem.out.println(t.uni);\n\t\tSystem.out.print(\"Bigram: \");\n\t\tSystem.out.println(t.bi);\n\t\tSystem.out.print(\"Trigram: \");\n\t\tSystem.out.println(t.tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= add-one smoothed models ========================================================================\");\n\t\tSystem.out.println(\"Note: this is only one of smoothed models , not the tuning process. Because there would be too many console lines.\");\n\t\tSystem.out.println(\"Here I take add-k = 0.7 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tdouble k = 0.7;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tSystem.out.println(\"Then I take the classic add-k = 1.0 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tk = 1.0;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"===== linear interpolation smoothed models ===================================================================\");\n\t\tdouble[] lambdas_tri = new double[] {1.0 / 3, 1.0 / 3, 1.0 / 3};\n\t\tdouble[] lambdas_bi = new double[] {1.0 / 2, 1.0 / 2};\n\t\tSystem.out.println(\"First is equally weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println(\"**************************************************************************************************************\");\n\t\tlambdas_tri = new double[] {0.5, 0.3, 0.2};\n\t\tlambdas_bi = new double[] {0.7, 0.3};\n\t\tSystem.out.println(\"Then is tuned-weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tSystem.out.println(\"Again, this is not all the tuning process. Here is only one set of lambdas.\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"=================== Generating texts ==========================================================================\");\n\t\tSystem.out.println(\"To save console space, here I generate A to E, five sentences. Feel free to adjust parameters in code.\");\n\t\tSystem.out.println(\"***************************************************************************************************************\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"**************** Bi-gram generating ***************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Not that good huh?\");\n\t\tSystem.out.println(\"**************** Tri-gram generating *************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"...Seems not good as well.\");\n\t}", "@RequestMapping(value = \"stats\", method = RequestMethod.GET)\n\tpublic String statsGet(HttpSession session, ModelMap model){\n\t\t//Checks if user is logged in\n\t\tif(session.getAttribute(\"username\") == null){\n\t\t\tVIEW_INDEX = \"index\";\n\t\t\treturn \"redirect:/\"+VIEW_INDEX;\n\t\t}\n\n\t\tString username = (String)session.getAttribute(\"username\");\n\t\tString date = (String)session.getAttribute(\"date\");\n\n\n\t\tArrayList user = userService.findUser(username);\n\t\tString goal = (String)user.get(1);\n\t\tint id = workoutService.getIdByDate(username, date);\n\t\tArrayList<Stats> stats = statsService.getAveragePerDay(username,id,goal);\n\t\t\n\t\tmodel.addAttribute(\"stats\",stats);\n\n\t\t//If there are no stats to look at then the user is encouraged to workout more\n\t\tif(stats == null){\n\t\t\tmodel.addAttribute(\"display\",\"none\");\n\t\t\tmodel.addAttribute(\"progressHeader\",\"You have to workout more to be able to see your progress\");\n\t\t}\n\t\t//Picture is shown that shows progress as well as average weight for each day\n\t\telse{\n\t\t\tLineChartService lcs = new LineChartService();\n\t\t\tlcs.getLineChart(username, id, goal);\n\t\t\tmodel.addAttribute(\"progressHeader\",\"Average weight per day\");\n\t\t\tmodel.addAttribute(\"username\", username);\n\t\t\tmodel.addAttribute(\"display\",\"inline\");\n\n\t\t}\n\t\tVIEW_INDEX = \"stats\";\t\t\n\t\treturn VIEW_INDEX;\n\t}", "@Override\n public void visualize() {\n if (this.count() > 0){\n for (int i = 0; i < this.count(); i++){\n System.out.println(i + \".- \" + this.bench.get(i).getName() + \" (ID: \" + this.bench.get(i).getId() + \")\");\n }\n } else {\n System.out.println(\"La banca está vacía.\");\n }\n\n }", "private void printScore() {\r\n View.print(score);\r\n }", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "@Tutorial(showSource = true, showSignature = true, showLink = true, linkPrefix = \"src/test/java/\")\n @Override\n public void process(ProcessorContext context)\n {\n samples.add(model.likelihood.parameters.max.getValue() - observation.getValue());\n }", "public void displayResults() {\n\t\tcreateCluster();\n\t\tassignClusterID();\n\t\tSystem.out.println(iterations);\n\t\tWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(\"/Users/saikalyan/Documents/ClusterResult_kmeans.txt\");\n\t\t\tfor (int key : labelsMap.keySet()) {\n\t\t\t\tclusterResultsList.add(clusterIdMap.get(labelsMap.get(key)));\n\t\t\t\twriter.write(String.valueOf(clusterIdMap.get(labelsMap.get(key))));\n\t\t\t\twriter.write(\"\\r\\n\");\n\t\t\t\tSystem.out.println(key + \" : \" + clusterIdMap.get(labelsMap.get(key)));\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tExternalValidator extValidation = new ExternalValidator(count, groundTruthList, clusterResultsList);\n\n\t\tfloat res = extValidation.getCoefficient();\n\t\tSystem.out.println(\"Rand Index------------\" + res);\n\n\t\tfloat jaccard = extValidation.getJaccardCoeff();\n\t\tSystem.out.println(\"Jaccard co-efficient------------\" + jaccard);\n\n\t}", "protected void postRun() {\r\n\t\tthis.calculateFlowBandwidthHops();\r\n\t\tdouble abt = this.ABT();\r\n\t\tdouble agt = this.AGT();\r\n\t\tthis.metrics.add(new ResultMetric(\"ABT\", abt));\r\n\t\tthis.metrics.add(new ResultMetric(\"AGT\", agt));\r\n\t\tthis.metrics.add(new ResultMetric(\"Hops\", this.Hops()));\r\n\t\tthis.metrics.add(new ResultMetric(\"AveHops\", this.Hops()\r\n\t\t\t\t/ this.flows.size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"SuccCount\", this.successfulCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"FailCount\", this.failedCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"ServerNum\", this.dcn\r\n\t\t\t\t.getServerUUIDs().size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"ThroughputPerLink\", abt\r\n\t\t\t\t/ this.dcn.linkCount()));\r\n\t}", "void update_time_avg_stats() {\n double time_since_last_event;\n\n\t\t/* Compute time since last event, and update last-event-time marker. */\n\n time_since_last_event = sim_time - time_last_event;\n time_last_event = sim_time;\n\n\t\t/* Update area under number-in-queue function. */\n\n area_num_in_q += num_in_q * time_since_last_event;\n\n\t\t/* Update area under server-busy indicator function. */\n\n area_server_status += server_status.ordinal() * time_since_last_event;\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void saveStats() {\n this.saveStats(null);\n }", "public void showResults(){\n customerCount = simulation.getCustomerCount();\n phoneCount = simulation.getPhoneCount();\n doorCount = simulation.getDoorCount();\n unhelpedCount = simulation.getUnhelped();\n totalCus.setText(\"Total number of Customers: \"+customerCount+\"\\t\\t\");\n doorCus.setText(\"Number of Door Customers: \"+doorCount+\"\\t\\t\");\n phoneCus.setText(\"Number of Phone Customers: \"+phoneCount+\"\\t\\t\");\n unhelped.setText(\"Number of Customers left unhelped at the end: \"+unhelpedCount);\n }", "public void displayFastestJetInFleet() {\n\t\tfor (Jet jet : hangar.getCurrentJets()) {\n\n\t\t\tSystem.out.println(jet.getModelsOfJets());\n\t\t\tSystem.out.println(jet.getMachSpeed());\n\t\t}\n\t}", "public void dataChanged() {\n // get latest data\n runs = getLatestRuns();\n wickets = getLatestWickets();\n overs = getLatestOvers();\n\n currentScoreDisplay.update(runs, wickets, overs);\n averageScoreDisplay.update(runs, wickets, overs);\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "@Override\n\tprotected void updateOtherProgress() {\n\t\t\n\t\ttempList.clear();\n\t\titeration++;\n\t\tJMetalLogger.logger.info(iteration + \" iteration...\");\n\t\t\n//\t\ttry {\n//\t\t\tnew SolutionListOutput(getPopulation()).printObjectivesToFile(\"results/media/FUN\"+iteration+\".tsv\");\n//\t\t} catch (IOException e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n\t}", "protected void handleRecordedSample() {\n List<Sample> trainingSet;\n try {\n trainingSet = TrainingSet.get();\n Normalizer normalizer = new CenterNormalizer();\n Classifier classifier = new TimeWarperClassifier();\n classifier.train(trainingSet);\n final String outputText = classifier.test(normalizer.normalize(recordedSample));\n lblOutput.setText(outputText);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Utils.textToSpeech(outputText);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n }).start();\n lblOutput.setText(outputText);\n }\n catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void modelShow() {\n\t\tSystem.out.println(\"秀衣服\");\n\t}", "private static void runAll() throws InterruptedException {\r\n\t\tSystem.out.println(RankEvaluator.printTitle() + \"\\tAvgP\\tTrain Time\\tTest Time\");\r\n\t\t\r\n\t\t// Prefetching user/item similarity:\r\n\t\tif (userSimilarityPrefetch) {\r\n\t\t\tuserSimilarity = calculateUserSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tuserSimilarity = new SparseMatrix(userCount+1, userCount+1);\r\n\t\t}\r\n\t\t\r\n\t\tif (itemSimilarityPrefetch) {\r\n\t\t\titemSimilarity = calculateItemSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\titemSimilarity = new SparseMatrix(itemCount+1, itemCount+1);\r\n\t\t}\r\n\t\t\r\n\t\t// Regularized SVD\r\n\t\tint[] svdRank = {1, 5, 10};\r\n\t\t\r\n\t\tfor (int r : svdRank) {\r\n\t\t\tdouble learningRate = 0.005;\r\n\t\t\tdouble regularizer = 0.1;\r\n\t\t\tint maxIter = 100;\r\n\t\t\t\r\n\t\t\tbaseline = new RegularizedSVD(userCount, itemCount, maxValue, minValue,\r\n\t\t\t\tr, learningRate, regularizer, 0, maxIter, false);\r\n\t\t\tSystem.out.println(\"SVD\\tFro\\t\" + r + \"\\t\" + testRecommender(\"SVD\", baseline));\r\n\t\t}\r\n\t\t\r\n\t\t// Rank-based SVD\r\n\t\tint[] rsvdRank = {1, 5, 10};\r\n\t\tfor (int r : rsvdRank) {\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOGISTIC_LOSS, r, 6000, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOG_LOSS_MULT, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOG_LOSS_ADD, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_LOSS_MULT, r, 370, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_LOSS_ADD, r, 25, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.HINGE_LOSS_MULT, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.HINGE_LOSS_ADD, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_REGRESSION, r, 40, true);\r\n\t\t}\r\n\t\t\r\n\t\t// Paired Global LLORMA\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 1, 1500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 5, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 10, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 1, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 5, 2000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 10, 1000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 1, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 5, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 10, 900, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 1, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 5, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 10, 2000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 1, 450, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 5, 250, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 10, 110, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 1, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 5, 400, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 10, 200, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 1, 20, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 5, 13, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 10, 7, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 1, 40, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 5, 25, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 10, 15, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 1, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 5, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 10, 300, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 1, 2000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 5, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 10, 500, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 1, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 5, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 10, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 1, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 5, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 10, 1000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 1, 60, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 5, 40, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 10, 20, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 1, 120, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 5, 80, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 10, 40, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 1, 4500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 5, 3500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 10, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 1, 9000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 5, 7000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 10, 5000, true);\r\n\t}" ]
[ "0.6220485", "0.6031252", "0.5950719", "0.59014153", "0.5887553", "0.5853253", "0.5831252", "0.57610697", "0.5735367", "0.5667291", "0.5658774", "0.56484634", "0.5622159", "0.5575329", "0.5487308", "0.5472844", "0.5464923", "0.5440957", "0.543559", "0.54351586", "0.5402263", "0.5391333", "0.53607607", "0.53340864", "0.53139246", "0.5310586", "0.530319", "0.529105", "0.52782565", "0.527657", "0.52683914", "0.52501726", "0.52328175", "0.52222675", "0.52069", "0.51819175", "0.5181089", "0.51669514", "0.51595557", "0.5158284", "0.51489615", "0.5137072", "0.5132322", "0.5106029", "0.5095138", "0.5094932", "0.50948626", "0.5082172", "0.5072515", "0.5068516", "0.5044152", "0.504125", "0.50358564", "0.50355154", "0.5033124", "0.5027628", "0.50253075", "0.5022316", "0.5019366", "0.5016269", "0.5006838", "0.50063974", "0.50052285", "0.50015897", "0.50005955", "0.499767", "0.4996069", "0.4994004", "0.4991705", "0.49850717", "0.498091", "0.49772725", "0.49749377", "0.49680644", "0.49608365", "0.4960378", "0.49532542", "0.49363935", "0.4933382", "0.49329123", "0.49283326", "0.49267018", "0.4924387", "0.49178565", "0.4914213", "0.4914204", "0.49115008", "0.49071175", "0.49028426", "0.4902357", "0.49001905", "0.48952222", "0.48939615", "0.48865566", "0.48864406", "0.48764065", "0.48626545", "0.48554197", "0.48471895", "0.4838043", "0.4832854" ]
0.0
-1
Build call for trainModel
public okhttp3.Call trainModelCall(String workspaceId, String modelId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/workspaces/{workspaceId}/models/{modelId}/train" .replaceAll("\\{" + "workspaceId" + "\\}", localVarApiClient.escapeString(workspaceId.toString())) .replaceAll("\\{" + "modelId" + "\\}", localVarApiClient.escapeString(modelId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "apiAuth" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "public void train(){\n recoApp.training(idsToTest);\n }", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "private static native boolean train_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj);", "public void buildModel() {\n }", "Build_Model() {\n\n }", "TrainingTest createTrainingTest();", "void setTrainData(DataModel trainData);", "private Response performDT_training(String model_name, String data) {\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MMM-yyyy_HmsS\");\n \tJSONObject summary = new JSONObject();\n \t\n \tif(model_name.trim().length()< 1) {\n \t\tmodel_name = \"DTree_Model_\" + sdf.format(Calendar.getInstance().getTime());\n \t}\n \t\n \t// check if the model name is already present\n \tif(utilObj.isModelNameUnique(model_name)) {\n \t\tsummary = new JSONObject();\n \t\tsummary.put(\"Error\", \"Duplicate model name : \" + model_name);\n \t\tlog.error(\"Duplicate model name\");\n \t\treturn Response.status(200).entity(summary.toString()).build();\n \t}\n \t\n \tlog.info(String.format(\"model_Name: %s\", model_name ));\n \tString modelFilePath = Util.CurrentDir+\"/models/\"+model_name;\n \t\n \ttry {\n\n \t\t// write the data to the disk\n \t\tfinal String inputFileName = \"TrainData_DT_\" + sdf.format(Calendar.getInstance().getTime()) + \".csv\";\n \t\tfinal String inputFilePath = Util.CurrentDir+\"/\"+Util.DataDir+\"/\"+inputFileName;\n \t\tFileWriter writer = new FileWriter(inputFilePath);\n \t\twriter.write(data);\n \t\twriter.flush();\n \t\twriter.close();\n \t\tlog.info(\"File created : \" + inputFilePath);\n \t\t\n \t\tString cmd = String.format(\"Rscript \"+Util.CurrentDir+\"/Rscripts/DTTraining.R %s %s \",inputFilePath, model_name);\n \t\tlog.info(cmd);\n\t \tProcess pr = Runtime.getRuntime().exec(cmd);\n\t\t\t\n\t\t\tBufferedReader results = new BufferedReader(new InputStreamReader(pr.getInputStream()));\n\t\t\tString line = null;\n\t\t\t\n\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\twhile((line=results.readLine()) != null) {\n\t\t\t\tbuf.append(line);\n\t\t\t\tif(line.trim().isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine().trim();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tsummary.put(\"summary\", line);\n\t\t\t\t} \n\t\t\t\telse if(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tJSONArray Psplits = new JSONArray();\t\t\t\t\t\n\t\t\t\t\twhile(!line.trim().equalsIgnoreCase(\"Surrogate splits:\")) {\n\t\t\t\t\t\tString s[] = line.split(\"\\t\");\n\t\t\t\t\t\tfor(String s1 : s) {\n\t\t\t\t\t\t\tSystem.out.println(s1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJSONArray splitCols = new JSONArray(s);\n\t\t\t\t\t\tline = results.readLine();\n\t\t\t\t\t\tbuf.append(line);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tsummary.put(\"model_name\", model_name + \".RData\");\n\t\t\t\tsummary.put(\"InputFile\", inputFileName);\n\t\t\t\tsummary.put(\"CommandName\", \"Rscripts/DTTraining.R\");\n\t\t\t}\n\t\t\tsummary.put(\"raw\", buf.toString());\n\t\t\t\n\t\t\t// format the summary json as params { [key : val] }\n\t\t\tJSONArray finalSummary = new JSONArray();\n\t\t\tIterator<String> keys = summary.keySet().iterator();\n\t\t\twhile(keys.hasNext()) {\n\t\t\t\tJSONObject row = new JSONObject();\n\t\t\t\trow.put(\"attribute\", keys.next());\n\t\t\t\trow.put(\"value\", summary.get(row.getString(\"attribute\")));\n\t\t\t\tfinalSummary.put(row);\n\t\t\t}\n\t\t\treturn Response.status(200).entity(new JSONObject().put(\"summary\", finalSummary).toString()).build();\n\t\t\t\n \t} catch (Exception e) {\n \t\te.printStackTrace();\n \t}\n\t\t\n \treturn Response.status(200).entity(summary.toString()).build();\n }", "public PredictRequest build() {\n\n\t\t\tcheckArgument(!Strings.isNullOrEmpty(url), \"url is required\");\n\t\t\tcheckArgument(!Strings.isNullOrEmpty(service), \"service name is required\");\n\t\t\tcheckArgument(data != null, \"data is required\");\n\n\t\t\tPredictRequest request = new PredictRequest();\n\t\t\trequest.baseURL = url;\n\t\t\tJsonObject requestData = new JsonObject();\n\t\t\trequestData.addProperty(\"service\", service);\n\n\t\t\tJsonObject paramsObj = new JsonObject();\n\t\t\tif (input != null)\n\t\t\t\tparamsObj.add(\"input\", input);\n\t\t\tif (output != null)\n\t\t\t\tparamsObj.add(\"output\", output);\n\t\t\tif (mllibParams != null)\n\t\t\t\tparamsObj.add(\"mllib\", mllibParams);\n\n\t\t\tif (!paramsObj.isJsonNull()) {\n\t\t\t\trequestData.add(\"parameters\", paramsObj);\n\t\t\t}\n\n\t\t\trequestData.add(\"data\", data);\n\n\t\t\trequest.data = requestData;\n\t\t\treturn request;\n\t\t}", "private String train(float[][][] features, float[] label, int epochs){\n org.tensorflow.Tensor x_train = Tensor.create(features);\n Tensor y_train = Tensor.create(label);\n int ctr = 0;\n while (ctr < epochs) {\n sess.runner().feed(\"input\", x_train).feed(\"target\", y_train).addTarget(\"train_op\").run();\n ctr++;\n }\n return \"Model Trained\";\n }", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "public void train ()\t{\t}", "private static native boolean train_auto_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj, int k_fold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);", "public abstract Instances _getTrainingFromParams(String params);", "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "public String execute(String input) {\n Data data = Serializer.parse(input, Data.class);\n\n // Step #2: Check the discriminator\n final String discriminator = data.getDiscriminator();\n if (discriminator.equals(Discriminators.Uri.ERROR)) {\n // Return the input unchanged.\n return input;\n }\n\n // Create a series of pipes to process the training files\n ArrayList<Pipe> pipeList = new ArrayList<>();\n pipeList.add(new Input2CharSequence(\"UTF-8\"));\n // Pipes: lowercase, tokenize, remove stopwords, map to features\n pipeList.add( new CharSequenceLowercase() );\n pipeList.add( new CharSequence2TokenSequence(Pattern.compile(\"\\\\p{L}[\\\\p{L}\\\\p{P}]+\\\\p{L}\")) );\n pipeList.add( new TokenSequenceRemoveStopwords());\n pipeList.add( new TokenSequence2FeatureSequence());\n pipe = new SerialPipes(pipeList);\n\n // put the directory of files used for training through the pipes\n String directory = data.getParameter(\"directory\").toString();\n InstanceList instances = readDirectory(new File(directory));\n\n // create a topic to be trained\n int numberOfTopics = (Integer) data.getParameter(\"numTopics\");\n ParallelTopicModel topicModel = new ParallelTopicModel(numberOfTopics);\n topicModel.addInstances(instances);\n\n // train the model\n try {\n topicModel.estimate();\n } catch (IOException e){\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to train the model\").asJson();\n }\n\n // write topic keys file\n String path = data.getParameter(\"path\").toString();\n String keysName = data.getParameter(\"keysName\").toString();\n int wordsPerTopic = (Integer) data.getParameter(\"wordsPerTopic\");\n try {\n topicModel.printTopWords(new File(path + \"/\" + keysName), wordsPerTopic, false);\n } catch (IOException e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the topic keys to \" + path + \"/\" + keysName).asJson();\n }\n\n // write the .inferencer file\n String inferencerName = data.getParameter(\"inferencerName\").toString();\n try {\n ObjectOutputStream oos =\n new ObjectOutputStream (new FileOutputStream (path + \"/\" + inferencerName));\n oos.writeObject (topicModel.getInferencer());\n oos.close();\n } catch (Exception e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the inferencer to \" + path + \"/\" + inferencerName).asJson();\n }\n\n // Success\n return new Data<>(Discriminators.Uri.TEXT, \"Success\").asJson();\n }", "public void buildAllPossibleTrain() {\n while (depotOnThisLine.checkOnPossibilityCreatingTrain()) {\n try {\n trains.add(Factory.buildNewTrain(depotOnThisLine));\n } catch (DepotNotExistException e) {\n e.printStackTrace();\n }\n }\n }", "public void startTrainingMode() {\n\t\t\r\n\t}", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "public void train() throws Exception;", "public void buildModel(){\r\n\t\t\r\n\t\tsuper.buildModel();\r\n\t\t\r\n\t}", "private void buildAndRunNetwork() throws IOException {\n final int numRows = 28;\r\n final int numColumns = 28;\r\n int outputNum = 10; // number of output classes\r\n int batchSize = 128; // batch size for each epoch\r\n int rngSeed = 123; // random number seed for reproducibility\r\n int numEpochs = 15; // number of epochs to perform\r\n double rate = 0.0015; // learning rate\r\n\r\n //Get the DataSetIterators:\r\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\r\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\r\n\r\n\r\n log.info(\"Build model....\");\r\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\r\n .seed(rngSeed) //include a random seed for reproducibility\r\n .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) // use stochastic gradient descent as an optimization algorithm\r\n .iterations(1)\r\n .activation(Activation.RELU)\r\n .weightInit(WeightInit.XAVIER)\r\n .learningRate(rate) //specify the learning rate\r\n .updater(Updater.NESTEROVS).momentum(0.98) //specify the rate of change of the learning rate.\r\n .regularization(true).l2(rate * 0.005) // regularize learning model\r\n .list()\r\n .layer(0, new DenseLayer.Builder() //create the first input layer.\r\n .nIn(numRows * numColumns)\r\n .nOut(500)\r\n .build())\r\n .layer(1, new DenseLayer.Builder() //create the second input layer\r\n .nIn(500)\r\n .nOut(100)\r\n .build())\r\n .layer(2, new OutputLayer.Builder(LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\r\n .activation(Activation.SOFTMAX)\r\n .nIn(100)\r\n .nOut(outputNum)\r\n .build())\r\n .pretrain(false).backprop(true) //use backpropagation to adjust weights\r\n .build();\r\n\r\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\r\n model.init();\r\n \r\n model.setListeners(new ScoreIterationListener(5)); //print the score with every iteration\r\n\r\n log.info(\"Train model....\");\r\n for( int i=0; i<numEpochs; i++ ){\r\n \tlog.info(\"Epoch \" + i);\r\n model.fit(mnistTrain);\r\n }\r\n\r\n\r\n log.info(\"Evaluate model....\");\r\n Evaluation eval = new Evaluation(outputNum); //create an evaluation object with 10 possible classes\r\n while(mnistTest.hasNext()){\r\n DataSet next = mnistTest.next();\r\n INDArray output = model.output(next.getFeatureMatrix()); //get the networks prediction\r\n eval.eval(next.getLabels(), output); //check the prediction against the true class\r\n }\r\n\r\n log.info(eval.stats());\r\n log.info(\"****************Example finished********************\");\r\n\t}", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifierObject = ObjectClassifier.create(context.getAssets(), TYPE_MODEL, LABEL_TYPE, INPUT_SIZE_TYPE);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "public IObserver train(IContext context) throws ThinklabException;", "public Train(){\n}", "public void initializeModelAndSettings(String modelName, IDataAccessObject dataAccessObject, String[] trainingSettings) throws TotalADSDBMSException, TotalADSGeneralException;", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call adminTrainModelAsyncValidateBeforeCall(String token, String applicationId, String modelModule, String documentsTag, String modelName, String shortName, String description, Integer ttl, List<String> allowedApplicationIds, Boolean allowAllApplications, List<String> tags, String executeAfterId, String callbackUrl, Object modelParams, TrainBody trainBody, final ApiCallback _callback) throws ApiException {\n if (token == null) {\n throw new ApiException(\"Missing the required parameter 'token' when calling adminTrainModelAsync(Async)\");\n }\n \n // verify the required parameter 'applicationId' is set\n if (applicationId == null) {\n throw new ApiException(\"Missing the required parameter 'applicationId' when calling adminTrainModelAsync(Async)\");\n }\n \n // verify the required parameter 'modelModule' is set\n if (modelModule == null) {\n throw new ApiException(\"Missing the required parameter 'modelModule' when calling adminTrainModelAsync(Async)\");\n }\n \n // verify the required parameter 'documentsTag' is set\n if (documentsTag == null) {\n throw new ApiException(\"Missing the required parameter 'documentsTag' when calling adminTrainModelAsync(Async)\");\n }\n \n\n okhttp3.Call localVarCall = adminTrainModelAsyncCall(token, applicationId, modelModule, documentsTag, modelName, shortName, description, ttl, allowedApplicationIds, allowAllApplications, tags, executeAfterId, callbackUrl, modelParams, trainBody, _callback);\n return localVarCall;\n\n }", "DataGenModel()\n {\n }", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "public abstract void build(ClassifierData<U> inputData);", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_FILE,\n LABEL_FILE,\n INPUT_SIZE,\n IMAGE_MEAN,\n IMAGE_STD,\n INPUT_NAME,\n OUTPUT_NAME);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public static void main(String[] args) throws Exception {\n final int numRows = 28;\n final int numColumns = 28;\n int outputNum = 10; // number of output classes\n int batchSize = 128; // batch size for each epoch\n int rngSeed = 123; // random number seed for reproducibility\n int numEpochs = 15; // number of epochs to perform\n String modelPath = \"モデルパスを入力\";\n\n //Get the DataSetIterators:\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\n\n\n System.out.println(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(rngSeed) //include a random seed for reproducibility\n // use stochastic gradient descent as an optimization algorithm\n .updater(new Nesterovs(0.006, 0.9))\n .l2(1e-4)\n .list()\n .layer(new DenseLayer.Builder() //create the first, input layer with xavier initialization\n .nIn(numRows * numColumns)\n .nOut(1000)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .build())\n .layer(new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\n .nIn(1000)\n .nOut(outputNum)\n .activation(Activation.SOFTMAX)\n .weightInit(WeightInit.XAVIER)\n .build())\n .build();\n\n\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n //print the score with every 1 iteration\n UIServer uiServer = UIServer.getInstance();\n InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n model.setListeners(new StatsListener(statsStorage),new ScoreIterationListener(1));\n\n System.out.println(\"Train model....\");\n model.fit(mnistTrain, numEpochs);\n\n\n\n\n System.out.println(\"Evaluate model....\");\n Evaluation eval = model.evaluate(mnistTest);\n System.out.println(eval.stats());\n ModelSerializer.writeModel(model, new File(modelPath), false);\n System.out.println(\"****************Example finished********************\");\n\n }", "public void build() throws ClusException, IOException {\n m_List = getRun().getDataSet(ClusRun.TRAINSET).getData(); // m_Data;\n }", "private void train(NeuralDataSet input) {\n\n\tfinal NeuralDataSet theInput = input;\n\tfinal VirtualLibraryButler that = this;\n\n\ttraining = new Thread() {\n\t public void run() {\n\n\t\torg.encog.util.logging.Logging.setConsoleLevel(Level.OFF);\n\n\t\tfinal Train train = new CompetitiveTraining(brain, 0.7,\n\t\t\ttheInput, new NeighborhoodGaussian(\n\t\t\t\tnew GaussianFunction(0.0, 5.0, 1.5)));\n\t\tStrategy smartLearn = new SmartLearningRate();\n\n\t\tsmartLearn.init(train);\n\t\ttrain.addStrategy(smartLearn);\n\n\t\tint epoch = 0;\n\t\tint errorSize = 250;\n\n\t\tdouble[] lastErrors = new double[errorSize];\n\n\t\t// training loop\n\t\tdo {\n\t\t train.iteration();\n\t\t // System.out.println(\"Epoch #\" + epoch + \" Error:\" +\n\t\t // train.getError()); // + \" MovingAvg:\" + movingAvg);\n\t\t lastErrors[epoch % errorSize] = train.getError();\n\n\t\t double avg = 0;\n\t\t for (int i = 0; (i < epoch) && (i < errorSize); ++i)\n\t\t\tavg = (avg * i + lastErrors[i]) / (i + 1);\n\n\t\t if (Math.abs(avg - train.getError()) < 0.01)\n\t\t\ttrain.setError(0.001);\n\n\t\t epoch++;\n\t\t} while (train.getError() > 0.01);\n\n\t\t// System.out.println(\"training complete.\");\n\n\t\tthat.initialized = true;\n\t }\n\t};\n\n\ttraining.start();\n }", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_PATH,\n LABEL_PATH,\n INPUT_SIZE,\n QUANT);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public void buildModel() {\n double loss_pre = Double.MAX_VALUE;\n for (int iter = 0; iter < maxIter; iter ++) {\n Long start = System.currentTimeMillis();\n if (showProgress)\n System.out.println(\"Iteration \"+(iter+1)+\" started\");\n // Update user latent vectors\n IntStream.range(0,userCount).parallel().peek(i->update_user(i)).forEach(j->{});\n /*\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n */\n if (showProgress) {\n System.out.println(\"Users updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n IntStream.range(0,itemCount).parallel().peek(i->update_item(i)).forEach(j->{});\n // Update item latent vectors\n /*\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n */\n if (showProgress) {\n System.out.println(\"Items updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n // Show loss\n if (showLoss)\n loss_pre = showLoss(iter, start, loss_pre);\n\n\n } // end for iter\n\n }", "public void launch(DataModel model) {\n //this template simple creates a UndirectedKNNAlgorithm and executes it,\n //replace as needed.\n// UndirectedKNNAlgorithm algorithm = new UndirectedKNNAlgorithm();\n// algorithm.execute();\n \n UndirectedKNNAlgorithm algorithm = new UndirectedKNNAlgorithm(model);\n algorithm.createGUIandRun(UndirectedKNNAlgorithm.ALGORITHM_NAME, \"\"); \n }", "@Test\n public void testTrain() {\n System.out.println(\"train\");\n TokenizedLine tokenizedLine = null;\n ArrayList<Words> expResult = null;\n ArrayList<Words> result = Training.train(tokenizedLine);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void train(int n_epochs) {\n TrainModel train_model = null;\n\n int lenW = vocabulary.length;\n int W = 3 * lenW + 3;\n\n // randomly initialize U_Ot, values are randomly selected between -0.1 to 0.1;\n double[][] U_Ot = new double[D][W];\n\n // randomly initialize U_R, values are randomly selected between -0.1 and 0.1\n double[][] U_R = new double[D][W];\n\n double prev_err = 0D;\n for (int epoch = 0; epoch < n_epochs; epoch++) {\n double total_error = 0D;\n int n_wrong = 0;\n\n for (int i = 0; i < train_lines.size(); i++) {\n Instance line = train_lines.get(i);\n if (\"q\".equals(line.type)) { // indicates question\n List<Integer> refs = line.refs; // Indexing from 1\n List<Integer> f = refs.stream()\n .map(ref -> ref-1)\n .collect(Collectors.toList()); // Indexing from 0\n int id = line.ID - 1; // Indexing from 0\n\n // all indices from\n List<Integer> indices = range(i-id, i+1);\n List<double[]> memory_list = indices.stream()\n .map(idx -> L_train[idx])\n .collect(Collectors.toList());\n\n\n if (train_model == null) {\n train_model = new TrainModel(lenW, f.size());\n }\n\n List<Integer> m = f;\n // TODO\n List<Integer> mm = new ArrayList<>(); //TODO\n for (int j = 0; j < f.size(); j++) {\n mm.add(O_t(\n newM,\n memory_list\n ));\n }\n\n double err = train_model(H.get(\"answer\"),\n gamma, memory_list, V, id, ???)[0];\n total_error += err;\n System.out.println(\"epoch: \" + epoch + \"\\terr: \" + (total_error / train_lines.size()));\n }\n }\n }\n }", "public TargetGeneratorModel()\n {\n }", "private void readModelAndTrain(boolean readExistingModel,\n\t\t\tbyte[] trainingDataFile) {\n\t\tInputStream dataIn = null;\n\t\ttry {\n\t\t\tObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(\n\t\t\t\t\tnew PlainTextByLineStream(new FileInputStream(\n\t\t\t\t\t\t\tcreateModelInput(INPUT_TWEETS_ORIG_TXT)), \"UTF-8\"));\n\t\t\tsetModel(DocumentCategorizerME.train(\"en\", sampleStream,\n\t\t\t\t\tCUTOFF_FREQ, TRAINING_ITERATIONS));\n\t\t\tserialize(model);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (dataIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "private void setupModel() {\n\n //Chooses which model gets prepared\n switch (id) {\n case 2:\n singlePackage = new Node();\n activeNode = singlePackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_solo)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 3:\n multiPackage = new Node();\n activeNode = multiPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_multi_new)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 4:\n wagonPackage = new Node();\n activeNode = wagonPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_car_new)\n .build().thenAccept(a -> activeRenderable = a)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n default:\n mailbox = new Node();\n activeNode = mailbox;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.mailbox)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n }\n }", "public void trainModel(String input) {\n\n String[] words = input.split(\" \");\n String currentWord = \"\";\n\n for (int i = 0; i < words.length; i++) {\n\n if (i == 0 || words[i-1].contains(\".\")) {\n model.get(\"_begin\").add(words[i]);\n } else if (i == words.length - 1 || words[i].contains(\".\")) {\n model.get(\"_end\").add(words[i]);\n } else {\n model.putIfAbsent(currentWord, new ArrayList<String>());\n model.get(currentWord).add(words[i]);\n }\n\n currentWord = words[i];\n\n }\n }", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tMain t = new Main();\n\t\tSystem.out.println(\"The model is trained: \");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"Check validation in example of \\\"AB\\\":\");\n\t\tt.checkValid(\"AB\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= unsmoothed models =============================================================================\");\n\t\tSystem.out.print(\"Unigram: \");\n\t\tSystem.out.println(t.uni);\n\t\tSystem.out.print(\"Bigram: \");\n\t\tSystem.out.println(t.bi);\n\t\tSystem.out.print(\"Trigram: \");\n\t\tSystem.out.println(t.tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= add-one smoothed models ========================================================================\");\n\t\tSystem.out.println(\"Note: this is only one of smoothed models , not the tuning process. Because there would be too many console lines.\");\n\t\tSystem.out.println(\"Here I take add-k = 0.7 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tdouble k = 0.7;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tSystem.out.println(\"Then I take the classic add-k = 1.0 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tk = 1.0;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"===== linear interpolation smoothed models ===================================================================\");\n\t\tdouble[] lambdas_tri = new double[] {1.0 / 3, 1.0 / 3, 1.0 / 3};\n\t\tdouble[] lambdas_bi = new double[] {1.0 / 2, 1.0 / 2};\n\t\tSystem.out.println(\"First is equally weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println(\"**************************************************************************************************************\");\n\t\tlambdas_tri = new double[] {0.5, 0.3, 0.2};\n\t\tlambdas_bi = new double[] {0.7, 0.3};\n\t\tSystem.out.println(\"Then is tuned-weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tSystem.out.println(\"Again, this is not all the tuning process. Here is only one set of lambdas.\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"=================== Generating texts ==========================================================================\");\n\t\tSystem.out.println(\"To save console space, here I generate A to E, five sentences. Feel free to adjust parameters in code.\");\n\t\tSystem.out.println(\"***************************************************************************************************************\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"**************** Bi-gram generating ***************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Not that good huh?\");\n\t\tSystem.out.println(\"**************** Tri-gram generating *************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"...Seems not good as well.\");\n\t}", "public DriveTrain() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n leftFrontTalon = new WPI_TalonSRX(11);\n leftRearTalon = new WPI_TalonSRX(12);\n rightFrontTalon = new WPI_TalonSRX(13);\n rightRearTalon = new WPI_TalonSRX(14);\n victorTestController = new WPI_VictorSPX(4);\n robotDrive41 = new RobotDrive(leftRearTalon, leftFrontTalon,rightFrontTalon, rightRearTalon);\n \n robotDrive41.setSafetyEnabled(false);\n robotDrive41.setExpiration(0.1);\n robotDrive41.setSensitivity(0.5);\n robotDrive41.setMaxOutput(1.0);\n\n \n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "public Object run(ModelFactory factory);", "public boolean train(Mat trainData, Mat responses)\r\n {\r\n\r\n boolean retVal = train_1(nativeObj, trainData.nativeObj, responses.nativeObj);\r\n\r\n return retVal;\r\n }", "private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}", "public ModelService(ModelService source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Cluster != null) {\n this.Cluster = new String(source.Cluster);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Runtime != null) {\n this.Runtime = new String(source.Runtime);\n }\n if (source.ModelUri != null) {\n this.ModelUri = new String(source.ModelUri);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.GpuMemory != null) {\n this.GpuMemory = new Long(source.GpuMemory);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.UpdateTime != null) {\n this.UpdateTime = new String(source.UpdateTime);\n }\n if (source.ScaleMode != null) {\n this.ScaleMode = new String(source.ScaleMode);\n }\n if (source.Scaler != null) {\n this.Scaler = new Scaler(source.Scaler);\n }\n if (source.Status != null) {\n this.Status = new ServiceStatus(source.Status);\n }\n if (source.AccessToken != null) {\n this.AccessToken = new String(source.AccessToken);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.ConfigName != null) {\n this.ConfigName = new String(source.ConfigName);\n }\n if (source.ServeSeconds != null) {\n this.ServeSeconds = new Long(source.ServeSeconds);\n }\n if (source.ConfigVersion != null) {\n this.ConfigVersion = new String(source.ConfigVersion);\n }\n if (source.ResourceGroupId != null) {\n this.ResourceGroupId = new String(source.ResourceGroupId);\n }\n if (source.Exposes != null) {\n this.Exposes = new ExposeInfo[source.Exposes.length];\n for (int i = 0; i < source.Exposes.length; i++) {\n this.Exposes[i] = new ExposeInfo(source.Exposes[i]);\n }\n }\n if (source.Region != null) {\n this.Region = new String(source.Region);\n }\n if (source.ResourceGroupName != null) {\n this.ResourceGroupName = new String(source.ResourceGroupName);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.GpuType != null) {\n this.GpuType = new String(source.GpuType);\n }\n if (source.LogTopicId != null) {\n this.LogTopicId = new String(source.LogTopicId);\n }\n }", "public void actionTrain(Train t) {\n\t\t\t t.setVitesseScalaire(vitesse);\n\t\t}", "public void run() {\n\t // Create the ouput directories\n\t interfDir = new File(outDirName+\"/\"+modelName);\n\t interfDir.mkdirs();\n\t implDir = new File(outDirName+\"/\"+modelName);\n\t implDir.mkdirs();\n\t // Create the parseAll visitor interface\n\t createParseAllVisitorInterface(interfDir);\n\t // Create the parseAll visitor implementation\n\t createParseAllVisitorImplementation(implDir);\n\t // Create the evaluateAll visitor interface\n\t createEvaluateAllVisitorInterface(interfDir);\n\t // Create the evaluateAll visitor implementation\n\t createEvaluateAllVisitorImplementation(implDir);\n\t}", "public void trainModel(List<BugReport> brs){\r\n\t\t\r\n\t\tdouble startTime = System.currentTimeMillis();\r\n\t\tthis.initializeModel(brs);\r\n\t\tthis.inferenceModel(brs);\r\n\t\tdouble endTime = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"LDA training time cost: \"+(endTime-startTime)/1000.0);\r\n\t\t\r\n\t}", "public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "abstract void train(Matrix features, Matrix labels);", "CrawlController build(CrawlParameters parameters) throws Exception;", "public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }", "private void initializeAndTrainModel(float alpha) {\n\n double forecast;\n double lastValue = actual[0];\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n\n for (int i = 1; i < trainPoints; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n lastValue = (alpha * actual[i]) + ((1 - alpha) * lastValue);\n }\n\n for (int t = 1; t <= validationPoints; t++) {\n valMatrix[t - 1][1] = lastValue;\n valMatrix[t - 1][0] = actual[trainPoints + t - 1];\n }\n\n\n double biasness = BiasnessHandler.handle(valMatrix);\n AccuracyIndicators AI = new AccuracyIndicators();\n ModelUtil.computeAccuracyIndicators(AI, trainMatrix, valMatrix, dof);\n AI.setBias(biasness);\n if (min_val_error >= AI.getMAPE()) {\n min_val_error = AI.getMAPE();\n optAlpha = alpha;\n accuracyIndicators = AI;\n }\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call trainModelValidateBeforeCall(String workspaceId, String modelId, final ApiCallback _callback) throws ApiException {\n if (workspaceId == null) {\n throw new ApiException(\"Missing the required parameter 'workspaceId' when calling trainModel(Async)\");\n }\n \n // verify the required parameter 'modelId' is set\n if (modelId == null) {\n throw new ApiException(\"Missing the required parameter 'modelId' when calling trainModel(Async)\");\n }\n \n\n okhttp3.Call localVarCall = trainModelCall(workspaceId, modelId, _callback);\n return localVarCall;\n\n }", "public void initModel(LDAModel model, Corpus corpus);", "public boolean train(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n boolean retVal = train_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj);\r\n\r\n return retVal;\r\n }", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "public MM_DriveTrain(LinearOpMode opMode){\n this.opMode = opMode;\n flMotor = opMode.hardwareMap.get(DcMotor.class, \"flMotor\");\n frMotor = opMode.hardwareMap.get(DcMotor.class, \"frMotor\");\n blMotor = opMode.hardwareMap.get(DcMotor.class, \"blMotor\");\n brMotor = opMode.hardwareMap.get(DcMotor.class, \"brMotor\");\n\n flMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n frMotor.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n blMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n brMotor.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n setMotorPowerSame(0);\n\n initializeGyro();\n initHardware();\n }", "@Test\n public void trainWithMasterSplinterTest() {\n\n }", "public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }", "FlowRule build();", "public void drivetrainInitialization()\n\t{\n\t\tleftSRX.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, Constants.kTimeoutMs);\n\t\tleftSRX.setSensorPhase(true);\n\t\tleftSRX.configNominalOutputForward(0, Constants.kTimeoutMs);\n\t\tleftSRX.configNominalOutputReverse(0, Constants.kTimeoutMs);\n\t\tleftSRX.configPeakOutputForward(1, Constants.kTimeoutMs);\n\t\tleftSRX.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n\n\t\t// // Config left side PID Values\n\t\t// leftSRX.selectProfileSlot(Constants.drivePIDIdx, 0);\n\t\t// leftSRX.config_kF(Constants.drivePIDIdx, Constants.lDrivekF, Constants.kTimeoutMs);\n\t\t// leftSRX.config_kP(Constants.drivePIDIdx, Constants.lDrivekP, Constants.kTimeoutMs);\n\t\t// leftSRX.config_kI(Constants.drivePIDIdx, Constants.lDrivekI, Constants.kTimeoutMs);\n\t\t// leftSRX.config_kD(Constants.drivePIDIdx, Constants.lDrivekD, Constants.kTimeoutMs);\n\n\t\t// Config right side PID settings\n\t\trightSRX.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, Constants.drivePIDIdx, Constants.kTimeoutMs);\n\t\trightSRX.setSensorPhase(true);\n\t\trightSRX.configNominalOutputForward(0, Constants.kTimeoutMs);\n\t\trightSRX.configNominalOutputReverse(0, Constants.kTimeoutMs);\n\t\trightSRX.configPeakOutputForward(1, Constants.kTimeoutMs);\n\t\trightSRX.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n\n\t\t// // Config right side PID Values\n\t\t// rightSRX.selectProfileSlot(Constants.drivePIDIdx, 0);\n\t\t// rightSRX.config_kF(Constants.drivePIDIdx, Constants.rDrivekF, Constants.kTimeoutMs);\n\t\t// rightSRX.config_kP(Constants.drivePIDIdx, Constants.rDrivekP, Constants.kTimeoutMs);\n\t\t// rightSRX.config_kI(Constants.drivePIDIdx, Constants.rDrivekI, Constants.kTimeoutMs);\n\t\t// rightSRX.config_kD(Constants.drivePIDIdx, Constants.rDrivekD, Constants.kTimeoutMs);\n\n\t\t// Set up followers\n\t\tleftSPX1.follow(leftSRX);\n\t\tleftSPX2.follow(leftSRX);\n\n\t\trightSPX1.follow(rightSRX);\n\t\trightSPX2.follow(rightSRX);\n\t\t\n\t\trightSRX.setInverted(true);\n\t\trightSPX1.setInverted(true);\n\t\trightSPX2.setInverted(true);\n }", "List<Training> obtainAllTrainings();", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "private void onTrainActionSelected() {\n\t\tArrayList<Myo> connectedDevices = Hub.getInstance()\n\t\t\t\t.getConnectedDevices();\n\t\tif (connectedDevices.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the Myo to train. In this case, we will train the first Myo in\n\t\t// the Hub's\n\t\t// connected devices list.\n\t\tMyo myo = connectedDevices.get(0);\n\n\t\t// Launch the TrainActivity for the specified Myo.\n\t\tIntent intent = new Intent(this, TrainActivity.class);\n\t\tintent.putExtra(TrainActivity.EXTRA_ADDRESS, myo.getMacAddress());\n\t\tstartActivity(intent);\n\t}", "public void trainingPreprocessing() {\n neuralNetAndDataSet = new NeuralNetAndDataSet(neuralNetwork, trainingSet);\n trainingController = new TrainingController(neuralNetAndDataSet);\n neuralNetwork.getLearningRule().addListener(this);\n trainingController.setLmsParams(0.7, 0.01, 0);\n LMS learningRule = (LMS) this.neuralNetAndDataSet.getNetwork().getLearningRule();\n if (learningRule instanceof MomentumBackpropagation) {\n ((MomentumBackpropagation) learningRule).setMomentum(0.2);\n }\n }", "public Evaluator(RANKER_TYPE rType, METRIC trainMetric, int trainK, METRIC testMetric, int testK) {\n/* 612 */ this.type = rType;\n/* 613 */ this.trainScorer = this.mFact.createScorer(trainMetric, trainK);\n/* 614 */ this.testScorer = this.mFact.createScorer(testMetric, testK);\n/* 615 */ if (qrelFile.compareTo(\"\") != 0) {\n/* */ \n/* 617 */ this.trainScorer.loadExternalRelevanceJudgment(qrelFile);\n/* 618 */ this.testScorer.loadExternalRelevanceJudgment(qrelFile);\n/* */ } \n/* */ }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.train(groupid_long, TRAIN_TYPE.all );\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsessionId = result.data+\"\";\n\t\t\t\t Log.e(TAG,sessionId);\n\t\t\t}", "public void train(Collection<TrainingEntry<Login>> trainingDataSet) throws TrainingException {\n if (trainingDataSet.isEmpty()) return;\n try {\n final DataSet dataSet = toDataSet(trainingDataSet);\n normalizer = new NormalizerStandardize();\n normalizer.fit(dataSet);\n normalizer.transform(dataSet);\n final DataSetIterator dataSetIterator = new ExistingDataSetIterator(dataSet);\n final MultiLayerConfiguration configuration = new NeuralNetConfiguration.Builder()\n .seed(6)\n .iterations(1)\n .activation(\"tanh\")\n .weightInit(WeightInit.XAVIER)\n .learningRate(0.1)\n .regularization(true).l2(1e-4)\n .list()\n .layer(0, new DenseLayer.Builder()\n .nIn(getNumberOfInputFeatures(trainingDataSet))\n .nOut(9)\n .build())\n .layer(1, new DenseLayer.Builder()\n .nIn(9)\n .nOut(9)\n .build())\n .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(\"softmax\")\n .nIn(9)\n .nOut(NUM_CATEGORIES).build())\n .backprop(true).pretrain(false)\n .build();\n network = new MultiLayerNetwork(configuration);\n final EarlyStoppingConfiguration esConf = new EarlyStoppingConfiguration.Builder()\n .epochTerminationConditions(new MaxEpochsTerminationCondition(20))\n .iterationTerminationConditions(new MaxTimeIterationTerminationCondition(20, TimeUnit.MINUTES))\n .scoreCalculator(new DataSetLossCalculator(dataSetIterator, true))\n .evaluateEveryNEpochs(1)\n .modelSaver(new InMemoryModelSaver())\n .build();\n final EarlyStoppingTrainer trainer = new EarlyStoppingTrainer(esConf, network, dataSetIterator);\n final EarlyStoppingResult<MultiLayerNetwork> result = trainer.fit();\n network = result.getBestModel();\n } catch (final Exception e) {\n throw new TrainingException(e);\n }\n }", "public void buildModel(SparseMatrix rm) {\n\t\trateMatrix = rm;\n\t\t\n\t\t/* =====================\n\t\t * COMMENT FOR AUTHORS\n\t\t * =====================\n\t\t * Using the training data in \"rm\", you are supposed to write codes to learn your model here.\n\t\t * If your method is memory-based one, you may leave the model as rateMatrix itself, simply by \"rateMatrix = rm;\".\n\t\t * If your method is model-based algorithm, you may not need a reference to rateMatrix.\n\t\t * (In this case, you may remove the variable \"rateMatrix\", just as matrix-factorization-based methods do in this toolkit.)\n\t\t * Note that in any case train data in \"rateMatrix\" are read-only. You should not alter any value in it to guarantee proper operation henceforth.\n\t\t */\n\t}", "@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}", "public void run() {\n\n // Initialize control center.\n\n control = new Dispatch(parameters);\n control.run();\n linked = control.gettasks();\n\n // Initialize trains.\n\n trains = new TrainSim[parameters.numTrains];\n\n for (int i = 0; i < parameters.numTrains; i++) {\n\n trains[i] = new TrainSim(parameters, i);\n trains[i].genbasis();\n\n }\n\n // Add linked tasks to trains.\n\n for (Task each : linked) {\n\n int trainid = each.getTrain();\n each = new Task(each.getType(), each.getBeginTime(), parameters, false);\n each.setID(trainid);\n if (each.getArrTime() < parameters.numHours*60) {\n trains[trainid].linktask(each);\n }\n }\n\n // Run each train\n\n for (TrainSim each : trains) {\n\n each.run();\n\n }\n\n }", "private void init() throws IOException, ModelException{\r\n // Check if the input file should be convert to libSVM format\r\n if(this.reformatInputFile){\r\n reformatInputFile();\r\n this.inputFileName = this.inputFileName + \".svm\";\r\n }\r\n\r\n // Scale the training set\r\n if(this.scale){\r\n scale();\r\n }\r\n\r\n setProblem();\r\n checkParams();\r\n\r\n // Check if cross validation is needed\r\n if(this.crossValidation == 1){\r\n crossValidate();\r\n }\r\n // Goes to here only if you use SVMModel without project context\r\n else{\r\n train();\r\n }\r\n }", "public abstract void fit(BinaryData trainingData);", "@Override\n\tpublic String getGANModelParameterName() {\n\t\treturn \"LodeRunnerGANModel\";\n\t}", "public KNN() {\r\n\t\tallowRun = true;\r\n\t}", "public Training() {\n }", "public String trainmodelandclassify(Attribute at) throws Exception {\n\t\tif(at.getAge()>=15 && at.getAge()<=25)\n\t\t\tat.setAgegroup(\"15-25\");\n\t\tif(at.getAge()>=26 && at.getAge()<=45)\n\t\t\tat.setAgegroup(\"25-45\");\n\t\tif(at.getAge()>=46 && at.getAge()<=65)\n\t\t\tat.setAgegroup(\"45-65\");\n\t\t\n\t\t\n\t\t\n\t\t//loading the training dataset\n\t\n\tDataSource source=new DataSource(\"enter the location of your .arff file for training data\");\n\tSystem.out.println(source);\n\tInstances traindataset=source.getDataSet();\n\t//setting the class index (which would be one less than the number of attributes)\n\ttraindataset.setClassIndex(traindataset.numAttributes()-1);\n\tint numclasses=traindataset.numClasses();\n for (int i = 0; i < numclasses; i++) {\n \tString classvalue=traindataset.classAttribute().value(i);\n \tSystem.out.println(classvalue);\n\t\t\n\t}\n //building the classifier\n NaiveBayes nb= new NaiveBayes();\n nb.buildClassifier(traindataset);\n System.out.println(\"model trained successfully\");\n \n //test the model\n\tDataSource testsource=new DataSource(\"enter the location of your .arff file for test data\");\n\tInstances testdataset=testsource.getDataSet();\n\t\n\tFileWriter fwriter = new FileWriter(\"enter the location of your .arff file for test data\",true); //true will append the new instance\n\tfwriter.write(System.lineSeparator());\n\tfwriter.write(at.getAgegroup()+\",\"+at.getGender()+\",\"+at.getProfession()+\",\"+\"?\");//appends the string to the file\n\tfwriter.close();\n\ttestdataset.setClassIndex(testdataset.numAttributes()-1);\n\t//looping through the test dataset and making predictions\n\tfor (int i = 0; i < testdataset.numInstances(); i++) {\n\t\tdouble classvalue=testdataset.instance(i).classValue();\n\t\tString actualclass=testdataset.classAttribute().value((int)classvalue);\n\t\tInstance instance=testdataset.instance(i);\n\t\tdouble pclassvalue=nb.classifyInstance(instance);\n\t\tString pclass=testdataset.classAttribute().value((int)pclassvalue);\n\t\tSystem.out.println(actualclass+\" \"+ pclass);\n\t\n}\n\tdouble classval=testdataset.instance(testdataset.numInstances()-1).classValue();\n\tInstance ins=testdataset.lastInstance();\n\tdouble pclassval=nb.classifyInstance(ins);\n\tString pclass=testdataset.classAttribute().value((int)pclassval);\n\tSystem.out.println(pclass);\n\t\n\treturn pclass;\n}", "public interface ITrainingService {\n\n void train(double[][] gestures, double[][] responses, Integer numberOfResponses);\n}", "protected abstract String getPreprocessingModel(PipelineData data);", "private String Funcionar_salida_Ant_umbral_lista_Dentro(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n String op_string;\n\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n\n // ************************* COMENTADO*********18/02\n\n // subtitulo.setText(\"Nivel: \" );\n // titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n // **********************\n // resumen_app.setText(\"Filtraciones: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n op_string = \"Filtraciones: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion;\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n\n\n\n return op_string;\n }", "public Training() {\n\n }", "@Override\r\n\tpublic void train(Documents trainingDocs) {\r\n\t\t// Convert the training documents to data.\r\n\t\tdata = convertDocumentsToData(trainingDocs);\r\n\t\t// Also add the words from the source domains into the featureIndexer.\r\n\t\tfor (String featureStr : knowledge.wordCountInPerClass\r\n\t\t\t\t.keySet()) {\r\n\t\t\tfeatureIndexerAllDomains\r\n\t\t\t\t\t.addFeatureStrIfNotExistStartingFrom0(featureStr);\r\n\t\t}\r\n\r\n\t\t// Initialize array from data.\r\n\t\tclassInstanceCount = new double[2];\r\n\t\tclassInstanceCount[0] = trainingDocs.getNoOfPositiveLabels();\r\n\t\tclassInstanceCount[1] = trainingDocs.getNoOfNegativeLabels();\r\n\t\t// Initialize array from knowledge.\r\n\t\tV = featureIndexerAllDomains.size();\r\n\t\tx = new double[V][];\r\n\t\tfor (int v = 0; v < V; ++v) {\r\n\t\t\tString featureStr = featureIndexerAllDomains\r\n\t\t\t\t\t.getFeatureStrGivenFeatureId(v);\r\n\t\t\tif (knowledge.wordCountInPerClass\r\n\t\t\t\t\t.containsKey(featureStr)) {\r\n\t\t\t\tx[v] = knowledge.wordCountInPerClass\r\n\t\t\t\t\t\t.get(featureStr);\r\n\t\t\t} else {\r\n\t\t\t\t// The word only appears in the target domain.\r\n\t\t\t\tx[v] = new double[] { 0.0, 0.0 };\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum_x = knowledge.countTotalWordsInPerClass;\r\n\r\n\t\tif (param.convergenceDifference != Double.MAX_VALUE) {\r\n\t\t\t// Stochastic gradient descent.\r\n\t\t\tSGDEntry();\r\n\t\t}\r\n\r\n\t\t// Check if any value in x is nan or infinity.\r\n\t\tfor (int i = 0; i < x.length; ++i) {\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][0]), \"Is Nan\");\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][1]), \"Is Nan\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][0]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][1]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t}\r\n\r\n\t\t// Update classification knowledge.\r\n\t\tknowledge = new ClassificationKnowledge();\r\n\t\t// knowledge.countDocsInPerClass = mCaseCounts;\r\n\t\t// knowledge.wordCountInPerClass =\r\n\t\t// mFeatureStrToCountsMap;\r\n\t\t// knowledge.countTotalWordsInPerClass =\r\n\t\t// mTotalCountsPerCategory;\r\n\t}", "public abstract void Train() throws Exception;", "public interface NetworkBuilder {\n\n /**\n * Set neural net layers\n * @param layers an array with the width and depth of each layer\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withLayers(int[] layers);\n\n /**\n * Set the DataSet\n * @param train - training set\n * @param test - test set\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withDataSet(DataSet train, DataSet test);\n\n /**\n * Set the ActivationFunction\n * @param activationFunction\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withActivationFunction(ActivationFunction activationFunction);\n\n /**\n * Set the ErrorMeasure\n * @param errorMeasure\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withErrorMeasure(ErrorMeasure errorMeasure);\n\n /**\n * Train the network\n * @return the trained network for testing\n */\n public abstract FeedForwardNetwork train();\n}", "@Procedure(value = \"mlp.train\", mode = WRITE)\n @Description(\"Backward pass through NN\")\n public void train(@Name(value = \"no. of passes\") long nPasses) {\n\n DataLogger logger = new DataLogger(\"proto1\", \"error\");\n\n for (int i = 0; i < nPasses; i++) {\n updateTrainRate(i + 1);\n forwardPass();\n\n double error = calculateError();\n\n double reward = 1.0 - error;\n\n// if (Math.random() > 0.9) reward = error;\n\n backwardPass(reward);\n moveNext();\n\n\n// System.out.println(String.format(\"Error: %f\", error));\n// if (i % 100 == 0 && i > 0) {\n// double meanError = errors.stream().reduce(0.0, Double::sum) / 100;\n// System.out.println(String.format(\n// \"Mean error: %f, eta: %f\", meanError, eta));\n// errors.clear();\n// }\n// errors.add(error);\n logger.append(error);\n\n\n }\n\n forwardPass();\n logger.close();\n }", "public void train(KDTree test, BufferedReader br, List<double[]> equationList, int kmerToDo, boolean fastatofeature) throws Exception;", "@SuppressWarnings(\"unchecked\")\n\tpublic void run(Class<?> modelRunClass) throws ParseException, Exception{\n\t\tArrayList<ExperimentalGroup> experimentalGroups = new ArrayList<ExperimentalGroup>();\n\t\tcombinationsOfLevels(experimentalGroups);\n\t\t\n\t\tint baseSeed = baseParams.get(\"Seed\").valueInt;\n\t\tint runID = 1;\n\t\t\n\t\tfor(ExperimentalGroup experimentalGroup : experimentalGroups){\n\t\t\tLinkedHashMap<String, ParameterValue> runParams = new LinkedHashMap<String, ParameterValue>();\n\t\t\tfor(String key : baseParams.keySet()){\n\t\t\t\trunParams.put(key, (ParameterValue)baseParams.get(key).clone());\n\t\t\t}\n\t\t\tfor(Level level : experimentalGroup.levels){\n\t\t\t\tfor(ParameterValue paramValue : level.values){\n\t\t\t\t\trunParams.remove(paramValue.parameter.name);\n\t\t\t\t\trunParams.put(paramValue.parameter.name,paramValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < this.replicates; i++) {\n\t\t\t\tLinkedHashMap<String, ParameterValue> runParamsWithRep = (LinkedHashMap<String, ParameterValue>) runParams.clone();\n\t\t\t\tExperimentalGroup experimentalGroupWithRep = (ExperimentalGroup) experimentalGroup.clone();\n\t\t\t\texperimentalGroupWithRep.setReplicate(i);\n\t\t\t\texperimentalGroupWithRep.setRun(runID++);\n\t\t\t\tObject modelRun = null;\n\t\t\t\tif(baseSeed != 0){\n\t\t\t\t\trunParamsWithRep.remove(\"Seed\");\n\t\t\t\t\trunParamsWithRep.put(\"Seed\",new ParameterValue(baseParams.get(\"Seed\").parameter, (new Integer(baseSeed * (i+1))).toString()));\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t modelRun = modelRunClass.newInstance();\n\t\t } catch (InstantiationException ex) {\n\t\t log.error(ex);\n\t\t } catch (IllegalAccessException ex) {\n\t\t log.error(ex);\n\t\t }\n\t\t\t\t((Model)modelRun).setParameters(runParamsWithRep);\n\t\t\t\t((Model)modelRun).setExperimentalGroup(experimentalGroupWithRep);\n\t\t\t\texecuter.execute((Runnable) modelRun);\n\t\t\t}\n\t\t}\n\t\texecuter.shutdown();\n\t}" ]
[ "0.6555375", "0.6200695", "0.60877424", "0.6027804", "0.5998036", "0.5978382", "0.57799065", "0.5701747", "0.5700656", "0.568677", "0.5653624", "0.5617061", "0.557583", "0.55515647", "0.55216706", "0.55213237", "0.551603", "0.55060166", "0.55034477", "0.54876274", "0.5487121", "0.547141", "0.5425826", "0.5412185", "0.5404761", "0.53876925", "0.5371501", "0.53710073", "0.53629225", "0.53626186", "0.5327293", "0.5295604", "0.5289973", "0.5245454", "0.5228436", "0.522074", "0.5206374", "0.5205555", "0.5190584", "0.5178525", "0.51303893", "0.5120984", "0.5119992", "0.51190263", "0.50903547", "0.50861275", "0.5074042", "0.5066973", "0.506124", "0.5000829", "0.49901682", "0.49897802", "0.4982841", "0.49814716", "0.49697435", "0.49663898", "0.49656746", "0.49615896", "0.4959087", "0.49578673", "0.49526483", "0.49517232", "0.4945872", "0.4944762", "0.49410418", "0.49271068", "0.49267435", "0.49168432", "0.49015582", "0.48968315", "0.48910242", "0.4887827", "0.48873118", "0.48831123", "0.48830682", "0.48773614", "0.48718965", "0.48569182", "0.48558158", "0.48524716", "0.48508212", "0.48482552", "0.48461947", "0.48417205", "0.48387453", "0.4833318", "0.48296633", "0.48292053", "0.48207876", "0.48135898", "0.48039055", "0.47963837", "0.4786668", "0.47860417", "0.47851712", "0.47816226", "0.47699147", "0.47656527", "0.47575775", "0.47492388", "0.4745637" ]
0.0
-1
verify the required parameter 'workspaceId' is set
@SuppressWarnings("rawtypes") private okhttp3.Call trainModelValidateBeforeCall(String workspaceId, String modelId, final ApiCallback _callback) throws ApiException { if (workspaceId == null) { throw new ApiException("Missing the required parameter 'workspaceId' when calling trainModel(Async)"); } // verify the required parameter 'modelId' is set if (modelId == null) { throw new ApiException("Missing the required parameter 'modelId' when calling trainModel(Async)"); } okhttp3.Call localVarCall = trainModelCall(workspaceId, modelId, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void workspaceTest() throws ApiException {\n String workspaceId = null;\n Workspace response = api.workspace(workspaceId);\n\n // TODO: test validations\n }", "public void setWorkspaceId(String workspaceId) {\n this.workspaceId = workspaceId;\n }", "@Test\r\n \tpublic void testProjectID() {\n \t\tassertNull(localProject.getGlobalProjectId());\r\n \t}", "public String getWorkspaceId() {\n return workspaceId;\n }", "public String getWorkspaceId() {\n return this.workspaceId;\n }", "public UUID getWorkspaceId() {\n return workspaceId;\n }", "@Test\n\tpublic void getProjectByIdInvalid() {\n\t\tthrown.expect(ResourceNotFoundException.class);\n\t\tthrown.expectMessage(\"Project Id not Found\");\n\t\tcontroller.getProjectById(7L);\n\t}", "@Test\n\tpublic void updateProjectsInvalidId() {\n\t\tthrown.expect(ResourceNotFoundException.class);\n\t\tthrown.expectMessage(\"Project Id not Found\");\n\t\tcontroller.updateProject(7L, project);\n\t}", "@Test\n public void checkExistentWidgetAndParameter() throws Exception {\n\n driver = WidgetUtils.OpenWidgetEditMode(driver, wait, baseUrl, widgetName);\n\n //Step 3 - Check if the parameter exist in 'Settings'\n //Move to the iframe\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@id='solutionNavigatorAndContentPanel']/div[4]/table/tbody/tr[2]/td/div/div/table/tbody/tr/td/iframe\")));\n WebElement frameCDEDashboard = driver.findElement(By.xpath(\"//div[@id='solutionNavigatorAndContentPanel']/div[4]/table/tbody/tr[2]/td/div/div/table/tbody/tr/td/iframe\"));\n driver.switchTo().frame(frameCDEDashboard);\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@class='layoutPanelButton']\")));\n assertTrue(driver.findElement(By.xpath(\"//div[@class='layoutPanelButton']\")).isEnabled());\n //Press 'Settings'\n driver.findElement(By.xpath(\"//div[@id='headerLinks']/div[5]/a\")).click();\n wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath(\"//div[@id='popup']\")));\n assertNotNull(driver.findElement(By.xpath(\"//span[@id='widgetParameters']/div/input\")));\n //The parameter MUST be equal to the one set\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//span[@id='widgetParameters']/div/span\")));\n assertEquals(driver.findElement(By.xpath(\"//span[@id='widgetParameters']/div/span\")).getText(), paramName);\n //Press on the check box\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//span[@id='widgetParameters']/div/input\")));\n assertTrue(driver.findElement(By.xpath(\"//span[@id='widgetParameters']/div/input\")).isSelected());\n //Press button 'Cancel'\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@class='popupbuttons']/button[@id='popup_state0_buttonCancel']\")));\n driver.findElement(By.xpath(\"//div[@class='popupbuttons']/button[@id='popup_state0_buttonCancel']\")).click();\n\n\n //Step 4 - Click on Component Panel and check if the widget is listed\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@class='componentsPanelButton']\")));\n driver.findElement(By.xpath(\"//div[@class='componentsPanelButton']\")).click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@id='cdfdd-components-palletePallete']/div[9]/h3/span\")));\n driver.findElement(By.xpath(\"//div[@id='cdfdd-components-palletePallete']/div[9]/h3/span\")).click();\n //Getting the element where the widget created is displayed\n WebElement listOfWidgets = driver.findElement(By.xpath(\"//div[@id='cdfdd-components-palletePallete']/div[9]/div\"));\n //Check if the widget created is listed\n WebElement theWidgetCreated = listOfWidgets.findElement(By.xpath(\"//a[@class='tooltip' and contains(text(),'\" + widgetName + \"')]\"));\n assertNotNull(theWidgetCreated);\n assertEquals(theWidgetCreated.getText(), widgetName);\n\n\n //Step 5 - Click in the widget created and check if the widget is add at Components column and Properties\n theWidgetCreated.click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//table[@id='table-cdfdd-components-components']/tbody/tr[4]/td\")));\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//table[@id='table-cdfdd-components-properties']/tbody/tr[2]/td\")));\n assertEquals(driver.findElement(\n By.xpath(\"//table[@id='table-cdfdd-components-components']/tbody/tr[4]/td\")).getText(),\n widgetName + \" Widget\");\n assertEquals(driver.findElement(\n By.xpath(\"//table[@id='table-cdfdd-components-properties']/tbody/tr[2]/td\")).getText(),\n \"Parameter \" + paramName);\n }", "public void setWorkspace( Integer workspace ) {\n this.workspace = workspace;\n }", "public void setWorkspace(String workspace) {\n this.workspace = workspace;\n }", "protected static Workspace getWorkspace(String workspaceId)\n throws AnaplanAPIException {\n if (workspaceId == null || workspaceId.isEmpty()) {\n LOG.error(\"A workspace ID must be provided\");\n return null;\n }\n Workspace result = null;\n\n if (!noValidateWorkspace) {\n try {\n result = getService().getWorkspace(workspaceId);\n } catch (WorkspaceNotFoundException | UnknownAuthenticationException ignored) {\n }\n }\n if (result == null) {\n WorkspaceData data = new WorkspaceData();\n data.setId(workspaceId);\n try {\n result = new Workspace(getService(), data);\n } catch (UnknownAuthenticationException ignored) {\n }\n }\n return result;\n }", "public BaseMsg verifyProjectInfo(long projectId);", "private boolean assertIdAndVarName() {\r\n\t\tfinal boolean isValidId = assertNotEmpty(cmpCfg.getId(),\r\n\t\t\t\tYValidationAspekt.VIEW_ID_NOT_SPECIFIED);\r\n\r\n\t\tfinal boolean isValidVar = assertNotEmpty(cmpCfg.getVariableName(),\r\n\t\t\t\tYValidationAspekt.VIEW_VAR_NOT_SPECIFIED);\r\n\r\n\t\tfinal boolean isValid = isValidId && isValidVar;\r\n\t\treturn isValid;\r\n\r\n\t}", "private void validatePathParameters(final Integer datacenterId) throws NotFoundException\n {\n if (!service.isAssignedTo(datacenterId, RemoteServiceType.NODE_COLLECTOR))\n {\n throw new NotFoundException(APIError.NOT_ASSIGNED_REMOTE_SERVICE_DATACENTER);\n }\n }", "public void setWorkspace(Workspace workspace) {\n this.workspace = workspace;\n }", "public boolean isIdExist(int projectId) throws EmployeeManagementException;", "boolean canAccess(String workspaceName) throws NoSuchWorkspaceException, RepositoryException;", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void deleteProjectsInvalidID() {\n\t\tthrown.expect(ResourceNotFoundException.class);\n\t\tthrown.expectMessage(\"Project Id not Found\");\n\t\tcontroller.deleteProject(7L);\n\t}", "@Test\n public void testBuildWithValidParametersReturnsProjectExportParametersInstance() {\n // Arrange\n testling.setProjectName(\"validProjectName\")\n .setProjectExportPath(\"validProjectExportPath\");\n\n // Assert\n ProjectExportParameters parameters = testling.build();\n\n // Act\n assertThat(\"Expect not null.\", parameters, is(notNullValue()));\n }", "@Test\n\tpublic void testBuildWithValidParametersReturnsProjectExportParametersInstance() {\n\t\t// Arrange\n\t\ttestling.setProjectName(\"validProjectName\")\n\t\t\t\t.setProjectExportPath(\"validProjectExportPath\");\n\n\t\t// Assert\n\t\tProjectExportParameters parameters = testling.build();\n\n\t\t// Act\n\t\tassertThat(\"Expect not null.\", parameters, is(notNullValue()));\n\t}", "public void testPropFindForNonExistingWorkspace() throws Exception\n {\n String file = TestUtils.getFileName();\n\n ContainerResponse response =\n service(WebDAVMethods.PROPFIND, getPathWS() + \"_\" + file, \"\", null, null);\n assertEquals(HTTPStatus.CONFLICT, response.getStatus());\n }", "private boolean validateArguments() {\n return !isEmpty(getWsConfig()) && !isEmpty(getVirtualServer()) && !isEmpty(getVirtualServer()) && !isEmpty(getAppContext()) && !isEmpty(getWarFile()) && !isEmpty(getUser()) && !isEmpty(getPwdLocation());\n }", "public interface WorkspaceContext {\n\n\n /**\n * Retorna a representação do workspace.\n *\n * @return\n */\n WorkspaceRepresentation getWorkspace();\n\n /**\n * Define o projeto de trabalho.\n *\n * @param projectRepresentation\n */\n void setWorkingProject(ProjectRepresentation projectRepresentation);\n\n\n /**\n * Retorna o projeto de trabalho.\n *\n * @return\n */\n ProjectRepresentation getWorkingProject();\n}", "protected void addWorkspace( String workspaceName ) {\n }", "@Reference\n public void setWorkspace(Workspace workspace) {\n this.workspace = workspace;\n }", "public void testGetProjectPhasesLong_NotExist() throws Exception {\n Project project = persistence.getProjectPhases(33245);\n assertNull(\"Should return null.\", project);\n }", "protected void setWorkspace(Workspace workspace) {\n this.workspace = workspace;\n }", "public boolean isSetProjectId() {\n return EncodingUtils.testBit(__isset_bitfield, __PROJECTID_ISSET_ID);\n }", "public boolean isSetProjectId() {\n return EncodingUtils.testBit(__isset_bitfield, __PROJECTID_ISSET_ID);\n }", "@Test\n\tpublic void query_for_build_project_is_scoped_to_BuildProject() {\n\t\tEnvironmentContext cx = null;\n\t\ttry {\n\t\t\tcx = new EnvironmentContext();\n\t\t} catch (Exception e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t// And a new repository with that connection\n\t\tBuildProjectRepository repository = new BuildProjectRepositoryApiClient(cx);\n\t\t// When I build the query for story statuses\n\t\tQuery query = repository.buildQueryForAllBuildProjects();\n\t\t// Then the asset type is BuildProject\n\t\tassertEquals(\"BuildProject\", query.getAssetType().getToken());\n\t}", "private void checkAuthSessionId() {\n val auth = config.getString(\"authSessionId\");\n\n checkArgument(auth.length() > 10, \"auth string (sessionId) length is less than or equal to 10!\");\n }", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "public boolean checkSelf() {\n\t\tboolean ok = true;\n\t\tif (controller == null) {\n\t\t\tSystem.err.println(\"CRParameters :: controller not set\");\n\t\t\tok = false;\n\t\t}\n\t\tif (scenario.length() == 0 && controller.getWorld().getHasScenarios()) {\n\t\t\tSystem.err.println(\"CRParameters :: scenario not set\");\n\t\t\tok = false;\n\t\t}\n\t\tif (reportFolderName.length() == 0) {\n\t\t\tSystem.err.println(\"CRParameters :: report folder not set\");\n\t\t\tok = false;\n\t\t}\n\t\tif (trialDuration <= 0) {\n\t\t\tSystem.err.println(\"CRParameters :: trial duration not set or 0\");\n\t\t\tok = false;\n\t\t}\n\t\tif (numOfRuns <= 0) {\n\t\t\tSystem.err.println(\"CRParameters :: number of runs not set or 0\");\n\t\t\tok = false;\n\t\t}\n\t\tif (numOfTrials <= 0) {\n\t\t\tSystem.err.println(\"CRParameters :: number of trials not set or 0\");\n\t\t\tok = false;\n\t\t}\n\t\treturn ok;\n\t}", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public FormValidation doCheckExecutionParameters(@QueryParameter String value, @QueryParameter String agentId) {\n if (StringUtils.isEmpty(value) && StringUtils.isEmpty(agentId))\n return FormValidation.ok();\n\n JsonObject executionParams = null;\n try {\n executionParams = SerializationHelper.fromJson(value, JsonObject.class);\n\n // In case the value parameter is empty\n if (executionParams == null)\n return FormValidation.ok();\n\n } catch (JsonSyntaxException e) {\n return FormValidation.error(\"Invalid JSON object\");\n }\n\n // In case the user did not select agent from the dropdown and/or in the JSON object, return ok.\n if ((executionParams.get(\"agentId\") != null && StringUtils.isEmpty(executionParams.get(\"agentId\").getAsString())) || StringUtils.isEmpty(agentId))\n return FormValidation.ok();\n\n // In case the user has selected the same agentId in the dropdown and in the JSON object, no need to show a warning\n if ((executionParams.get(\"agentId\") != null && StringUtils.equals(executionParams.get(\"agentId\").getAsString(), agentId)))\n return FormValidation.ok();\n\n // In case the user has selected two different agents in the dropdown and in the JSON object, show warning\n if (executionParams.get(\"agentId\") != null &&\n !StringUtils.isEmpty(executionParams.get(\"agentId\").getAsString()) &&\n !StringUtils.isEmpty(agentId))\n return FormValidation.warning(\"You've selected an agent and specified a different one in executionParameters. The job will be executed on the selected agent.\");\n\n return FormValidation.ok();\n }", "protected void removeWorkspace( String workspaceName ) {\n }", "public boolean isSetRunId() {\n return this.runId != null;\n }", "@Test\n public void testErrorMsgWhenProjectNameIsEmpty() {\n //When\n CreateProject createProject = dashboard.clickCreateProjectButton();\n String testAccount = \"Account2\";\n createProject.setAccountDropDown(testAccount);\n createProject.clickCreateProject();\n\n //Then\n String expectedMessage = \"Enter a name for your project\";\n String actualMessage = createProject.getProjectTitleMessage();\n softAssert.assertEquals(expectedMessage, actualMessage);\n softAssert.assertEquals(createProject.getProjectNameTextFieldColor(), RED_COLOR);\n softAssert.assertAll();\n }", "private void validateBuildParameters() {\n if (TextUtils.isEmpty(consumerKey)) {\n throw new IllegalArgumentException(\"CONSUMER_KEY not set\");\n }\n if (TextUtils.isEmpty(consumerSecret)) {\n throw new IllegalArgumentException(\"CONSUMER_SECRET not set\");\n }\n if (TextUtils.isEmpty(token)) {\n throw new IllegalArgumentException(\"TOKEN not set, the user must be logged it\");\n }\n if (TextUtils.isEmpty(tokenSecret)) {\n throw new IllegalArgumentException(\"TOKEN_SECRET not set, the user must be logged it\");\n }\n }", "public void setStagingWorkspaceId(Long stagingWorkspaceId) {\n this.stagingWorkspaceId = stagingWorkspaceId;\n }", "@Override\n public String validNameProject(String name, Integer project_Oid) {\n return null;\n }", "public String getWorkspaceName() {\n return workspaceName;\n }", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorWorkspaceNull() {\n PlannedActivity plannedActivity = new PlannedActivity(0,\n new Site(\"factory\", \"area\"), new Typology(\"typology\"),\n \"desctiption\", 0, true, 1, new Procedure(\"name\", \"smp\"), null);\n\n }", "@Test\n public void testWithActiveRunNoRunName() {\n MlflowContext mlflow = setupMlflowContext();\n mlflow.setExperimentId(\"123\");\n when(mockClient.createRun(any(CreateRun.class)))\n .thenReturn(RunInfo.newBuilder().setRunId(\"test-id\").build());\n mlflow.withActiveRun(activeRun -> {\n Assert.assertEquals(activeRun.getId(), \"test-id\");\n });\n verify(mockClient).createRun(any(CreateRun.class));\n verify(mockClient).setTerminated(any(), any());\n }", "@Test\n public void getComputerBuildByIdentifier() {\n Iterable<ComputerBuild> computerBuilds = computerBuildService.getAllComputerBuildsFromUser(USER_NAME_TO_TEST_OWNERSHIP_ENDPOINTS);\n ComputerBuild retrievedBuild = computerBuilds.iterator().next();\n assertNotNull(retrievedBuild);\n\n ComputerBuild foundBuild = computerBuildService.getComputerBuildByBuildIdentifier(retrievedBuild.getBuildIdentifier());\n\n assertNotNull(foundBuild);\n assertEquals(retrievedBuild.getBuildIdentifier(), foundBuild.getBuildIdentifier());\n assertEquals(retrievedBuild.getUser().getUsername(), foundBuild.getUser().getUsername());\n\n }", "public void test_61843() {\n \t\t// create the project and manually give it a settings file\n \t\tfinal String qualifier = getUniqueString();\n \t\tfinal IProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tIFile settingsFile = getFileInWorkspace(project, qualifier);\n \n \t\t// write some property values in the settings file\n \t\tProperties properties = new Properties();\n \t\tproperties.put(\"key\", \"value\");\n \t\tOutputStream output = null;\n \t\ttry {\n \t\t\tFile file = settingsFile.getLocation().toFile();\n \t\t\tfile.getParentFile().mkdirs();\n \t\t\toutput = new BufferedOutputStream(new FileOutputStream(file));\n \t\t\tproperties.store(output, null);\n \t\t} catch (FileNotFoundException e) {\n \t\t\tfail(\"1.0\", e);\n \t\t} catch (IOException e) {\n \t\t\tfail(\"1.1\", e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (output != null)\n \t\t\t\t\toutput.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \n \t\t// add a log listener to ensure that no errors are reported silently\n \t\tILogListener logListener = new ILogListener() {\n \t\t\tpublic void logging(IStatus status, String plugin) {\n \t\t\t\tThrowable exception = status.getException();\n \t\t\t\tif (exception == null || !(exception instanceof CoreException))\n \t\t\t\t\treturn;\n \t\t\t\tif (IResourceStatus.WORKSPACE_LOCKED == ((CoreException) exception).getStatus().getCode())\n \t\t\t\t\tfail(\"3.0\");\n \t\t\t}\n \t\t};\n \n \t\t// listener to react to changes in the workspace\n \t\tIResourceChangeListener rclistener = new IResourceChangeListener() {\n \t\t\tpublic void resourceChanged(IResourceChangeEvent event) {\n \t\t\t\tnew ProjectScope(project).getNode(qualifier);\n \t\t\t}\n \t\t};\n \n \t\t// add the listeners\n \t\tPlatform.addLogListener(logListener);\n \t\tgetWorkspace().addResourceChangeListener(rclistener, IResourceChangeEvent.POST_CHANGE);\n \n \t\ttry {\n \t\t\tproject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"4.0\", e);\n \t\t} finally {\n \t\t\tPlatform.removeLogListener(logListener);\n \t\t\tgetWorkspace().removeResourceChangeListener(rclistener);\n \t\t}\n \t}", "@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "String checkIfProjectExists(String projectKey, String projectName);", "default FormValidation doCheckArtifactId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set an ArtifactId!\");\r\n return FormValidation.ok();\r\n }", "@Override\r\n protected CommandStatus<StclContext, PStcl> verifyContext(CommandContext<StclContext, PStcl> cmdContext, PStcl self) {\n _name = getParameter(cmdContext, 1, null);\r\n if (StringUtils.isEmpty(_name)) {\r\n return error(cmdContext, self, Status.NO_NAME_DEFINED, \"no name to copy directory\");\r\n }\r\n\r\n // other verification\r\n return super.verifyContext(cmdContext, self);\r\n }", "@Test\n public void test_access_to_modify_team_success() {\n try {\n Assert.assertTrue(authBO.hasAccessToModifyTeam(1, 1));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "private boolean configurationInWorkspace(URL url) {\n \t\treturn true;\n \t}", "@Test\n void shouldThrowExceptionWhenUpdatedProjectWithTheEnteredUuidDoesNotExists() {\n assertThrows(NotFoundException.class, () -> projectService.updateProject(UUID.randomUUID(), projectUpdateForm));\n }", "@Test\n public void testNoCoverageId() throws Exception {\n MockHttpServletResponse response = getAsServletResponse(\"wcs?service=WCS&version=2.0.1&request=GetCoverage\");\n checkOws20Exception(response, 400, \"MissingParameterValue\", \"coverageId\");\n }", "void verifyOrCreateReport(String reportId);", "public void testGetProjectByNameDoesNotExist() throws Exception {\r\n ProjectServiceRemote projectService = lookupProjectServiceRemoteWithUserRole();\r\n\r\n // 1 is the user id\r\n try {\r\n projectService.getProjectByName(\"xxxxx\", 1);\r\n fail(\"ProjectNotFoundFault expected.\");\r\n } catch (ProjectNotFoundFault e) {\r\n // expected\r\n }\r\n }", "@Test\n public void testFailureWithoutObjectId() throws URISyntaxException, IOException {\n testCantView(adminLogin, \"\", 400);\n }", "private boolean ensureWorkspaceExists(String name, Credentials credentials) {\r\n\t\tSession sess = null;\r\n\t\ttry {\r\n\t\t\tsess = repository.login(credentials);\r\n\t\t\tString[] wsnames = sess.getWorkspace()\r\n\t\t\t\t\t.getAccessibleWorkspaceNames();\r\n\t\t\tif (inArr(name, wsnames)) {\r\n\t\t\t\t// workspace exists\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tlog.info(\" Creating Repository workspace \" + name);\r\n\t\t\t\tsess.getWorkspace().createWorkspace(name);\r\n\t\t\t}\r\n\t\t} catch (LoginException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} catch (RepositoryException e) {\r\n\t\t\t// ugly check, we are getting something like workspace 'wsname'\r\n\t\t\t// already exists.\r\n\t\t\tif (e.getMessage().indexOf(\"already exists\") > 0) {\r\n\t\t\t\t// ignore exteption\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (sess != null) {\r\n\t\t\t\tsess.logout();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n public void allWorkspacesTest() throws ApiException {\n List<Workspace> response = api.allWorkspaces();\n\n // TODO: test validations\n }", "@Test\n public void testFailureWithNonexistantObjectId() throws URISyntaxException, IOException {\n testCantView(adminLogin, reqFactory.createIdApiRequest(Types.PACKAGE).execute(hc), 404);\n }", "void checkStationId(int lineCount, String testStationId) {\n if (!stationId.equals(testStationId)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Station Id does not match previous station record \" +\n stationId + \": \" + testStationId);\n } // if (!stationId.equals(station.getStationId(\"\")))\n }", "public String getWorkspace() {\n return workspace;\n }", "protected void verifyRequestInputModelNone( String apiName)\n {\n // Given...\n OpenAPI api = readApi( apiName);\n\n // When...\n SystemInputDef inputDef = TcasesOpenApi.getRequestInputModel( api);\n\n // Then...\n assertThat( apiName + \" input model\", inputDef, is( nullValue()));\n }", "@Test\n public void testNeighborSystemId() throws Exception {\n isisNeighbor.setNeighborSystemId(systemId);\n result1 = isisNeighbor.neighborSystemId();\n assertThat(result1, is(systemId));\n }", "void commit(String workspace);", "protected void validateCredentials() throws BittrexApiException {\n String humanMessage = \"Please check environment variables or VM options\";\n if (Strings.isNullOrEmpty(this.getApiKey()))\n throw new BittrexApiException(\"Missing BITTREX_API_KEY. \" + humanMessage);\n if (Strings.isNullOrEmpty(this.getSecretKey()))\n throw new BittrexApiException(\"Missing BITTREX_SECRET_KEY. \" + humanMessage);\n }", "@Test\n\tpublic void testGetBuildVersion() {\n\t\tString buildVersion = rmitAnalyticsModel.getBuildVersion();\n\t\tAssert.assertNotNull(buildVersion);\n\t\tAssert.assertTrue(buildVersion.isEmpty());\n\t}", "@Test\n public void enableDebuggerTest() {\n String customerId = null;\n // Void response = api.enableDebugger(customerId);\n\n // TODO: test validations\n }", "public void checkParameters() {\n }", "public Workspace getWorkspace() {\n return workspace;\n }", "private void verifyWorkspace(long[][][] ids) {\n ArrayList<Long> allScreens = LauncherModel.loadWorkspaceScreensDb(getMockContext());\n assertEquals(ids.length, allScreens.size());\n int total = 0;\n\n for (int i = 0; i < ids.length; i++) {\n long screenId = allScreens.get(i);\n for (int y = 0; y < ids[i].length; y++) {\n for (int x = 0; x < ids[i][y].length; x++) {\n long id = ids[i][y][x];\n\n Cursor c = getMockContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,\n new String[]{LauncherSettings.Favorites._ID},\n \"container=-100 and screen=\" + screenId +\n \" and cellX=\" + x + \" and cellY=\" + y, null, null, null);\n if (id == -1) {\n assertEquals(0, c.getCount());\n } else {\n assertEquals(1, c.getCount());\n c.moveToNext();\n assertEquals(id, c.getLong(0));\n total++;\n }\n c.close();\n }\n }\n }\n\n // Verify that not other entry exist in the DB.\n Cursor c = getMockContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,\n new String[]{LauncherSettings.Favorites._ID},\n \"container=-100\", null, null, null);\n assertEquals(total, c.getCount());\n c.close();\n }", "@Override\r\n\tpublic Workspace getWorkspace() {\n\t\treturn null;\r\n\t}", "@Test\n public void postTemplateProgrammerProjectTest() throws ApiException {\n ProjectDTO request = null;\n TaskIdResult response = api.postTemplateProgrammerProject(request);\n\n // TODO: test validations\n }", "private void validateITResource() {\n // TODO Auto-generated method stub\n \n }", "public static boolean isValidDivisionId(int divisionId) {\n return divisionId > 0 || divisionId == DIVISION_TEST || divisionId == DIVISION_GLOBAL;\n }", "private void assert_validPID(int pid) throws IllegalArgumentException{\n\t\tif(!validPID(pid)){\n\t\t\tthrow new IllegalArgumentException(\"Tried to get a property from layer '\"+ name\n\t\t\t\t\t+\"' with an invalid property ID: \"+pid);\n\t\t}\n\t}", "private boolean checkInstanceLocation(boolean show_login,\n final boolean force_prompt,\n URL default_workspace, String username, String password,\n Map<String, Object> parameters)\n {\n // Was \"-data @none\" specified on command line?\n final Location instanceLoc = Platform.getInstanceLocation();\n\n if (instanceLoc == null)\n {\n MessageDialog.openError(null,\n \"No workspace\", //$NON-NLS-1$\n \"Cannot run without a workspace\"); //$NON-NLS-1$\n return false;\n }\n\n // -data \"/some/path\" was provided...\n if (instanceLoc.isSet())\n {\n try\n { // Lock\n if (instanceLoc.lock())\n return true;\n // Two possibilities:\n // 1. directory is already in use\n // 2. directory could not be created\n final File ws_dir = new File(instanceLoc.getURL().getFile());\n if (ws_dir.exists())\n MessageDialog.openError(null,\n org.csstudio.platform.workspace.Messages.Workspace_InUseErrorTitle,\n NLS.bind(org.csstudio.platform.workspace.Messages.Workspace_InUseError,\n ws_dir.getCanonicalPath()));\n else\n MessageDialog.openError(null,\n org.csstudio.platform.workspace.Messages.Workspace_DirectoryErrorTitle,\n org.csstudio.platform.workspace.Messages.Workspace_DirectoryError);\n }\n catch (IOException ex)\n {\n MessageDialog.openError(null,\n org.csstudio.platform.workspace.Messages.Workspace_LockErrorTitle,\n org.csstudio.platform.workspace.Messages.Workspace_LockError\n + ex.getMessage());\n }\n return false;\n }\n\n // -data @noDefault or -data not specified, prompt and set\n if (default_workspace == null)\n default_workspace = instanceLoc.getDefault();\n\n final WorkspaceInfo workspace_info =\n new WorkspaceInfo(default_workspace, !force_prompt);\n\n // Prompt in any case? Or did user decide to be asked again?\n boolean show_Workspace = force_prompt | workspace_info.getShowDialog();\n\n //if no user name provided, display last login user.\n if(username == null)\n username = WorkspaceIndependentStore.readLastLoginUser();\n\n //initialize startupHelper\n StartupHelper startupHelper = new StartupHelper(null, force_prompt,\n workspace_info, username, password, show_login, show_Workspace);\n\n while (true)\n {\n startupHelper.setShow_Login(show_login);\n startupHelper.setShow_Workspace(show_Workspace);\n\n if (show_Workspace || show_login)\n {\n if (! startupHelper.openStartupDialog())\n return false; // canceled\n\n //get user name and password from startup dialog\n if(show_login) {\n username = startupHelper.getUserName();\n password = startupHelper.getPassword();\n }\n }\n // In case of errors, we will have to ask the workspace,\n // but don't bother to ask user name and password again.\n show_Workspace = true;\n show_login = false;\n\n try\n {\n // the operation will fail if the url is not a valid\n // instance data area, so other checking is unneeded\n URL workspaceUrl = new URL(\"file:\" + workspace_info.getSelectedWorkspace()); //$NON-NLS-1$\n if (instanceLoc.set(workspaceUrl, true)) // set & lock\n {\n workspace_info.writePersistedData();\n parameters.put(WORKSPACE, workspaceUrl);\n return true;\n }\n }\n catch (Exception ex)\n {\n MessageDialog.openError(null,\n org.csstudio.platform.workspace.Messages.Workspace_GenericErrorTitle,\n org.csstudio.platform.workspace.Messages.Workspace_GenericError + ex.getMessage());\n return false;\n }\n // by this point it has been determined that the workspace is\n // already in use -- force the user to choose again\n show_login = false;\n MessageDialog.openError(null,\n org.csstudio.platform.workspace.Messages.Workspace_InUseErrorTitle,\n NLS.bind(org.csstudio.platform.workspace.Messages.Workspace_InUseError,\n workspace_info.getSelectedWorkspace()));\n }\n }", "@Test\n void testNonEmptyConstructor() {\n assertNotNull(isLockedRequest2);\n assertTrue(isLockedRequest2.getToken().equals(token)\n && isLockedRequest2.getId() == id);\n }", "@Then(\"^Validate customer id is created$\")\r\n\tpublic void validate_customer_id_is_created() throws Throwable {\n\t\tAssert.assertTrue(response.jsonPath().get(\"id\").equals(new PropertFileReader().getTempData(\"custId\")));\r\n\t\t\r\n\t}", "@Test\n void shouldThrowExceptionWhenUpdatedProjectWithTheEnteredUuidDoesNotExistsMockVersion() {\n assertThrows(NotFoundException.class, () -> projectServiceMock.updateProject(UUID.randomUUID(), projectUpdateForm));\n }", "@Override\r\n\tpublic void testInvalidId() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testInvalidId();\r\n\t\t}\r\n\t}", "public Workspace build() {\n if (properties == null) {\n properties = new HashMap<>();\n }\n if (workspaceId == null || workspaceStage == null) {\n throw new MissingRequiredFieldsException(\"Workspace requires id and stage\");\n }\n return new Workspace(\n workspaceId,\n displayName,\n description,\n spendProfileId,\n properties,\n workspaceStage,\n gcpCloudContext);\n }", "@Test\n public void given_devEnvironmentWithPathVariable_when_callEndPointUpdateStudent_then_returnStatus200() throws Exception {\n\n Mockito.when(studentRepo.findById(ArgumentMatchers.anyLong()))\n .thenReturn(Optional.of(STUDENT));\n\n RequestBuilder request = MockMvcRequestBuilders\n .delete(\"/students/1\")\n .accept(MediaType.APPLICATION_JSON_VALUE)\n .contentType(MediaType.APPLICATION_JSON_VALUE);\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andDo(MockMvcResultHandlers.print())\n .andReturn();\n\n }", "@Test\r\n\tpublic void Test_ID() {\r\n\t\tResponse resp = given().\r\n\t\t\t\tparam(\"nasa_id\", \"PIA12235\").\r\n\t\t\t\twhen().\r\n\t\t\t\tget(endpoint);\r\n\t\t\t\tSystem.out.println(resp.getStatusCode());\r\n\t\t\t\tAssert.assertEquals(resp.getStatusCode(), 200);\r\n\t}", "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "@Test\n public void commandIdTest() {\n // TODO: test commandId\n }", "static void checkId(final long id, final String paramName) {\r\n if (id <= 0) {\r\n throw new IllegalArgumentException(\"The '\" + paramName\r\n + \"' should be above 0.\");\r\n }\r\n }", "public Long getStagingWorkspaceId() {\n return stagingWorkspaceId;\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "@Override\n\tpublic boolean hasParameter(String id) {\n\t\treturn false;\n\t}", "@Test\n public void cityNotNull()\n {\n assertNotNull(_city);\n }", "@When(\"^I enter valid credentia ls$\")\n public void iEnterValidCredentials() throws Throwable {\n throw new PendingException();\n }", "private void checkLegal(int glId)\n {\n if (glId == GL2.GL_POLYGON_MODE || glId == GL2.GL_COLOR_MATERIAL_PARAMETER)\n return;\n if (GLState.TEXTURE_GROUP <= glId && glId < GLState.TEXTURE_GROUP + GLState.TEXTURE_GROUP_SIZE)\n return;\n throw new IllegalArgumentException(\"GLStateComponentII: unknown glId: \" + glId);\n }", "@Test\n\tpublic void testValidateSurveyIds() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyIds(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\tfor(String simpleValidList : ParameterSets.getSimpleValidLists()) {\n\t\t\t\ttry {\n\t\t\t\t\tSurveyResponseValidators.validateSurveyIds(simpleValidList);\n\t\t\t\t}\n\t\t\t\tcatch(ValidationException e) {\n\t\t\t\t\tfail(\"A valid list failed validation.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\n public void putTemplateProgrammerProjectTest() throws ApiException {\n ProjectDTO request = null;\n TaskIdResult response = api.putTemplateProgrammerProject(request);\n\n // TODO: test validations\n }", "public void validate(String id, String pw) throws RemoteException;", "public void testCheckinProjectFlags() {\n String[] sTestCmdLine = { \"soscmd\", \"-command\", \"CheckInProject\",\n \"-recursive\", \"-server\", SOS_SERVER_PATH, \"-name\", SOS_USERNAME,\n \"-password\", \"\", \"-database\", VSS_SERVER_PATH , \"-project\",\n \"$\"+VSS_PROJECT_PATH, \"\", \"\", \"-soshome\", SOS_HOME, \"-workdir\",\n project.getBaseDir().getAbsolutePath(), \"-log\", SRC_COMMENT, };\n\n // Set up a SOSCheckin task\n sosCheckin.setProject(project);\n sosCheckin.setVssServerPath(VSS_SERVER_PATH);\n sosCheckin.setSosServerPath(SOS_SERVER_PATH);\n sosCheckin.setProjectPath(VSS_PROJECT_PATH);\n sosCheckin.setComment(SRC_COMMENT);\n sosCheckin.setUsername(SOS_USERNAME);\n sosCheckin.setSosHome(SOS_HOME);\n sosCheckin.setNoCache(true);\n sosCheckin.setNoCompress(false);\n sosCheckin.setVerbose(false);\n sosCheckin.setRecursive(true);\n\n commandline = sosCheckin.buildCmdLine();\n String[] sGeneratedCmdLine = commandline.getCommandline();\n\n int i = 0;\n while (i < sTestCmdLine.length) {\n try {\n assertEquals(\"CheckInProject arg # \" + String.valueOf(i),\n sTestCmdLine[i],\n sGeneratedCmdLine[i]);\n i++;\n } catch (ArrayIndexOutOfBoundsException aioob) {\n fail(\"CheckInProject missing arg\");\n }\n\n }\n if (sGeneratedCmdLine.length > sTestCmdLine.length) {\n // We have extra elements\n fail(\"CheckInProject extra args\");\n }\n }", "@Test(groups = { \"wso2.esb\" }, description = \"agilezen {listProjects} integration test with mandatory parameters.\")\n public void testListProjectsWithMandatoryParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:listProjects\");\n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_listProjects_mandatory.json\");\n \n connectorProperties.setProperty(\"projectId\", esbRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0)\n .getString(\"id\"));\n \n final String apiEndPoint = apiRequestUrl + \"/projects\";\n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"page\"), apiRestResponse.getBody().getString(\"page\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"pageSize\"), apiRestResponse.getBody().getString(\n \"pageSize\"));\n Assert.assertEquals(esbRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0).getString(\"id\"),\n apiRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0).getString(\"id\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"totalItems\"), apiRestResponse.getBody().getString(\n \"totalItems\"));\n Assert.assertEquals(esbRestResponse.getBody().getJSONArray(\"items\").length(), apiRestResponse.getBody()\n .getJSONArray(\"items\").length());\n \n }" ]
[ "0.65769523", "0.63816416", "0.6199737", "0.59761405", "0.59368694", "0.5839368", "0.5567419", "0.54488504", "0.527746", "0.52685773", "0.5195171", "0.5161648", "0.51206905", "0.5089432", "0.50643146", "0.5059629", "0.5057854", "0.50335026", "0.4998055", "0.49727345", "0.4972389", "0.4957315", "0.49191728", "0.49184918", "0.49053478", "0.4905189", "0.48878652", "0.4878646", "0.48585176", "0.4847079", "0.4847079", "0.48303923", "0.48077723", "0.48058602", "0.48047128", "0.47996646", "0.47980225", "0.476472", "0.47630438", "0.47508025", "0.475032", "0.47500163", "0.47444096", "0.47344425", "0.47063488", "0.47047442", "0.47029513", "0.46958926", "0.46956486", "0.46882787", "0.4683544", "0.46657544", "0.4664292", "0.46636048", "0.46620858", "0.46541545", "0.4652064", "0.46444118", "0.4639281", "0.46384007", "0.46342343", "0.463301", "0.46284482", "0.462082", "0.46169397", "0.4613154", "0.46030325", "0.4596472", "0.4596067", "0.45866662", "0.45730188", "0.45692503", "0.456808", "0.45570433", "0.45542634", "0.4546817", "0.45377353", "0.45351306", "0.45342433", "0.4521675", "0.45205203", "0.451869", "0.4512759", "0.45110384", "0.45107248", "0.45095125", "0.45081636", "0.4507399", "0.45012647", "0.4495072", "0.4487303", "0.44853508", "0.44851595", "0.44843093", "0.44791296", "0.4477723", "0.44771564", "0.44756317", "0.4470055", "0.44677323", "0.44676253" ]
0.0
-1
Submit model for training Submit the model for training using the provided training data
public ModelApiResponse trainModel(String workspaceId, String modelId) throws ApiException { ApiResponse<ModelApiResponse> localVarResp = trainModelWithHttpInfo(workspaceId, modelId); return localVarResp.getData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "public void train(){\n recoApp.training(idsToTest);\n }", "private Response performDT_training(String model_name, String data) {\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MMM-yyyy_HmsS\");\n \tJSONObject summary = new JSONObject();\n \t\n \tif(model_name.trim().length()< 1) {\n \t\tmodel_name = \"DTree_Model_\" + sdf.format(Calendar.getInstance().getTime());\n \t}\n \t\n \t// check if the model name is already present\n \tif(utilObj.isModelNameUnique(model_name)) {\n \t\tsummary = new JSONObject();\n \t\tsummary.put(\"Error\", \"Duplicate model name : \" + model_name);\n \t\tlog.error(\"Duplicate model name\");\n \t\treturn Response.status(200).entity(summary.toString()).build();\n \t}\n \t\n \tlog.info(String.format(\"model_Name: %s\", model_name ));\n \tString modelFilePath = Util.CurrentDir+\"/models/\"+model_name;\n \t\n \ttry {\n\n \t\t// write the data to the disk\n \t\tfinal String inputFileName = \"TrainData_DT_\" + sdf.format(Calendar.getInstance().getTime()) + \".csv\";\n \t\tfinal String inputFilePath = Util.CurrentDir+\"/\"+Util.DataDir+\"/\"+inputFileName;\n \t\tFileWriter writer = new FileWriter(inputFilePath);\n \t\twriter.write(data);\n \t\twriter.flush();\n \t\twriter.close();\n \t\tlog.info(\"File created : \" + inputFilePath);\n \t\t\n \t\tString cmd = String.format(\"Rscript \"+Util.CurrentDir+\"/Rscripts/DTTraining.R %s %s \",inputFilePath, model_name);\n \t\tlog.info(cmd);\n\t \tProcess pr = Runtime.getRuntime().exec(cmd);\n\t\t\t\n\t\t\tBufferedReader results = new BufferedReader(new InputStreamReader(pr.getInputStream()));\n\t\t\tString line = null;\n\t\t\t\n\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\twhile((line=results.readLine()) != null) {\n\t\t\t\tbuf.append(line);\n\t\t\t\tif(line.trim().isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine().trim();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tsummary.put(\"summary\", line);\n\t\t\t\t} \n\t\t\t\telse if(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tJSONArray Psplits = new JSONArray();\t\t\t\t\t\n\t\t\t\t\twhile(!line.trim().equalsIgnoreCase(\"Surrogate splits:\")) {\n\t\t\t\t\t\tString s[] = line.split(\"\\t\");\n\t\t\t\t\t\tfor(String s1 : s) {\n\t\t\t\t\t\t\tSystem.out.println(s1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJSONArray splitCols = new JSONArray(s);\n\t\t\t\t\t\tline = results.readLine();\n\t\t\t\t\t\tbuf.append(line);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tsummary.put(\"model_name\", model_name + \".RData\");\n\t\t\t\tsummary.put(\"InputFile\", inputFileName);\n\t\t\t\tsummary.put(\"CommandName\", \"Rscripts/DTTraining.R\");\n\t\t\t}\n\t\t\tsummary.put(\"raw\", buf.toString());\n\t\t\t\n\t\t\t// format the summary json as params { [key : val] }\n\t\t\tJSONArray finalSummary = new JSONArray();\n\t\t\tIterator<String> keys = summary.keySet().iterator();\n\t\t\twhile(keys.hasNext()) {\n\t\t\t\tJSONObject row = new JSONObject();\n\t\t\t\trow.put(\"attribute\", keys.next());\n\t\t\t\trow.put(\"value\", summary.get(row.getString(\"attribute\")));\n\t\t\t\tfinalSummary.put(row);\n\t\t\t}\n\t\t\treturn Response.status(200).entity(new JSONObject().put(\"summary\", finalSummary).toString()).build();\n\t\t\t\n \t} catch (Exception e) {\n \t\te.printStackTrace();\n \t}\n\t\t\n \treturn Response.status(200).entity(summary.toString()).build();\n }", "void setTrainData(DataModel trainData);", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "public abstract void fit(BinaryData trainingData);", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "public void submit(Batch batch);", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "public void startTrainingMode() {\n\t\t\r\n\t}", "public void train() throws Exception;", "void applyForTraining(int studentId, int trainingId) throws ServiceException;", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate void buildAndSubmit() throws Exception\r\n {\r\n TopologyBuilder builder = new TopologyBuilder();\r\n builder.setSpout(RANDOM_SENTENCE_SPOUT_ID, new RandomSentenceSpout(), 1);\r\n builder.setBolt(KAFKA_BOLT_ID, new KafkaBolt(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n builder.setBolt(HBASE_UPDATE_BOLT_ID, HBaseUpdateBolt.make(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n \r\n Config conf = new Config(); \r\n conf.setDebug(false);\r\n \r\n StormSubmitter.submitTopology(\"jason-hbase-storm\", conf, builder.createTopology());\r\n }", "public void run() {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n LOG.error(\"Submit: {} - run {}/{}\", topologies.get(jobIndex).name, ((jobCounter - 1) % runs) + 1, runs);\n client.submitTopology(topologies.get(jobIndex), null);\n }", "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "void storeTraining(Training training);", "public void submitWorkTasks(WorkflowDefine workflowDefine) {\n\t\t\n\t\t\n\t}", "private void readModelAndTrain(boolean readExistingModel,\n\t\t\tbyte[] trainingDataFile) {\n\t\tInputStream dataIn = null;\n\t\ttry {\n\t\t\tObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(\n\t\t\t\t\tnew PlainTextByLineStream(new FileInputStream(\n\t\t\t\t\t\t\tcreateModelInput(INPUT_TWEETS_ORIG_TXT)), \"UTF-8\"));\n\t\t\tsetModel(DocumentCategorizerME.train(\"en\", sampleStream,\n\t\t\t\t\tCUTOFF_FREQ, TRAINING_ITERATIONS));\n\t\t\tserialize(model);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (dataIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "TrainingTest createTrainingTest();", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "public void submitMicrotask(Key<Microtask> microtaskKey, String jsonDTOData, String workerID, Project project){\n\t\tWorkerCommand.increaseStat(workerID, \"submits\",1);\n\t\tMicrotask microtask = ofy().load().key( microtaskKey ).now();\n\t\tif(microtask!=null){\t\t\t\n\t\t\t// submit only if the request come from\n\t\t\t// the current assigned worker of the microtask\n\t\t\tif(microtask.isAssignedTo(workerID) ){\t\t\n\t\t\t\t//boolean to signal if review microtask was created -> microtask is waiting review\n\t\t\t\tboolean waitReview = true;\n\t\t\t\t\n\t\t\t\t// If reviewing is enabled and the microtask\n\t\t\t\t// is not in [Review, ReuseSearch,DebugTestFailure],\n\t\t\t\t// spawn a new review microtask\n\t\t\t\tif (reviewsEnabled && !( microtask.getClass().equals(Review.class) || microtask.getClass().equals(ChallengeReview.class)) ){\n\t\t\t\t\tMicrotaskCommand.createReview(microtaskKey, workerID, jsonDTOData, workerID);\n\n\t\t\t\t}\n\t\t\t\t// else submit the microtask\n\t\t\t\telse {\n\t\t\t\t\tMicrotaskCommand.submit(microtaskKey, jsonDTOData, workerID, microtask.getSubmitValue());\n\t\t\t\t\twaitReview = false;\n\t\t\t\t}\n\n\t\t\t\tFirebaseService.writeMicrotaskWaitingReview(Microtask.keyToString(microtaskKey),workerID, this.id, waitReview);\n\t\t\t\t// write the history log entry about the microtask submission\n\t\t\t\tHistoryLog.Init(this.getID()).addEvent(new MicrotaskSubmitted(microtask, workerID));\n\t\t\t\tFirebaseService.writeMicrotaskSubmission(jsonDTOData, Microtask.keyToString(microtaskKey), this.id);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLogger.getLogger(\"LOGGER\").severe(\"LOAD FAILED: MICROTASK \"+microtaskKey);\n\t\t}\n\n\n\t}", "private void train(NeuralDataSet input) {\n\n\tfinal NeuralDataSet theInput = input;\n\tfinal VirtualLibraryButler that = this;\n\n\ttraining = new Thread() {\n\t public void run() {\n\n\t\torg.encog.util.logging.Logging.setConsoleLevel(Level.OFF);\n\n\t\tfinal Train train = new CompetitiveTraining(brain, 0.7,\n\t\t\ttheInput, new NeighborhoodGaussian(\n\t\t\t\tnew GaussianFunction(0.0, 5.0, 1.5)));\n\t\tStrategy smartLearn = new SmartLearningRate();\n\n\t\tsmartLearn.init(train);\n\t\ttrain.addStrategy(smartLearn);\n\n\t\tint epoch = 0;\n\t\tint errorSize = 250;\n\n\t\tdouble[] lastErrors = new double[errorSize];\n\n\t\t// training loop\n\t\tdo {\n\t\t train.iteration();\n\t\t // System.out.println(\"Epoch #\" + epoch + \" Error:\" +\n\t\t // train.getError()); // + \" MovingAvg:\" + movingAvg);\n\t\t lastErrors[epoch % errorSize] = train.getError();\n\n\t\t double avg = 0;\n\t\t for (int i = 0; (i < epoch) && (i < errorSize); ++i)\n\t\t\tavg = (avg * i + lastErrors[i]) / (i + 1);\n\n\t\t if (Math.abs(avg - train.getError()) < 0.01)\n\t\t\ttrain.setError(0.001);\n\n\t\t epoch++;\n\t\t} while (train.getError() > 0.01);\n\n\t\t// System.out.println(\"training complete.\");\n\n\t\tthat.initialized = true;\n\t }\n\t};\n\n\ttraining.start();\n }", "public String execute(String input) {\n Data data = Serializer.parse(input, Data.class);\n\n // Step #2: Check the discriminator\n final String discriminator = data.getDiscriminator();\n if (discriminator.equals(Discriminators.Uri.ERROR)) {\n // Return the input unchanged.\n return input;\n }\n\n // Create a series of pipes to process the training files\n ArrayList<Pipe> pipeList = new ArrayList<>();\n pipeList.add(new Input2CharSequence(\"UTF-8\"));\n // Pipes: lowercase, tokenize, remove stopwords, map to features\n pipeList.add( new CharSequenceLowercase() );\n pipeList.add( new CharSequence2TokenSequence(Pattern.compile(\"\\\\p{L}[\\\\p{L}\\\\p{P}]+\\\\p{L}\")) );\n pipeList.add( new TokenSequenceRemoveStopwords());\n pipeList.add( new TokenSequence2FeatureSequence());\n pipe = new SerialPipes(pipeList);\n\n // put the directory of files used for training through the pipes\n String directory = data.getParameter(\"directory\").toString();\n InstanceList instances = readDirectory(new File(directory));\n\n // create a topic to be trained\n int numberOfTopics = (Integer) data.getParameter(\"numTopics\");\n ParallelTopicModel topicModel = new ParallelTopicModel(numberOfTopics);\n topicModel.addInstances(instances);\n\n // train the model\n try {\n topicModel.estimate();\n } catch (IOException e){\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to train the model\").asJson();\n }\n\n // write topic keys file\n String path = data.getParameter(\"path\").toString();\n String keysName = data.getParameter(\"keysName\").toString();\n int wordsPerTopic = (Integer) data.getParameter(\"wordsPerTopic\");\n try {\n topicModel.printTopWords(new File(path + \"/\" + keysName), wordsPerTopic, false);\n } catch (IOException e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the topic keys to \" + path + \"/\" + keysName).asJson();\n }\n\n // write the .inferencer file\n String inferencerName = data.getParameter(\"inferencerName\").toString();\n try {\n ObjectOutputStream oos =\n new ObjectOutputStream (new FileOutputStream (path + \"/\" + inferencerName));\n oos.writeObject (topicModel.getInferencer());\n oos.close();\n } catch (Exception e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the inferencer to \" + path + \"/\" + inferencerName).asJson();\n }\n\n // Success\n return new Data<>(Discriminators.Uri.TEXT, \"Success\").asJson();\n }", "public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public void train(Collection<TrainingEntry<Login>> trainingDataSet) throws TrainingException {\n if (trainingDataSet.isEmpty()) return;\n try {\n final DataSet dataSet = toDataSet(trainingDataSet);\n normalizer = new NormalizerStandardize();\n normalizer.fit(dataSet);\n normalizer.transform(dataSet);\n final DataSetIterator dataSetIterator = new ExistingDataSetIterator(dataSet);\n final MultiLayerConfiguration configuration = new NeuralNetConfiguration.Builder()\n .seed(6)\n .iterations(1)\n .activation(\"tanh\")\n .weightInit(WeightInit.XAVIER)\n .learningRate(0.1)\n .regularization(true).l2(1e-4)\n .list()\n .layer(0, new DenseLayer.Builder()\n .nIn(getNumberOfInputFeatures(trainingDataSet))\n .nOut(9)\n .build())\n .layer(1, new DenseLayer.Builder()\n .nIn(9)\n .nOut(9)\n .build())\n .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(\"softmax\")\n .nIn(9)\n .nOut(NUM_CATEGORIES).build())\n .backprop(true).pretrain(false)\n .build();\n network = new MultiLayerNetwork(configuration);\n final EarlyStoppingConfiguration esConf = new EarlyStoppingConfiguration.Builder()\n .epochTerminationConditions(new MaxEpochsTerminationCondition(20))\n .iterationTerminationConditions(new MaxTimeIterationTerminationCondition(20, TimeUnit.MINUTES))\n .scoreCalculator(new DataSetLossCalculator(dataSetIterator, true))\n .evaluateEveryNEpochs(1)\n .modelSaver(new InMemoryModelSaver())\n .build();\n final EarlyStoppingTrainer trainer = new EarlyStoppingTrainer(esConf, network, dataSetIterator);\n final EarlyStoppingResult<MultiLayerNetwork> result = trainer.fit();\n network = result.getBestModel();\n } catch (final Exception e) {\n throw new TrainingException(e);\n }\n }", "public static void main(String[] args) {\n String pathToTrain = \"train.csv\";\n String pathToTest = \"test.csv\";\n try {\n ArrayList<String> trainSentences = readCSV(pathToTrain);\n trainSentences.remove(0);\n ArrayList<String> testSentences = readCSV(pathToTest);\n testSentences.remove(0);\n\n ArrayList<String[]> trainWords = preprocess(trainSentences);\n NaiveBayesClassifier model = new NaiveBayesClassifier();\n model.fit(trainWords);\n\n ArrayList<String[]> testWords = preprocess(testSentences);\n double accuracy = evaluate(testWords, model);\n model.writeParams(\"params.json\");\n System.out.printf(\"Accuracy of the model is: %.4f%n\", accuracy);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void saveTrainingDataToFileUpSampling() throws Exception {\r\n //set tokenizer - we can specify n-grams for classification\r\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n for (int k = 0; k < 5; k++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n }\r\n }\r\n }\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n Random r = new Random();\r\n dataFiltered.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataFiltered);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public IObserver train(IContext context) throws ThinklabException;", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.train(groupid_long, TRAIN_TYPE.all );\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsessionId = result.data+\"\";\n\t\t\t\t Log.e(TAG,sessionId);\n\t\t\t}", "private static native boolean train_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj);", "private String train(float[][][] features, float[] label, int epochs){\n org.tensorflow.Tensor x_train = Tensor.create(features);\n Tensor y_train = Tensor.create(label);\n int ctr = 0;\n while (ctr < epochs) {\n sess.runner().feed(\"input\", x_train).feed(\"target\", y_train).addTarget(\"train_op\").run();\n ctr++;\n }\n return \"Model Trained\";\n }", "public void updateDataModel() {\n //this.dataModel = new TelemetryChartDataModel();\n this.dataModel.\n setModel(getStartDate(), getEndDate(), selectedProjects, telemetryName, parameters);\n Thread thread = new Thread() {\n @Override\n public void run() {\n dataModel.loadData();\n }\n };\n thread.start();\n }", "public void train ()\t{\t}", "public void trainData() throws IOException {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttestingFold = i;\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Training Tree-Augmented Naive Bayes for writing Fold\");\n\t\t\t}\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Calculating Class Priors across Data set.\\n\");\n\t\t\t}\n\t\t\tbuildPriors();\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Priors built.\\n Discretizing data into Naive Bin Estimator...\\n\" +\n\t\t\t\t\t\t\"Generating Completed Graph...\\nWeighting Edges...\\n\");\n\t\t\t}\n\t\t\tdiscretizeData();\n\t\t\ttest();\n\t\t}\n\n\t}", "public void saveModel(File model_file) throws Exception{\n\t\t// Write model to file\n\t\t//System.out.println(mClassifier.getClass());\n\t\tSystem.out.println(\"Saving Trained Model. Please wait.\");\n\t\tif(mClassifier instanceof DynamicLMClassifier){\n\t\t\tFileOutputStream fileOut = new FileOutputStream(model_file);\n\t ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n\t ((DynamicLMClassifier<NGramProcessLM>) mClassifier).compileTo(objOut);\n\t objOut.close();\n\t System.out.println(\"Saving Trained Model. Complete.\");\n\t\t}else{\n\t\t\tthrow new Exception(\"Cannot compile a non dynamic traning set\");\n\t\t}\n\t}", "public void run(JavaSparkContext jsc, String trainingDataPath) throws IOException {\n if (trainingDataPath == null) {\n upload(jsc);\n return;\n }\n\n JavaPairRDD<String, String> docLoad;\n if (trainingDataPath.isEmpty()) {\n docLoad = load(jsc);\n } else {\n String docDelimiter = StringEscapeUtils.unescapeJava(conf.get(DOC_DELIMITER));\n docLoad = new HDFSRead().loadTextFile(jsc, trainingDataPath).mapToPair(line -> new Tuple2<>(line.split(docDelimiter)[0], line.split(docDelimiter)[1]));\n\n }\n\n JavaPairRDD<String, Tuple2<String, String>> docDownload = download(docLoad);\n JavaPairRDD<String, Tuple2<String, String>> docClean = clean(docDownload);\n save(docClean);\n }", "public void upload(JavaSparkContext jsc) throws IOException {\n int partitions = conf.getInt(PARTITIONS, 48);\n String docDelimiter = StringEscapeUtils.unescapeJava(conf.get(DOC_DELIMITER));\n\n /* load training data */\n List<String> resource = IOUtils\n .readLines(getClass().getClassLoader().getResourceAsStream(conf.get(TRAININGDATA_RESOURCE)));\n\n Broadcast<List<String>> broadcastRes = jsc.broadcast(resource);\n\n JavaPairRDD<String, Tuple2<String, String>> doc = jsc\n .parallelize(broadcastRes.value())\n .persist(StorageLevel.MEMORY_AND_DISK_SER_2())\n .repartition(partitions)\n .filter(line -> line.split(docDelimiter).length >= 2)\n .mapToPair(line -> new Tuple2<>(line.split(docDelimiter)[0],\n new Tuple2<>(line.split(docDelimiter)[1], line.split(docDelimiter)[2])));\n /* save */\n save(doc);\n }", "public void actionTrain(Train t) {\n\t\t\t t.setVitesseScalaire(vitesse);\n\t\t}", "private synchronized void downloadModel(String modelName) {\n final FirebaseCustomRemoteModel remoteModel =\n new FirebaseCustomRemoteModel\n .Builder(modelName)\n .build();\n FirebaseModelDownloadConditions conditions =\n new FirebaseModelDownloadConditions.Builder()\n .requireWifi()\n .build();\n final FirebaseModelManager firebaseModelManager = FirebaseModelManager.getInstance();\n firebaseModelManager\n .download(remoteModel, conditions)\n .continueWithTask(task ->\n firebaseModelManager.getLatestModelFile(remoteModel)\n )\n .continueWith(executorService, (Continuation<File, Void>) task -> {\n // Initialize a text classifier instance with the model\n File modelFile = task.getResult();\n\n // TODO 6: Initialize a TextClassifier with the downloaded model\n textClassifier = NLClassifier.createFromFile(modelFile);\n\n // Enable predict button\n predictButton.setEnabled(true);\n return null;\n })\n .addOnFailureListener(e -> {\n Log.e(TAG, \"Failed to download and initialize the model. \", e);\n Toast.makeText(\n MainActivity.this,\n \"Model download failed, please check your connection.\",\n Toast.LENGTH_LONG)\n .show();\n predictButton.setEnabled(false);\n });\n }", "public void applyModel(ScServletData data, Object model)\n {\n }", "public void evaluate(String sampleFile, String validationFile, String featureDefFile, double percentTrain) {\n/* 761 */ List<RankList> trainingData = new ArrayList<>();\n/* 762 */ List<RankList> testData = new ArrayList<>();\n/* 763 */ int[] features = prepareSplit(sampleFile, featureDefFile, percentTrain, normalize, trainingData, testData);\n/* 764 */ List<RankList> validation = null;\n/* */ \n/* */ \n/* 767 */ if (!validationFile.isEmpty()) {\n/* */ \n/* 769 */ validation = readInput(validationFile);\n/* 770 */ if (normalize) {\n/* 771 */ normalize(validation, features);\n/* */ }\n/* */ } \n/* 774 */ RankerTrainer trainer = new RankerTrainer();\n/* 775 */ Ranker ranker = trainer.train(this.type, trainingData, validation, features, this.trainScorer);\n/* */ \n/* 777 */ double rankScore = evaluate(ranker, testData);\n/* */ \n/* 779 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 780 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 782 */ System.out.println(\"\");\n/* 783 */ ranker.save(modelFile);\n/* 784 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "@Override\n public void Submit() {\n }", "public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void trainModel(List<BugReport> brs){\r\n\t\t\r\n\t\tdouble startTime = System.currentTimeMillis();\r\n\t\tthis.initializeModel(brs);\r\n\t\tthis.inferenceModel(brs);\r\n\t\tdouble endTime = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"LDA training time cost: \"+(endTime-startTime)/1000.0);\r\n\t\t\r\n\t}", "public void saveTrainingDataToFileHybridSampling1() throws Exception {\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n //up sampling using SMOTE\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n //downsampling using ?? \r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n /**\r\n * Resamples a dataset by applying the Synthetic Minority Oversampling\r\n * TEchnique (SMOTE)\r\n * http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume16/chawla02a-html/node6.html\r\n * http://weka.sourceforge.net/doc.packages/SMOTE/weka/filters/supervised/instance/SMOTE.html \r\n *\r\n */\r\n SMOTE s = new SMOTE();\r\n s.setInputFormat(dataFiltered);\r\n // Specifies percentage of SMOTE instances to create.\r\n s.setPercentage(300.0);//464\r\n Instances dataBalanced = Filter.useFilter(dataFiltered, s);\r\n\r\n Random r = new Random();\r\n dataBalanced.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataBalanced);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataHybridRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public static void main(String[] args) throws IOException {\n String dataName = \"Dianping\";\n String fileName = \"checkin_pitf\";\n int coreNum = 1;\n// List<Post> trainPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/all_id_core\"+coreNum+\"_train\");\n// List<Post> testPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/all_id_core\"+coreNum+\"_test\");\n List<Post> trainPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/\"+fileName+\"_train\");\n List<Post> testPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/\"+fileName+\"_test\");\n\n System.out.println(\"PITFTest\");\n System.out.println(dataName+\" \"+coreNum);\n int dim = 64;\n double initStdev = 0.01;\n int iter = 20;//100\n double learnRate = 0.05;\n double regU = 0.00005;\n double regI = regU, regT = regU;\n int numSample = 100;\n int randomSeed = 1;\n\n PITF pitf = new PITF(trainPosts, testPosts, dim, initStdev, iter, learnRate, regU, regI, regT, randomSeed, numSample);\n pitf.run();//这个函数会调用model的初始化及创建函数\n System.out.println(\"dataName:\\t\" + dataName);\n System.out.println(\"coreNum:\\t\" + coreNum);\n }", "public String trainmodelandclassify(Attribute at) throws Exception {\n\t\tif(at.getAge()>=15 && at.getAge()<=25)\n\t\t\tat.setAgegroup(\"15-25\");\n\t\tif(at.getAge()>=26 && at.getAge()<=45)\n\t\t\tat.setAgegroup(\"25-45\");\n\t\tif(at.getAge()>=46 && at.getAge()<=65)\n\t\t\tat.setAgegroup(\"45-65\");\n\t\t\n\t\t\n\t\t\n\t\t//loading the training dataset\n\t\n\tDataSource source=new DataSource(\"enter the location of your .arff file for training data\");\n\tSystem.out.println(source);\n\tInstances traindataset=source.getDataSet();\n\t//setting the class index (which would be one less than the number of attributes)\n\ttraindataset.setClassIndex(traindataset.numAttributes()-1);\n\tint numclasses=traindataset.numClasses();\n for (int i = 0; i < numclasses; i++) {\n \tString classvalue=traindataset.classAttribute().value(i);\n \tSystem.out.println(classvalue);\n\t\t\n\t}\n //building the classifier\n NaiveBayes nb= new NaiveBayes();\n nb.buildClassifier(traindataset);\n System.out.println(\"model trained successfully\");\n \n //test the model\n\tDataSource testsource=new DataSource(\"enter the location of your .arff file for test data\");\n\tInstances testdataset=testsource.getDataSet();\n\t\n\tFileWriter fwriter = new FileWriter(\"enter the location of your .arff file for test data\",true); //true will append the new instance\n\tfwriter.write(System.lineSeparator());\n\tfwriter.write(at.getAgegroup()+\",\"+at.getGender()+\",\"+at.getProfession()+\",\"+\"?\");//appends the string to the file\n\tfwriter.close();\n\ttestdataset.setClassIndex(testdataset.numAttributes()-1);\n\t//looping through the test dataset and making predictions\n\tfor (int i = 0; i < testdataset.numInstances(); i++) {\n\t\tdouble classvalue=testdataset.instance(i).classValue();\n\t\tString actualclass=testdataset.classAttribute().value((int)classvalue);\n\t\tInstance instance=testdataset.instance(i);\n\t\tdouble pclassvalue=nb.classifyInstance(instance);\n\t\tString pclass=testdataset.classAttribute().value((int)pclassvalue);\n\t\tSystem.out.println(actualclass+\" \"+ pclass);\n\t\n}\n\tdouble classval=testdataset.instance(testdataset.numInstances()-1).classValue();\n\tInstance ins=testdataset.lastInstance();\n\tdouble pclassval=nb.classifyInstance(ins);\n\tString pclass=testdataset.classAttribute().value((int)pclassval);\n\tSystem.out.println(pclass);\n\t\n\treturn pclass;\n}", "private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}", "@Test\n @Ignore\n public void testSubmit() {\n System.out.println(\"submit\");\n String sub = \"\";\n String obj = \"\";\n String rid = \"\";\n String pmid = \"\";\n String doi = \"\";\n String pdate = \"\";\n String inst = \"\";\n HttpServletResponse response = null;\n HomeController instance = new HomeController();\n instance.submit(sub, obj, rid, pmid, doi, pdate, inst, response);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}", "private void trainFeatures() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.FEATURE);\n\t\tSystem.out.println(\"Starting reading Feature Trainingset ..\");\n\t\tPipe serialpipe = getFeaturePipe();\n\t\tInstanceList feature_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Feature Trainingset ..\");\n\t\tfeature_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Feature Training set : \" + feature_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(feature_instances, Train + \"F.bin\");\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\tfeature_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"feature.dat\")));\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Feature training set ..\");\n\t\tClassifier classifier = trainer.train(feature_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Feature_Train);\n\t\tSystem.out.println(\"Feature classifier saved to : \" + Feature_Train);\n\t}", "public void saveTraining(File datum) throws IOException, FileNotFoundException {\n bp.writer(datum);\n }", "public void run() {\n\n // Initialize control center.\n\n control = new Dispatch(parameters);\n control.run();\n linked = control.gettasks();\n\n // Initialize trains.\n\n trains = new TrainSim[parameters.numTrains];\n\n for (int i = 0; i < parameters.numTrains; i++) {\n\n trains[i] = new TrainSim(parameters, i);\n trains[i].genbasis();\n\n }\n\n // Add linked tasks to trains.\n\n for (Task each : linked) {\n\n int trainid = each.getTrain();\n each = new Task(each.getType(), each.getBeginTime(), parameters, false);\n each.setID(trainid);\n if (each.getArrTime() < parameters.numHours*60) {\n trains[trainid].linktask(each);\n }\n }\n\n // Run each train\n\n for (TrainSim each : trains) {\n\n each.run();\n\n }\n\n }", "public boolean save(Data model);", "public void submitOrder() throws BackendException;", "private static native boolean train_auto_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj, int k_fold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);", "public void fit(double[][] trainingData, int[][] trainingLabels) {\n\t}", "private void train(int[] trainingData, int[] trainingLabel) {\n\t\t// forward Propagation\n\t\tdouble[] activationsOfHiddenLayer = new double[SIZE_HIDDEN_LAYER];\n\t\tdouble[] outputActivations = new double[SIZE_OUTPUT_LAYER];\n\t\tforwardPropagation(trainingData, activationsOfHiddenLayer, outputActivations);\n\t\t// backward Propagation\n\t\tbackwardPropagation(trainingData, trainingLabel, outputActivations, activationsOfHiddenLayer);\n\t}", "DataWrapper submit(Long projectId);", "public static void main(String[] args) throws Exception {\n Path modelPath = Paths.get(\"saved_graph_file\");\n byte[] graph = Files.readAllBytes(modelPath);\n\n // SavedModelBundle svd = SavedModelBundle.load(\"gin_rummy_nfsp4\", \"serve\");\n // System.out.println(svd.metaGraphDef());\n\n Graph g = new Graph();\n\n g.importGraphDef(graph);\n\n // Print for tags.\n Iterator<Operation> ops = g.operations();\n while (ops.hasNext()) {\n Operation op = ops.next();\n // Types are: Add, Const, Placeholder, Sigmoid, MatMul, Identity\n if (op.type().equals(\"Placeholder\")) {\n System.out.println(\"Type: \" + op.type() + \", Name: \" + op.name() + \", NumOutput: \" + op.numOutputs());\n System.out.println(\"OUTPUT: \" + op.output(0).shape());\n }\n }\n\n //open session using imported graph\n Session sess = new Session(g);\n float[][] inputData = {{4, 3, 2, 1}};\n\n // We have to create tensor to feed it to session,\n // unlike in Python where you just pass Numpy array\n Tensor inputTensor = Tensor.create(inputData, Float.class);\n float[][] output = predict(sess, inputTensor);\n for (int i = 0; i < output[0].length; i++) {\n System.out.println(output[0][i]);\n }\n }", "private void trainText() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.TEXT);\n\t\tSystem.out.println(\"Starting reading Text Trainingset ..\");\n\n\t\tPipe serialpipe = getTextPipe();\n\t\tInstanceList text_instances = new InstanceList(serialpipe);\n\n\t\tSystem.out.println(\"Preprocessing on Text Trainingset ..\");\n\t\ttext_instances.addThruPipe(dbiterator);\n\n\t\tSystem.out.println(\"Text Training set : \" + text_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(text_instances, Train + \"T.bin\");\n\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\ttext_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"text.dat\")));\n\n\t\tNaiveBayesTrainer trainer = new NaiveBayesTrainer();\n\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Text training set ..\");\n\t\tNaiveBayes classifier = trainer.train(text_instances);\n\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Text_Train);\n\t\tSystem.out.println(\"Text classifier saved to : \" + Text_Train);\n\t}", "public void doneClassifying() {\n\t\tbinaryTrainClassifier = trainFactory.trainClassifier(binaryTrainingData);\n\t\tmultiTrainClassifier = testFactory.trainClassifier(multiTrainingData);\n\t\tLinearClassifier.writeClassifier(binaryTrainClassifier, BINARY_CLASSIFIER_FILENAME);\n\t\tLinearClassifier.writeClassifier(multiTrainClassifier, MULTI_CLASSIFIER_FILENAME);\n\t}", "public void train (String trainingCollection) throws IOException {\n\t\tDocumentCollection trainCol = new DocumentCollection(trainingCollection);\n\t\ttrainCol.open();\n\t\tfor (int i=0; i<trainCol.size(); i++) {\n\t\t\tExternalDocument doc = trainCol.get(i);\n\t\t\ttrain (doc);\n\t\t}\n\t}", "public boolean train_auto(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params, int k_fold, CvParamGrid Cgrid, CvParamGrid gammaGrid, CvParamGrid pGrid, CvParamGrid nuGrid, CvParamGrid coeffGrid, CvParamGrid degreeGrid, boolean balanced)\r\n {\r\n\r\n boolean retVal = train_auto_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj, k_fold, Cgrid.nativeObj, gammaGrid.nativeObj, pGrid.nativeObj, nuGrid.nativeObj, coeffGrid.nativeObj, degreeGrid.nativeObj, balanced);\r\n\r\n return retVal;\r\n }", "public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }", "@Override\n\tprotected void prepareForSubmit() throws WorkflowException {\n\n\t}", "public void submit(Batch batch, BatchOperation opFilter);", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "public boolean train(Mat trainData, Mat responses)\r\n {\r\n\r\n boolean retVal = train_1(nativeObj, trainData.nativeObj, responses.nativeObj);\r\n\r\n return retVal;\r\n }", "public void kirimNotifikasiPengajuan(Training training){\n\t\t\n\t}", "public boolean train(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n boolean retVal = train_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj);\r\n\r\n return retVal;\r\n }", "public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;", "public void model() \n\t{\n\t\t\n\t\ttry \n\t\t{\n\t\t GRBEnv env = new GRBEnv();\n\t\t GRBModel model = new GRBModel(env, \"resources/students.lp\");\n\n\t\t model.optimize();\n\n\t\t int optimstatus = model.get(GRB.IntAttr.Status);\n\n\t\t if (optimstatus == GRB.Status.INF_OR_UNBD) {\n\t\t model.getEnv().set(GRB.IntParam.Presolve, 0);\n\t\t model.optimize();\n\t\t optimstatus = model.get(GRB.IntAttr.Status);\n\t\t }\n\n\t\t if (optimstatus == GRB.Status.OPTIMAL) {\n\t\t double objval = model.get(GRB.DoubleAttr.ObjVal);\n\t\t System.out.println(\"Optimal objective: \" + objval);\n\t\t } else if (optimstatus == GRB.Status.INFEASIBLE) {\n\t\t System.out.println(\"Model is infeasible\");\n\n\t\t // Compute and write out IIS\n\t\t model.computeIIS();\n\t\t model.write(\"model.ilp\");\n\t\t } else if (optimstatus == GRB.Status.UNBOUNDED) {\n\t\t System.out.println(\"Model is unbounded\");\n\t\t } else {\n\t\t System.out.println(\"Optimization was stopped with status = \"\n\t\t + optimstatus);\n\t\t }\n\n\t\t // Dispose of model and environment\n\t\t model.write(\"resources/model.sol\");\n\t\t model.dispose();\n\t\t env.dispose();\n\n\t\t } catch (GRBException e) {\n\t\t System.out.println(\"Error code: \" + e.getErrorCode() + \". \" +\n\t\t e.getMessage());\n\t\t }\n\t\t\n\t}", "public void train(Corpus[] trainingData) {\n\t\tSet<String> vocabulary = super.mergeVocabulary(trainingData);\n\t\ttrainingData[0].setVocabulary(vocabulary);\n\t\ttrainingData[1].setVocabulary(vocabulary);\n\t\tposMatrix = new TransitionMatrix(trainingData[0]);\n\t\tnegMatrix = new TransitionMatrix(trainingData[1]);\n\t}", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifierObject = ObjectClassifier.create(context.getAssets(), TYPE_MODEL, LABEL_TYPE, INPUT_SIZE_TYPE);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public void train(DoubleDataTable trainTable, Progress prog) throws InterruptedException\n\t{\n \tif (m_ClassifierTypes.size()==0)\n \t{\n \t\tprog.set(\"Training classifiers\", 1);\n \t\tprog.step();\n \t\treturn;\n \t}\n \tint[] progressVolumes = new int[m_ClassifierTypes.size()];\n \tprogressVolumes[0] = 100/progressVolumes.length;\n \tfor (int i = 1; i < progressVolumes.length; i++)\n \t\tprogressVolumes[i] = 100*(i+1)/progressVolumes.length-progressVolumes[i-1];\n \tprog = new MultiProgress(\"Training classifiers\", prog, progressVolumes);\n\t\tfor (Map.Entry<String,Class> cl : m_ClassifierTypes.entrySet())\n\t\t{\n\t\t\tm_Classifiers.remove(cl.getKey());\n\t\t\ttry\n\t\t\t{\n\t\t\t\tClass classifierClass = cl.getValue();\n\t\t\t\tProperties prop = m_ClassifierProperties.get(cl.getKey());\n\t\t\t\tClassifier classifier = ClassifierFactory.createClassifier(classifierClass, prop, trainTable, prog);\n\t\t\t\tm_Classifiers.put(cl.getKey(), classifier);\n\t\t\t}\n\t\t\tcatch (InvocationTargetException e)\n\t\t\t{\n\t\t\t\tif (e.getTargetException() instanceof BadHeaderException)\n\t\t\t\t\tReport.displaynl(cl.getKey()+\" not trained: \"+e.getTargetException().getMessage());\n\t\t\t\telse Report.exception((Exception)e.getTargetException());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tReport.exception(e);\n\t\t\t}\n\t\t}\n\t}", "private void runOnlineModel() {\n myScenario.setProbe(myProbe);\n myScenario.setSynchronizationMode(mySrcSelector);\n try {\n myScenario.resync();\n myScenario.run();\n } catch (SynchronizationException e) {\n System.out.println(e);\n } catch (ModelException e) {\n System.out.println(e);\n }\n }", "void submit(Token token, OMMMsg encmsg);", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "public void submit(Task task) {\n\t\tthis.engine.pushTask(task);\n\t}", "public static void main(String[] args) throws Exception {\n final int numRows = 28;\n final int numColumns = 28;\n int outputNum = 10; // number of output classes\n int batchSize = 128; // batch size for each epoch\n int rngSeed = 123; // random number seed for reproducibility\n int numEpochs = 15; // number of epochs to perform\n String modelPath = \"モデルパスを入力\";\n\n //Get the DataSetIterators:\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\n\n\n System.out.println(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(rngSeed) //include a random seed for reproducibility\n // use stochastic gradient descent as an optimization algorithm\n .updater(new Nesterovs(0.006, 0.9))\n .l2(1e-4)\n .list()\n .layer(new DenseLayer.Builder() //create the first, input layer with xavier initialization\n .nIn(numRows * numColumns)\n .nOut(1000)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .build())\n .layer(new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\n .nIn(1000)\n .nOut(outputNum)\n .activation(Activation.SOFTMAX)\n .weightInit(WeightInit.XAVIER)\n .build())\n .build();\n\n\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n //print the score with every 1 iteration\n UIServer uiServer = UIServer.getInstance();\n InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n model.setListeners(new StatsListener(statsStorage),new ScoreIterationListener(1));\n\n System.out.println(\"Train model....\");\n model.fit(mnistTrain, numEpochs);\n\n\n\n\n System.out.println(\"Evaluate model....\");\n Evaluation eval = model.evaluate(mnistTest);\n System.out.println(eval.stats());\n ModelSerializer.writeModel(model, new File(modelPath), false);\n System.out.println(\"****************Example finished********************\");\n\n }", "private void train(float[] inputs, int desired) {\r\n int guess = feedforward(inputs);\r\n float error = desired - guess;\r\n for (int i = 0; i < weights.length; i++) {\r\n weights[i] += c * error * inputs[i];\r\n }\r\n }", "public okhttp3.Call addTrainingDataAsync(String workspaceId, String modelId, TrainingData trainingData, final ApiCallback<ModelApiResponse> _callback) throws ApiException {\n\n okhttp3.Call localVarCall = addTrainingDataValidateBeforeCall(workspaceId, modelId, trainingData, _callback);\n Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();\n localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);\n return localVarCall;\n }", "public void submit() {\n fileUploadContainer.upload.submit();\n }", "public void run() throws Exception {\r\n\r\n\r\n LibSVM svm = new LibSVM();\r\n String svmOptions = \"-S 0 -K 2 -C 8 -G 0\"; //Final result: [1, -7 for saveTrainingDataToFileHybridSampling2 ]\r\n svm.setOptions(weka.core.Utils.splitOptions(svmOptions));\r\n System.out.println(\"SVM Type and Keranl Type= \" + svm.getSVMType() + svm.getKernelType());//1,3 best result 81%\r\n // svm.setNormalize(true);\r\n\r\n\r\n// load training data from .arff file\r\n ConverterUtils.DataSource source = new ConverterUtils.DataSource(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\");\r\n System.out.println(\"\\n\\nLoaded data:\\n\\n\" + source.getDataSet());\r\n Instances dataFiltered = source.getDataSet();\r\n dataFiltered.setClassIndex(0);\r\n\r\n // gridSearch(svm, dataFiltered);\r\n Evaluation evaluation = new Evaluation(dataFiltered);\r\n evaluation.crossValidateModel(svm, dataFiltered, 10, new Random(1));\r\n System.out.println(evaluation.toSummaryString());\r\n System.out.println(evaluation.weightedAreaUnderROC());\r\n double[][] confusionMatrix = evaluation.confusionMatrix();\r\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n System.out.print(confusionMatrix[i][j] + \" \");\r\n\r\n }\r\n System.out.println();\r\n }\r\n System.out.println(\"accuracy for crime class= \" + (confusionMatrix[0][0] / (confusionMatrix[0][1] + confusionMatrix[0][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for other class= \" + (confusionMatrix[1][1] / (confusionMatrix[1][1] + confusionMatrix[1][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for crime class= \" + evaluation.truePositiveRate(0) + \"%\");\r\n System.out.println(\"accuracy for other class= \" + evaluation.truePositiveRate(1) + \"%\");\r\n\r\n\r\n }", "public void dmall() {\n \r\n BufferedReader datafile = readDataFile(\"Work//weka-malware.arff\");\r\n \r\n Instances data = null;\r\n\t\ttry {\r\n\t\t\tdata = new Instances(datafile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n data.setClassIndex(data.numAttributes() - 1);\r\n \r\n // Choose a type of validation split\r\n Instances[][] split = crossValidationSplit(data, 10);\r\n \r\n // Separate split into training and testing arrays\r\n Instances[] trainingSplits = split[0];\r\n Instances[] testingSplits = split[1];\r\n \r\n // Choose a set of classifiers\r\n Classifier[] models = { new J48(),\r\n new DecisionTable(),\r\n new DecisionStump(),\r\n new BayesianLogisticRegression() };\r\n \r\n // Run for each classifier model\r\n//for(int j = 0; j < models.length; j++) {\r\n int j = 0;\r\n \tswitch (comboClassifiers.getSelectedItem().toString()) {\r\n\t\t\tcase \"J48\":\r\n\t\t\t\tj = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionTable\":\r\n\t\t\t\tj = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionStump\":\r\n\t\t\t\tj = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"BayesianLogisticRegression\":\r\n\t\t\t\tj = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n \t\r\n\r\n // Collect every group of predictions for current model in a FastVector\r\n FastVector predictions = new FastVector();\r\n \r\n // For each training-testing split pair, train and test the classifier\r\n for(int i = 0; i < trainingSplits.length; i++) {\r\n Evaluation validation = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvalidation = simpleClassify(models[j], trainingSplits[i], testingSplits[i]);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n predictions.appendElements(validation.predictions());\r\n \r\n // Uncomment to see the summary for each training-testing pair.\r\n// textArea.append(models[j].toString() + \"\\n\");\r\n textArea.setText(models[j].toString() + \"\\n\");\r\n// System.out.println(models[j].toString());\r\n }\r\n \r\n // Calculate overall accuracy of current classifier on all splits\r\n double accuracy = calculateAccuracy(predictions);\r\n \r\n // Print current classifier's name and accuracy in a complicated, but nice-looking way.\r\n textArea.append(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\\n\");\r\n System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\");\r\n//}\r\n \r\n\t}", "public static void main (String [] args) throws Exception { \n//\t\tconf.setMapperClass(DadaMapper.class);\n//\t\tconf.setReducerClass(DataReducer.class);\n\t\t\n//\t\tConfiguration conf = new Configuration(); \n//\t\tconf.set(\"fs.default.name\", \"hdfs://zli:9000\"); \n//\t\tconf.set(\"hadoop.job.user\", \"hadoop\"); \t\t \n//\t\tconf.set(\"mapred.job.tracker\", \"zli:9001\");\n\t\t\n\t\tJob job = new Job(); \n\t\tjob.setJarByClass(NBModelTestJob.class);\n\t\tjob.getConfiguration().set(\"fs.defaultFS\", \"hdfs://NYSJHL101-142.opi.com:8020\"); \n\t\tjob.getConfiguration().set(\"hadoop.job.user\", \"hdfs\"); \t\t \n\t\tjob.getConfiguration().set(\"mapred.job.tracker\", \"NYSJHL101-144.opi.com:8021\");\n\t\tjob.getConfiguration().set(\"trainpath\", args[0]);\n\t\tFileInputFormat.addInputPath(job, new Path(args[1]));\n\t\tFileOutputFormat.setOutputPath(job, new Path(args[2]));\n\t\tFileSystem hdfs = FileSystem.get(job.getConfiguration());\n\t\t\t\t\n\t\tjob.setMapperClass(DataMapper.class);\n\t\tjob.setReducerClass(DataReducer.class);\n\t\tjob.setCombinerClass(DataCombiner.class);\n\t\tjob.setOutputKeyClass(Text.class);\n\t\tjob.setOutputValueClass(Text.class);\n\t\tjob.setNumReduceTasks(10);\n\t\t\n\t\tSystem.exit(job.waitForCompletion(true) ? 0 : 1);\n\t\t\n\t}", "private void dataSubmission() {\n getPreferences(); // reload all the data\n\n String jsonObjectString = createJsonObject();\n StringBuilder url = new StringBuilder();\n url.append(serverUrl);\n\n if (vslaName == null || numberOfCycles == null || representativeName == null || representativePost == null\n || repPhoneNumber == null || grpBankAccount == null || physAddress == null\n || grpPhoneNumber == null || grpSupportType == null) {\n flashMessage(\"Please Fill all Fields\");\n\n } else if (IsEditing.equalsIgnoreCase(\"1\")) {\n url.append(\"editVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n\n } else { // Creating a new VSLA\n url.append(\"addNewVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n }\n }", "private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }", "public void submit(View v) {\n nam = name.getText().toString();\n phon = phone.getText().toString();\n bookname = bname.getText().toString();\n authorname = aname.getText().toString();\n edition = edi.getText().toString();\n price = pric.getText().toString();\n subject = sub.getText().toString();\n numberofbooks = num.getText().toString();\n rating = r.getRating();\n //TODO: Add this object into the SellingBook model class and retrofit it\n MyAsyncTask task = new MyAsyncTask();\n task.execute(\"\");//url\n\n }", "protected void _submit(Context ctx, IObjectPK pk, IObjectValue model)\n \t\tthrows BOSException, EASBizException {\n \tsuper._submit(ctx, pk, model);\n }", "public void fit(int[][] trainingData, int[][] trainingLabels) {\n\t\tfor(int epoch = 0; epoch < maxEpoch; epoch ++) {\n\t\t\tfor(int i = 0; i < trainingData.length; i++) {\n\t\t\t\ttrain(trainingData[i], trainingLabels[i]);\n\t\t\t}\n\t\t}\n\t}", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}", "public void submit(final EvaluatorRequest req);", "public abstract void Train() throws Exception;" ]
[ "0.61619854", "0.61236423", "0.6031213", "0.59576386", "0.58753496", "0.5807211", "0.5747766", "0.5715702", "0.5671554", "0.56608176", "0.5654696", "0.55839515", "0.5569578", "0.55336136", "0.5498805", "0.5496664", "0.5444802", "0.54423314", "0.5440789", "0.54092276", "0.54050016", "0.5362762", "0.535508", "0.5314151", "0.52242833", "0.52157795", "0.5189569", "0.5179932", "0.51778656", "0.51762515", "0.5172743", "0.51678926", "0.51660174", "0.5144461", "0.51417637", "0.5137262", "0.51308197", "0.5104736", "0.51021564", "0.50937337", "0.5077332", "0.5063888", "0.50607973", "0.50600547", "0.5058436", "0.5056241", "0.50469977", "0.5046788", "0.5042723", "0.5036721", "0.50316215", "0.49973413", "0.499064", "0.49849266", "0.4978782", "0.49741212", "0.49676085", "0.49675727", "0.49612287", "0.49386397", "0.49289507", "0.49255595", "0.49244314", "0.49203324", "0.4920169", "0.49175835", "0.49165383", "0.49142548", "0.49135518", "0.4901798", "0.48956972", "0.48955083", "0.48814476", "0.48725456", "0.4865887", "0.48562577", "0.4839552", "0.48315093", "0.48313355", "0.4828482", "0.48273122", "0.48241547", "0.48225105", "0.48208266", "0.48161867", "0.48120797", "0.48073718", "0.47973087", "0.47847447", "0.47799897", "0.47684327", "0.47635788", "0.4753523", "0.47427446", "0.47360986", "0.4734801", "0.47310853", "0.47299796", "0.47188053", "0.4716806", "0.4715987" ]
0.0
-1
Submit model for training Submit the model for training using the provided training data
public ApiResponse<ModelApiResponse> trainModelWithHttpInfo(String workspaceId, String modelId) throws ApiException { okhttp3.Call localVarCall = trainModelValidateBeforeCall(workspaceId, modelId, null); Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "public void train(){\n recoApp.training(idsToTest);\n }", "private Response performDT_training(String model_name, String data) {\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MMM-yyyy_HmsS\");\n \tJSONObject summary = new JSONObject();\n \t\n \tif(model_name.trim().length()< 1) {\n \t\tmodel_name = \"DTree_Model_\" + sdf.format(Calendar.getInstance().getTime());\n \t}\n \t\n \t// check if the model name is already present\n \tif(utilObj.isModelNameUnique(model_name)) {\n \t\tsummary = new JSONObject();\n \t\tsummary.put(\"Error\", \"Duplicate model name : \" + model_name);\n \t\tlog.error(\"Duplicate model name\");\n \t\treturn Response.status(200).entity(summary.toString()).build();\n \t}\n \t\n \tlog.info(String.format(\"model_Name: %s\", model_name ));\n \tString modelFilePath = Util.CurrentDir+\"/models/\"+model_name;\n \t\n \ttry {\n\n \t\t// write the data to the disk\n \t\tfinal String inputFileName = \"TrainData_DT_\" + sdf.format(Calendar.getInstance().getTime()) + \".csv\";\n \t\tfinal String inputFilePath = Util.CurrentDir+\"/\"+Util.DataDir+\"/\"+inputFileName;\n \t\tFileWriter writer = new FileWriter(inputFilePath);\n \t\twriter.write(data);\n \t\twriter.flush();\n \t\twriter.close();\n \t\tlog.info(\"File created : \" + inputFilePath);\n \t\t\n \t\tString cmd = String.format(\"Rscript \"+Util.CurrentDir+\"/Rscripts/DTTraining.R %s %s \",inputFilePath, model_name);\n \t\tlog.info(cmd);\n\t \tProcess pr = Runtime.getRuntime().exec(cmd);\n\t\t\t\n\t\t\tBufferedReader results = new BufferedReader(new InputStreamReader(pr.getInputStream()));\n\t\t\tString line = null;\n\t\t\t\n\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\twhile((line=results.readLine()) != null) {\n\t\t\t\tbuf.append(line);\n\t\t\t\tif(line.trim().isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine().trim();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tsummary.put(\"summary\", line);\n\t\t\t\t} \n\t\t\t\telse if(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tJSONArray Psplits = new JSONArray();\t\t\t\t\t\n\t\t\t\t\twhile(!line.trim().equalsIgnoreCase(\"Surrogate splits:\")) {\n\t\t\t\t\t\tString s[] = line.split(\"\\t\");\n\t\t\t\t\t\tfor(String s1 : s) {\n\t\t\t\t\t\t\tSystem.out.println(s1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJSONArray splitCols = new JSONArray(s);\n\t\t\t\t\t\tline = results.readLine();\n\t\t\t\t\t\tbuf.append(line);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tsummary.put(\"model_name\", model_name + \".RData\");\n\t\t\t\tsummary.put(\"InputFile\", inputFileName);\n\t\t\t\tsummary.put(\"CommandName\", \"Rscripts/DTTraining.R\");\n\t\t\t}\n\t\t\tsummary.put(\"raw\", buf.toString());\n\t\t\t\n\t\t\t// format the summary json as params { [key : val] }\n\t\t\tJSONArray finalSummary = new JSONArray();\n\t\t\tIterator<String> keys = summary.keySet().iterator();\n\t\t\twhile(keys.hasNext()) {\n\t\t\t\tJSONObject row = new JSONObject();\n\t\t\t\trow.put(\"attribute\", keys.next());\n\t\t\t\trow.put(\"value\", summary.get(row.getString(\"attribute\")));\n\t\t\t\tfinalSummary.put(row);\n\t\t\t}\n\t\t\treturn Response.status(200).entity(new JSONObject().put(\"summary\", finalSummary).toString()).build();\n\t\t\t\n \t} catch (Exception e) {\n \t\te.printStackTrace();\n \t}\n\t\t\n \treturn Response.status(200).entity(summary.toString()).build();\n }", "void setTrainData(DataModel trainData);", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "public abstract void fit(BinaryData trainingData);", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "public void submit(Batch batch);", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "public void startTrainingMode() {\n\t\t\r\n\t}", "public void train() throws Exception;", "void applyForTraining(int studentId, int trainingId) throws ServiceException;", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate void buildAndSubmit() throws Exception\r\n {\r\n TopologyBuilder builder = new TopologyBuilder();\r\n builder.setSpout(RANDOM_SENTENCE_SPOUT_ID, new RandomSentenceSpout(), 1);\r\n builder.setBolt(KAFKA_BOLT_ID, new KafkaBolt(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n builder.setBolt(HBASE_UPDATE_BOLT_ID, HBaseUpdateBolt.make(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n \r\n Config conf = new Config(); \r\n conf.setDebug(false);\r\n \r\n StormSubmitter.submitTopology(\"jason-hbase-storm\", conf, builder.createTopology());\r\n }", "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "public void run() {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n LOG.error(\"Submit: {} - run {}/{}\", topologies.get(jobIndex).name, ((jobCounter - 1) % runs) + 1, runs);\n client.submitTopology(topologies.get(jobIndex), null);\n }", "void storeTraining(Training training);", "public void submitWorkTasks(WorkflowDefine workflowDefine) {\n\t\t\n\t\t\n\t}", "private void readModelAndTrain(boolean readExistingModel,\n\t\t\tbyte[] trainingDataFile) {\n\t\tInputStream dataIn = null;\n\t\ttry {\n\t\t\tObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(\n\t\t\t\t\tnew PlainTextByLineStream(new FileInputStream(\n\t\t\t\t\t\t\tcreateModelInput(INPUT_TWEETS_ORIG_TXT)), \"UTF-8\"));\n\t\t\tsetModel(DocumentCategorizerME.train(\"en\", sampleStream,\n\t\t\t\t\tCUTOFF_FREQ, TRAINING_ITERATIONS));\n\t\t\tserialize(model);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (dataIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "TrainingTest createTrainingTest();", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "public void submitMicrotask(Key<Microtask> microtaskKey, String jsonDTOData, String workerID, Project project){\n\t\tWorkerCommand.increaseStat(workerID, \"submits\",1);\n\t\tMicrotask microtask = ofy().load().key( microtaskKey ).now();\n\t\tif(microtask!=null){\t\t\t\n\t\t\t// submit only if the request come from\n\t\t\t// the current assigned worker of the microtask\n\t\t\tif(microtask.isAssignedTo(workerID) ){\t\t\n\t\t\t\t//boolean to signal if review microtask was created -> microtask is waiting review\n\t\t\t\tboolean waitReview = true;\n\t\t\t\t\n\t\t\t\t// If reviewing is enabled and the microtask\n\t\t\t\t// is not in [Review, ReuseSearch,DebugTestFailure],\n\t\t\t\t// spawn a new review microtask\n\t\t\t\tif (reviewsEnabled && !( microtask.getClass().equals(Review.class) || microtask.getClass().equals(ChallengeReview.class)) ){\n\t\t\t\t\tMicrotaskCommand.createReview(microtaskKey, workerID, jsonDTOData, workerID);\n\n\t\t\t\t}\n\t\t\t\t// else submit the microtask\n\t\t\t\telse {\n\t\t\t\t\tMicrotaskCommand.submit(microtaskKey, jsonDTOData, workerID, microtask.getSubmitValue());\n\t\t\t\t\twaitReview = false;\n\t\t\t\t}\n\n\t\t\t\tFirebaseService.writeMicrotaskWaitingReview(Microtask.keyToString(microtaskKey),workerID, this.id, waitReview);\n\t\t\t\t// write the history log entry about the microtask submission\n\t\t\t\tHistoryLog.Init(this.getID()).addEvent(new MicrotaskSubmitted(microtask, workerID));\n\t\t\t\tFirebaseService.writeMicrotaskSubmission(jsonDTOData, Microtask.keyToString(microtaskKey), this.id);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLogger.getLogger(\"LOGGER\").severe(\"LOAD FAILED: MICROTASK \"+microtaskKey);\n\t\t}\n\n\n\t}", "private void train(NeuralDataSet input) {\n\n\tfinal NeuralDataSet theInput = input;\n\tfinal VirtualLibraryButler that = this;\n\n\ttraining = new Thread() {\n\t public void run() {\n\n\t\torg.encog.util.logging.Logging.setConsoleLevel(Level.OFF);\n\n\t\tfinal Train train = new CompetitiveTraining(brain, 0.7,\n\t\t\ttheInput, new NeighborhoodGaussian(\n\t\t\t\tnew GaussianFunction(0.0, 5.0, 1.5)));\n\t\tStrategy smartLearn = new SmartLearningRate();\n\n\t\tsmartLearn.init(train);\n\t\ttrain.addStrategy(smartLearn);\n\n\t\tint epoch = 0;\n\t\tint errorSize = 250;\n\n\t\tdouble[] lastErrors = new double[errorSize];\n\n\t\t// training loop\n\t\tdo {\n\t\t train.iteration();\n\t\t // System.out.println(\"Epoch #\" + epoch + \" Error:\" +\n\t\t // train.getError()); // + \" MovingAvg:\" + movingAvg);\n\t\t lastErrors[epoch % errorSize] = train.getError();\n\n\t\t double avg = 0;\n\t\t for (int i = 0; (i < epoch) && (i < errorSize); ++i)\n\t\t\tavg = (avg * i + lastErrors[i]) / (i + 1);\n\n\t\t if (Math.abs(avg - train.getError()) < 0.01)\n\t\t\ttrain.setError(0.001);\n\n\t\t epoch++;\n\t\t} while (train.getError() > 0.01);\n\n\t\t// System.out.println(\"training complete.\");\n\n\t\tthat.initialized = true;\n\t }\n\t};\n\n\ttraining.start();\n }", "public String execute(String input) {\n Data data = Serializer.parse(input, Data.class);\n\n // Step #2: Check the discriminator\n final String discriminator = data.getDiscriminator();\n if (discriminator.equals(Discriminators.Uri.ERROR)) {\n // Return the input unchanged.\n return input;\n }\n\n // Create a series of pipes to process the training files\n ArrayList<Pipe> pipeList = new ArrayList<>();\n pipeList.add(new Input2CharSequence(\"UTF-8\"));\n // Pipes: lowercase, tokenize, remove stopwords, map to features\n pipeList.add( new CharSequenceLowercase() );\n pipeList.add( new CharSequence2TokenSequence(Pattern.compile(\"\\\\p{L}[\\\\p{L}\\\\p{P}]+\\\\p{L}\")) );\n pipeList.add( new TokenSequenceRemoveStopwords());\n pipeList.add( new TokenSequence2FeatureSequence());\n pipe = new SerialPipes(pipeList);\n\n // put the directory of files used for training through the pipes\n String directory = data.getParameter(\"directory\").toString();\n InstanceList instances = readDirectory(new File(directory));\n\n // create a topic to be trained\n int numberOfTopics = (Integer) data.getParameter(\"numTopics\");\n ParallelTopicModel topicModel = new ParallelTopicModel(numberOfTopics);\n topicModel.addInstances(instances);\n\n // train the model\n try {\n topicModel.estimate();\n } catch (IOException e){\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to train the model\").asJson();\n }\n\n // write topic keys file\n String path = data.getParameter(\"path\").toString();\n String keysName = data.getParameter(\"keysName\").toString();\n int wordsPerTopic = (Integer) data.getParameter(\"wordsPerTopic\");\n try {\n topicModel.printTopWords(new File(path + \"/\" + keysName), wordsPerTopic, false);\n } catch (IOException e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the topic keys to \" + path + \"/\" + keysName).asJson();\n }\n\n // write the .inferencer file\n String inferencerName = data.getParameter(\"inferencerName\").toString();\n try {\n ObjectOutputStream oos =\n new ObjectOutputStream (new FileOutputStream (path + \"/\" + inferencerName));\n oos.writeObject (topicModel.getInferencer());\n oos.close();\n } catch (Exception e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the inferencer to \" + path + \"/\" + inferencerName).asJson();\n }\n\n // Success\n return new Data<>(Discriminators.Uri.TEXT, \"Success\").asJson();\n }", "public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public void train(Collection<TrainingEntry<Login>> trainingDataSet) throws TrainingException {\n if (trainingDataSet.isEmpty()) return;\n try {\n final DataSet dataSet = toDataSet(trainingDataSet);\n normalizer = new NormalizerStandardize();\n normalizer.fit(dataSet);\n normalizer.transform(dataSet);\n final DataSetIterator dataSetIterator = new ExistingDataSetIterator(dataSet);\n final MultiLayerConfiguration configuration = new NeuralNetConfiguration.Builder()\n .seed(6)\n .iterations(1)\n .activation(\"tanh\")\n .weightInit(WeightInit.XAVIER)\n .learningRate(0.1)\n .regularization(true).l2(1e-4)\n .list()\n .layer(0, new DenseLayer.Builder()\n .nIn(getNumberOfInputFeatures(trainingDataSet))\n .nOut(9)\n .build())\n .layer(1, new DenseLayer.Builder()\n .nIn(9)\n .nOut(9)\n .build())\n .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(\"softmax\")\n .nIn(9)\n .nOut(NUM_CATEGORIES).build())\n .backprop(true).pretrain(false)\n .build();\n network = new MultiLayerNetwork(configuration);\n final EarlyStoppingConfiguration esConf = new EarlyStoppingConfiguration.Builder()\n .epochTerminationConditions(new MaxEpochsTerminationCondition(20))\n .iterationTerminationConditions(new MaxTimeIterationTerminationCondition(20, TimeUnit.MINUTES))\n .scoreCalculator(new DataSetLossCalculator(dataSetIterator, true))\n .evaluateEveryNEpochs(1)\n .modelSaver(new InMemoryModelSaver())\n .build();\n final EarlyStoppingTrainer trainer = new EarlyStoppingTrainer(esConf, network, dataSetIterator);\n final EarlyStoppingResult<MultiLayerNetwork> result = trainer.fit();\n network = result.getBestModel();\n } catch (final Exception e) {\n throw new TrainingException(e);\n }\n }", "public static void main(String[] args) {\n String pathToTrain = \"train.csv\";\n String pathToTest = \"test.csv\";\n try {\n ArrayList<String> trainSentences = readCSV(pathToTrain);\n trainSentences.remove(0);\n ArrayList<String> testSentences = readCSV(pathToTest);\n testSentences.remove(0);\n\n ArrayList<String[]> trainWords = preprocess(trainSentences);\n NaiveBayesClassifier model = new NaiveBayesClassifier();\n model.fit(trainWords);\n\n ArrayList<String[]> testWords = preprocess(testSentences);\n double accuracy = evaluate(testWords, model);\n model.writeParams(\"params.json\");\n System.out.printf(\"Accuracy of the model is: %.4f%n\", accuracy);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void saveTrainingDataToFileUpSampling() throws Exception {\r\n //set tokenizer - we can specify n-grams for classification\r\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n for (int k = 0; k < 5; k++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n }\r\n }\r\n }\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n Random r = new Random();\r\n dataFiltered.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataFiltered);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public IObserver train(IContext context) throws ThinklabException;", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.train(groupid_long, TRAIN_TYPE.all );\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsessionId = result.data+\"\";\n\t\t\t\t Log.e(TAG,sessionId);\n\t\t\t}", "private static native boolean train_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj);", "private String train(float[][][] features, float[] label, int epochs){\n org.tensorflow.Tensor x_train = Tensor.create(features);\n Tensor y_train = Tensor.create(label);\n int ctr = 0;\n while (ctr < epochs) {\n sess.runner().feed(\"input\", x_train).feed(\"target\", y_train).addTarget(\"train_op\").run();\n ctr++;\n }\n return \"Model Trained\";\n }", "public void updateDataModel() {\n //this.dataModel = new TelemetryChartDataModel();\n this.dataModel.\n setModel(getStartDate(), getEndDate(), selectedProjects, telemetryName, parameters);\n Thread thread = new Thread() {\n @Override\n public void run() {\n dataModel.loadData();\n }\n };\n thread.start();\n }", "public void train ()\t{\t}", "public void trainData() throws IOException {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttestingFold = i;\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Training Tree-Augmented Naive Bayes for writing Fold\");\n\t\t\t}\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Calculating Class Priors across Data set.\\n\");\n\t\t\t}\n\t\t\tbuildPriors();\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Priors built.\\n Discretizing data into Naive Bin Estimator...\\n\" +\n\t\t\t\t\t\t\"Generating Completed Graph...\\nWeighting Edges...\\n\");\n\t\t\t}\n\t\t\tdiscretizeData();\n\t\t\ttest();\n\t\t}\n\n\t}", "public void saveModel(File model_file) throws Exception{\n\t\t// Write model to file\n\t\t//System.out.println(mClassifier.getClass());\n\t\tSystem.out.println(\"Saving Trained Model. Please wait.\");\n\t\tif(mClassifier instanceof DynamicLMClassifier){\n\t\t\tFileOutputStream fileOut = new FileOutputStream(model_file);\n\t ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n\t ((DynamicLMClassifier<NGramProcessLM>) mClassifier).compileTo(objOut);\n\t objOut.close();\n\t System.out.println(\"Saving Trained Model. Complete.\");\n\t\t}else{\n\t\t\tthrow new Exception(\"Cannot compile a non dynamic traning set\");\n\t\t}\n\t}", "public void run(JavaSparkContext jsc, String trainingDataPath) throws IOException {\n if (trainingDataPath == null) {\n upload(jsc);\n return;\n }\n\n JavaPairRDD<String, String> docLoad;\n if (trainingDataPath.isEmpty()) {\n docLoad = load(jsc);\n } else {\n String docDelimiter = StringEscapeUtils.unescapeJava(conf.get(DOC_DELIMITER));\n docLoad = new HDFSRead().loadTextFile(jsc, trainingDataPath).mapToPair(line -> new Tuple2<>(line.split(docDelimiter)[0], line.split(docDelimiter)[1]));\n\n }\n\n JavaPairRDD<String, Tuple2<String, String>> docDownload = download(docLoad);\n JavaPairRDD<String, Tuple2<String, String>> docClean = clean(docDownload);\n save(docClean);\n }", "public void upload(JavaSparkContext jsc) throws IOException {\n int partitions = conf.getInt(PARTITIONS, 48);\n String docDelimiter = StringEscapeUtils.unescapeJava(conf.get(DOC_DELIMITER));\n\n /* load training data */\n List<String> resource = IOUtils\n .readLines(getClass().getClassLoader().getResourceAsStream(conf.get(TRAININGDATA_RESOURCE)));\n\n Broadcast<List<String>> broadcastRes = jsc.broadcast(resource);\n\n JavaPairRDD<String, Tuple2<String, String>> doc = jsc\n .parallelize(broadcastRes.value())\n .persist(StorageLevel.MEMORY_AND_DISK_SER_2())\n .repartition(partitions)\n .filter(line -> line.split(docDelimiter).length >= 2)\n .mapToPair(line -> new Tuple2<>(line.split(docDelimiter)[0],\n new Tuple2<>(line.split(docDelimiter)[1], line.split(docDelimiter)[2])));\n /* save */\n save(doc);\n }", "public void actionTrain(Train t) {\n\t\t\t t.setVitesseScalaire(vitesse);\n\t\t}", "private synchronized void downloadModel(String modelName) {\n final FirebaseCustomRemoteModel remoteModel =\n new FirebaseCustomRemoteModel\n .Builder(modelName)\n .build();\n FirebaseModelDownloadConditions conditions =\n new FirebaseModelDownloadConditions.Builder()\n .requireWifi()\n .build();\n final FirebaseModelManager firebaseModelManager = FirebaseModelManager.getInstance();\n firebaseModelManager\n .download(remoteModel, conditions)\n .continueWithTask(task ->\n firebaseModelManager.getLatestModelFile(remoteModel)\n )\n .continueWith(executorService, (Continuation<File, Void>) task -> {\n // Initialize a text classifier instance with the model\n File modelFile = task.getResult();\n\n // TODO 6: Initialize a TextClassifier with the downloaded model\n textClassifier = NLClassifier.createFromFile(modelFile);\n\n // Enable predict button\n predictButton.setEnabled(true);\n return null;\n })\n .addOnFailureListener(e -> {\n Log.e(TAG, \"Failed to download and initialize the model. \", e);\n Toast.makeText(\n MainActivity.this,\n \"Model download failed, please check your connection.\",\n Toast.LENGTH_LONG)\n .show();\n predictButton.setEnabled(false);\n });\n }", "public void applyModel(ScServletData data, Object model)\n {\n }", "public void evaluate(String sampleFile, String validationFile, String featureDefFile, double percentTrain) {\n/* 761 */ List<RankList> trainingData = new ArrayList<>();\n/* 762 */ List<RankList> testData = new ArrayList<>();\n/* 763 */ int[] features = prepareSplit(sampleFile, featureDefFile, percentTrain, normalize, trainingData, testData);\n/* 764 */ List<RankList> validation = null;\n/* */ \n/* */ \n/* 767 */ if (!validationFile.isEmpty()) {\n/* */ \n/* 769 */ validation = readInput(validationFile);\n/* 770 */ if (normalize) {\n/* 771 */ normalize(validation, features);\n/* */ }\n/* */ } \n/* 774 */ RankerTrainer trainer = new RankerTrainer();\n/* 775 */ Ranker ranker = trainer.train(this.type, trainingData, validation, features, this.trainScorer);\n/* */ \n/* 777 */ double rankScore = evaluate(ranker, testData);\n/* */ \n/* 779 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 780 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 782 */ System.out.println(\"\");\n/* 783 */ ranker.save(modelFile);\n/* 784 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "@Override\n public void Submit() {\n }", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public void trainModel(List<BugReport> brs){\r\n\t\t\r\n\t\tdouble startTime = System.currentTimeMillis();\r\n\t\tthis.initializeModel(brs);\r\n\t\tthis.inferenceModel(brs);\r\n\t\tdouble endTime = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"LDA training time cost: \"+(endTime-startTime)/1000.0);\r\n\t\t\r\n\t}", "public void saveTrainingDataToFileHybridSampling1() throws Exception {\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n //up sampling using SMOTE\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n //downsampling using ?? \r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n /**\r\n * Resamples a dataset by applying the Synthetic Minority Oversampling\r\n * TEchnique (SMOTE)\r\n * http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume16/chawla02a-html/node6.html\r\n * http://weka.sourceforge.net/doc.packages/SMOTE/weka/filters/supervised/instance/SMOTE.html \r\n *\r\n */\r\n SMOTE s = new SMOTE();\r\n s.setInputFormat(dataFiltered);\r\n // Specifies percentage of SMOTE instances to create.\r\n s.setPercentage(300.0);//464\r\n Instances dataBalanced = Filter.useFilter(dataFiltered, s);\r\n\r\n Random r = new Random();\r\n dataBalanced.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataBalanced);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataHybridRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public static void main(String[] args) throws IOException {\n String dataName = \"Dianping\";\n String fileName = \"checkin_pitf\";\n int coreNum = 1;\n// List<Post> trainPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/all_id_core\"+coreNum+\"_train\");\n// List<Post> testPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/all_id_core\"+coreNum+\"_test\");\n List<Post> trainPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/\"+fileName+\"_train\");\n List<Post> testPosts = DataReader.readPosts(\"./demo/data/\" + dataName + \"/\"+fileName+\"_test\");\n\n System.out.println(\"PITFTest\");\n System.out.println(dataName+\" \"+coreNum);\n int dim = 64;\n double initStdev = 0.01;\n int iter = 20;//100\n double learnRate = 0.05;\n double regU = 0.00005;\n double regI = regU, regT = regU;\n int numSample = 100;\n int randomSeed = 1;\n\n PITF pitf = new PITF(trainPosts, testPosts, dim, initStdev, iter, learnRate, regU, regI, regT, randomSeed, numSample);\n pitf.run();//这个函数会调用model的初始化及创建函数\n System.out.println(\"dataName:\\t\" + dataName);\n System.out.println(\"coreNum:\\t\" + coreNum);\n }", "public String trainmodelandclassify(Attribute at) throws Exception {\n\t\tif(at.getAge()>=15 && at.getAge()<=25)\n\t\t\tat.setAgegroup(\"15-25\");\n\t\tif(at.getAge()>=26 && at.getAge()<=45)\n\t\t\tat.setAgegroup(\"25-45\");\n\t\tif(at.getAge()>=46 && at.getAge()<=65)\n\t\t\tat.setAgegroup(\"45-65\");\n\t\t\n\t\t\n\t\t\n\t\t//loading the training dataset\n\t\n\tDataSource source=new DataSource(\"enter the location of your .arff file for training data\");\n\tSystem.out.println(source);\n\tInstances traindataset=source.getDataSet();\n\t//setting the class index (which would be one less than the number of attributes)\n\ttraindataset.setClassIndex(traindataset.numAttributes()-1);\n\tint numclasses=traindataset.numClasses();\n for (int i = 0; i < numclasses; i++) {\n \tString classvalue=traindataset.classAttribute().value(i);\n \tSystem.out.println(classvalue);\n\t\t\n\t}\n //building the classifier\n NaiveBayes nb= new NaiveBayes();\n nb.buildClassifier(traindataset);\n System.out.println(\"model trained successfully\");\n \n //test the model\n\tDataSource testsource=new DataSource(\"enter the location of your .arff file for test data\");\n\tInstances testdataset=testsource.getDataSet();\n\t\n\tFileWriter fwriter = new FileWriter(\"enter the location of your .arff file for test data\",true); //true will append the new instance\n\tfwriter.write(System.lineSeparator());\n\tfwriter.write(at.getAgegroup()+\",\"+at.getGender()+\",\"+at.getProfession()+\",\"+\"?\");//appends the string to the file\n\tfwriter.close();\n\ttestdataset.setClassIndex(testdataset.numAttributes()-1);\n\t//looping through the test dataset and making predictions\n\tfor (int i = 0; i < testdataset.numInstances(); i++) {\n\t\tdouble classvalue=testdataset.instance(i).classValue();\n\t\tString actualclass=testdataset.classAttribute().value((int)classvalue);\n\t\tInstance instance=testdataset.instance(i);\n\t\tdouble pclassvalue=nb.classifyInstance(instance);\n\t\tString pclass=testdataset.classAttribute().value((int)pclassvalue);\n\t\tSystem.out.println(actualclass+\" \"+ pclass);\n\t\n}\n\tdouble classval=testdataset.instance(testdataset.numInstances()-1).classValue();\n\tInstance ins=testdataset.lastInstance();\n\tdouble pclassval=nb.classifyInstance(ins);\n\tString pclass=testdataset.classAttribute().value((int)pclassval);\n\tSystem.out.println(pclass);\n\t\n\treturn pclass;\n}", "private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}", "@Test\n @Ignore\n public void testSubmit() {\n System.out.println(\"submit\");\n String sub = \"\";\n String obj = \"\";\n String rid = \"\";\n String pmid = \"\";\n String doi = \"\";\n String pdate = \"\";\n String inst = \"\";\n HttpServletResponse response = null;\n HomeController instance = new HomeController();\n instance.submit(sub, obj, rid, pmid, doi, pdate, inst, response);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}", "private void trainFeatures() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.FEATURE);\n\t\tSystem.out.println(\"Starting reading Feature Trainingset ..\");\n\t\tPipe serialpipe = getFeaturePipe();\n\t\tInstanceList feature_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Feature Trainingset ..\");\n\t\tfeature_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Feature Training set : \" + feature_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(feature_instances, Train + \"F.bin\");\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\tfeature_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"feature.dat\")));\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Feature training set ..\");\n\t\tClassifier classifier = trainer.train(feature_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Feature_Train);\n\t\tSystem.out.println(\"Feature classifier saved to : \" + Feature_Train);\n\t}", "public void run() {\n\n // Initialize control center.\n\n control = new Dispatch(parameters);\n control.run();\n linked = control.gettasks();\n\n // Initialize trains.\n\n trains = new TrainSim[parameters.numTrains];\n\n for (int i = 0; i < parameters.numTrains; i++) {\n\n trains[i] = new TrainSim(parameters, i);\n trains[i].genbasis();\n\n }\n\n // Add linked tasks to trains.\n\n for (Task each : linked) {\n\n int trainid = each.getTrain();\n each = new Task(each.getType(), each.getBeginTime(), parameters, false);\n each.setID(trainid);\n if (each.getArrTime() < parameters.numHours*60) {\n trains[trainid].linktask(each);\n }\n }\n\n // Run each train\n\n for (TrainSim each : trains) {\n\n each.run();\n\n }\n\n }", "public void saveTraining(File datum) throws IOException, FileNotFoundException {\n bp.writer(datum);\n }", "public boolean save(Data model);", "public void submitOrder() throws BackendException;", "private static native boolean train_auto_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj, int k_fold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);", "private void train(int[] trainingData, int[] trainingLabel) {\n\t\t// forward Propagation\n\t\tdouble[] activationsOfHiddenLayer = new double[SIZE_HIDDEN_LAYER];\n\t\tdouble[] outputActivations = new double[SIZE_OUTPUT_LAYER];\n\t\tforwardPropagation(trainingData, activationsOfHiddenLayer, outputActivations);\n\t\t// backward Propagation\n\t\tbackwardPropagation(trainingData, trainingLabel, outputActivations, activationsOfHiddenLayer);\n\t}", "public void fit(double[][] trainingData, int[][] trainingLabels) {\n\t}", "public static void main(String[] args) throws Exception {\n Path modelPath = Paths.get(\"saved_graph_file\");\n byte[] graph = Files.readAllBytes(modelPath);\n\n // SavedModelBundle svd = SavedModelBundle.load(\"gin_rummy_nfsp4\", \"serve\");\n // System.out.println(svd.metaGraphDef());\n\n Graph g = new Graph();\n\n g.importGraphDef(graph);\n\n // Print for tags.\n Iterator<Operation> ops = g.operations();\n while (ops.hasNext()) {\n Operation op = ops.next();\n // Types are: Add, Const, Placeholder, Sigmoid, MatMul, Identity\n if (op.type().equals(\"Placeholder\")) {\n System.out.println(\"Type: \" + op.type() + \", Name: \" + op.name() + \", NumOutput: \" + op.numOutputs());\n System.out.println(\"OUTPUT: \" + op.output(0).shape());\n }\n }\n\n //open session using imported graph\n Session sess = new Session(g);\n float[][] inputData = {{4, 3, 2, 1}};\n\n // We have to create tensor to feed it to session,\n // unlike in Python where you just pass Numpy array\n Tensor inputTensor = Tensor.create(inputData, Float.class);\n float[][] output = predict(sess, inputTensor);\n for (int i = 0; i < output[0].length; i++) {\n System.out.println(output[0][i]);\n }\n }", "private void trainText() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.TEXT);\n\t\tSystem.out.println(\"Starting reading Text Trainingset ..\");\n\n\t\tPipe serialpipe = getTextPipe();\n\t\tInstanceList text_instances = new InstanceList(serialpipe);\n\n\t\tSystem.out.println(\"Preprocessing on Text Trainingset ..\");\n\t\ttext_instances.addThruPipe(dbiterator);\n\n\t\tSystem.out.println(\"Text Training set : \" + text_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(text_instances, Train + \"T.bin\");\n\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\ttext_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"text.dat\")));\n\n\t\tNaiveBayesTrainer trainer = new NaiveBayesTrainer();\n\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Text training set ..\");\n\t\tNaiveBayes classifier = trainer.train(text_instances);\n\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Text_Train);\n\t\tSystem.out.println(\"Text classifier saved to : \" + Text_Train);\n\t}", "DataWrapper submit(Long projectId);", "public void doneClassifying() {\n\t\tbinaryTrainClassifier = trainFactory.trainClassifier(binaryTrainingData);\n\t\tmultiTrainClassifier = testFactory.trainClassifier(multiTrainingData);\n\t\tLinearClassifier.writeClassifier(binaryTrainClassifier, BINARY_CLASSIFIER_FILENAME);\n\t\tLinearClassifier.writeClassifier(multiTrainClassifier, MULTI_CLASSIFIER_FILENAME);\n\t}", "public void train (String trainingCollection) throws IOException {\n\t\tDocumentCollection trainCol = new DocumentCollection(trainingCollection);\n\t\ttrainCol.open();\n\t\tfor (int i=0; i<trainCol.size(); i++) {\n\t\t\tExternalDocument doc = trainCol.get(i);\n\t\t\ttrain (doc);\n\t\t}\n\t}", "public boolean train_auto(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params, int k_fold, CvParamGrid Cgrid, CvParamGrid gammaGrid, CvParamGrid pGrid, CvParamGrid nuGrid, CvParamGrid coeffGrid, CvParamGrid degreeGrid, boolean balanced)\r\n {\r\n\r\n boolean retVal = train_auto_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj, k_fold, Cgrid.nativeObj, gammaGrid.nativeObj, pGrid.nativeObj, nuGrid.nativeObj, coeffGrid.nativeObj, degreeGrid.nativeObj, balanced);\r\n\r\n return retVal;\r\n }", "public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }", "@Override\n\tprotected void prepareForSubmit() throws WorkflowException {\n\n\t}", "public void submit(Batch batch, BatchOperation opFilter);", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "public boolean train(Mat trainData, Mat responses)\r\n {\r\n\r\n boolean retVal = train_1(nativeObj, trainData.nativeObj, responses.nativeObj);\r\n\r\n return retVal;\r\n }", "public void kirimNotifikasiPengajuan(Training training){\n\t\t\n\t}", "public boolean train(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n boolean retVal = train_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj);\r\n\r\n return retVal;\r\n }", "public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;", "public void model() \n\t{\n\t\t\n\t\ttry \n\t\t{\n\t\t GRBEnv env = new GRBEnv();\n\t\t GRBModel model = new GRBModel(env, \"resources/students.lp\");\n\n\t\t model.optimize();\n\n\t\t int optimstatus = model.get(GRB.IntAttr.Status);\n\n\t\t if (optimstatus == GRB.Status.INF_OR_UNBD) {\n\t\t model.getEnv().set(GRB.IntParam.Presolve, 0);\n\t\t model.optimize();\n\t\t optimstatus = model.get(GRB.IntAttr.Status);\n\t\t }\n\n\t\t if (optimstatus == GRB.Status.OPTIMAL) {\n\t\t double objval = model.get(GRB.DoubleAttr.ObjVal);\n\t\t System.out.println(\"Optimal objective: \" + objval);\n\t\t } else if (optimstatus == GRB.Status.INFEASIBLE) {\n\t\t System.out.println(\"Model is infeasible\");\n\n\t\t // Compute and write out IIS\n\t\t model.computeIIS();\n\t\t model.write(\"model.ilp\");\n\t\t } else if (optimstatus == GRB.Status.UNBOUNDED) {\n\t\t System.out.println(\"Model is unbounded\");\n\t\t } else {\n\t\t System.out.println(\"Optimization was stopped with status = \"\n\t\t + optimstatus);\n\t\t }\n\n\t\t // Dispose of model and environment\n\t\t model.write(\"resources/model.sol\");\n\t\t model.dispose();\n\t\t env.dispose();\n\n\t\t } catch (GRBException e) {\n\t\t System.out.println(\"Error code: \" + e.getErrorCode() + \". \" +\n\t\t e.getMessage());\n\t\t }\n\t\t\n\t}", "public void train(Corpus[] trainingData) {\n\t\tSet<String> vocabulary = super.mergeVocabulary(trainingData);\n\t\ttrainingData[0].setVocabulary(vocabulary);\n\t\ttrainingData[1].setVocabulary(vocabulary);\n\t\tposMatrix = new TransitionMatrix(trainingData[0]);\n\t\tnegMatrix = new TransitionMatrix(trainingData[1]);\n\t}", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifierObject = ObjectClassifier.create(context.getAssets(), TYPE_MODEL, LABEL_TYPE, INPUT_SIZE_TYPE);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public void train(DoubleDataTable trainTable, Progress prog) throws InterruptedException\n\t{\n \tif (m_ClassifierTypes.size()==0)\n \t{\n \t\tprog.set(\"Training classifiers\", 1);\n \t\tprog.step();\n \t\treturn;\n \t}\n \tint[] progressVolumes = new int[m_ClassifierTypes.size()];\n \tprogressVolumes[0] = 100/progressVolumes.length;\n \tfor (int i = 1; i < progressVolumes.length; i++)\n \t\tprogressVolumes[i] = 100*(i+1)/progressVolumes.length-progressVolumes[i-1];\n \tprog = new MultiProgress(\"Training classifiers\", prog, progressVolumes);\n\t\tfor (Map.Entry<String,Class> cl : m_ClassifierTypes.entrySet())\n\t\t{\n\t\t\tm_Classifiers.remove(cl.getKey());\n\t\t\ttry\n\t\t\t{\n\t\t\t\tClass classifierClass = cl.getValue();\n\t\t\t\tProperties prop = m_ClassifierProperties.get(cl.getKey());\n\t\t\t\tClassifier classifier = ClassifierFactory.createClassifier(classifierClass, prop, trainTable, prog);\n\t\t\t\tm_Classifiers.put(cl.getKey(), classifier);\n\t\t\t}\n\t\t\tcatch (InvocationTargetException e)\n\t\t\t{\n\t\t\t\tif (e.getTargetException() instanceof BadHeaderException)\n\t\t\t\t\tReport.displaynl(cl.getKey()+\" not trained: \"+e.getTargetException().getMessage());\n\t\t\t\telse Report.exception((Exception)e.getTargetException());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tReport.exception(e);\n\t\t\t}\n\t\t}\n\t}", "private void runOnlineModel() {\n myScenario.setProbe(myProbe);\n myScenario.setSynchronizationMode(mySrcSelector);\n try {\n myScenario.resync();\n myScenario.run();\n } catch (SynchronizationException e) {\n System.out.println(e);\n } catch (ModelException e) {\n System.out.println(e);\n }\n }", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "void submit(Token token, OMMMsg encmsg);", "public void submit(Task task) {\n\t\tthis.engine.pushTask(task);\n\t}", "public static void main(String[] args) throws Exception {\n final int numRows = 28;\n final int numColumns = 28;\n int outputNum = 10; // number of output classes\n int batchSize = 128; // batch size for each epoch\n int rngSeed = 123; // random number seed for reproducibility\n int numEpochs = 15; // number of epochs to perform\n String modelPath = \"モデルパスを入力\";\n\n //Get the DataSetIterators:\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\n\n\n System.out.println(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(rngSeed) //include a random seed for reproducibility\n // use stochastic gradient descent as an optimization algorithm\n .updater(new Nesterovs(0.006, 0.9))\n .l2(1e-4)\n .list()\n .layer(new DenseLayer.Builder() //create the first, input layer with xavier initialization\n .nIn(numRows * numColumns)\n .nOut(1000)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .build())\n .layer(new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\n .nIn(1000)\n .nOut(outputNum)\n .activation(Activation.SOFTMAX)\n .weightInit(WeightInit.XAVIER)\n .build())\n .build();\n\n\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n //print the score with every 1 iteration\n UIServer uiServer = UIServer.getInstance();\n InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n model.setListeners(new StatsListener(statsStorage),new ScoreIterationListener(1));\n\n System.out.println(\"Train model....\");\n model.fit(mnistTrain, numEpochs);\n\n\n\n\n System.out.println(\"Evaluate model....\");\n Evaluation eval = model.evaluate(mnistTest);\n System.out.println(eval.stats());\n ModelSerializer.writeModel(model, new File(modelPath), false);\n System.out.println(\"****************Example finished********************\");\n\n }", "private void train(float[] inputs, int desired) {\r\n int guess = feedforward(inputs);\r\n float error = desired - guess;\r\n for (int i = 0; i < weights.length; i++) {\r\n weights[i] += c * error * inputs[i];\r\n }\r\n }", "public okhttp3.Call addTrainingDataAsync(String workspaceId, String modelId, TrainingData trainingData, final ApiCallback<ModelApiResponse> _callback) throws ApiException {\n\n okhttp3.Call localVarCall = addTrainingDataValidateBeforeCall(workspaceId, modelId, trainingData, _callback);\n Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();\n localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);\n return localVarCall;\n }", "public void submit() {\n fileUploadContainer.upload.submit();\n }", "public void run() throws Exception {\r\n\r\n\r\n LibSVM svm = new LibSVM();\r\n String svmOptions = \"-S 0 -K 2 -C 8 -G 0\"; //Final result: [1, -7 for saveTrainingDataToFileHybridSampling2 ]\r\n svm.setOptions(weka.core.Utils.splitOptions(svmOptions));\r\n System.out.println(\"SVM Type and Keranl Type= \" + svm.getSVMType() + svm.getKernelType());//1,3 best result 81%\r\n // svm.setNormalize(true);\r\n\r\n\r\n// load training data from .arff file\r\n ConverterUtils.DataSource source = new ConverterUtils.DataSource(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\");\r\n System.out.println(\"\\n\\nLoaded data:\\n\\n\" + source.getDataSet());\r\n Instances dataFiltered = source.getDataSet();\r\n dataFiltered.setClassIndex(0);\r\n\r\n // gridSearch(svm, dataFiltered);\r\n Evaluation evaluation = new Evaluation(dataFiltered);\r\n evaluation.crossValidateModel(svm, dataFiltered, 10, new Random(1));\r\n System.out.println(evaluation.toSummaryString());\r\n System.out.println(evaluation.weightedAreaUnderROC());\r\n double[][] confusionMatrix = evaluation.confusionMatrix();\r\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n System.out.print(confusionMatrix[i][j] + \" \");\r\n\r\n }\r\n System.out.println();\r\n }\r\n System.out.println(\"accuracy for crime class= \" + (confusionMatrix[0][0] / (confusionMatrix[0][1] + confusionMatrix[0][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for other class= \" + (confusionMatrix[1][1] / (confusionMatrix[1][1] + confusionMatrix[1][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for crime class= \" + evaluation.truePositiveRate(0) + \"%\");\r\n System.out.println(\"accuracy for other class= \" + evaluation.truePositiveRate(1) + \"%\");\r\n\r\n\r\n }", "public void dmall() {\n \r\n BufferedReader datafile = readDataFile(\"Work//weka-malware.arff\");\r\n \r\n Instances data = null;\r\n\t\ttry {\r\n\t\t\tdata = new Instances(datafile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n data.setClassIndex(data.numAttributes() - 1);\r\n \r\n // Choose a type of validation split\r\n Instances[][] split = crossValidationSplit(data, 10);\r\n \r\n // Separate split into training and testing arrays\r\n Instances[] trainingSplits = split[0];\r\n Instances[] testingSplits = split[1];\r\n \r\n // Choose a set of classifiers\r\n Classifier[] models = { new J48(),\r\n new DecisionTable(),\r\n new DecisionStump(),\r\n new BayesianLogisticRegression() };\r\n \r\n // Run for each classifier model\r\n//for(int j = 0; j < models.length; j++) {\r\n int j = 0;\r\n \tswitch (comboClassifiers.getSelectedItem().toString()) {\r\n\t\t\tcase \"J48\":\r\n\t\t\t\tj = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionTable\":\r\n\t\t\t\tj = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionStump\":\r\n\t\t\t\tj = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"BayesianLogisticRegression\":\r\n\t\t\t\tj = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n \t\r\n\r\n // Collect every group of predictions for current model in a FastVector\r\n FastVector predictions = new FastVector();\r\n \r\n // For each training-testing split pair, train and test the classifier\r\n for(int i = 0; i < trainingSplits.length; i++) {\r\n Evaluation validation = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvalidation = simpleClassify(models[j], trainingSplits[i], testingSplits[i]);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n predictions.appendElements(validation.predictions());\r\n \r\n // Uncomment to see the summary for each training-testing pair.\r\n// textArea.append(models[j].toString() + \"\\n\");\r\n textArea.setText(models[j].toString() + \"\\n\");\r\n// System.out.println(models[j].toString());\r\n }\r\n \r\n // Calculate overall accuracy of current classifier on all splits\r\n double accuracy = calculateAccuracy(predictions);\r\n \r\n // Print current classifier's name and accuracy in a complicated, but nice-looking way.\r\n textArea.append(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\\n\");\r\n System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\");\r\n//}\r\n \r\n\t}", "public static void main (String [] args) throws Exception { \n//\t\tconf.setMapperClass(DadaMapper.class);\n//\t\tconf.setReducerClass(DataReducer.class);\n\t\t\n//\t\tConfiguration conf = new Configuration(); \n//\t\tconf.set(\"fs.default.name\", \"hdfs://zli:9000\"); \n//\t\tconf.set(\"hadoop.job.user\", \"hadoop\"); \t\t \n//\t\tconf.set(\"mapred.job.tracker\", \"zli:9001\");\n\t\t\n\t\tJob job = new Job(); \n\t\tjob.setJarByClass(NBModelTestJob.class);\n\t\tjob.getConfiguration().set(\"fs.defaultFS\", \"hdfs://NYSJHL101-142.opi.com:8020\"); \n\t\tjob.getConfiguration().set(\"hadoop.job.user\", \"hdfs\"); \t\t \n\t\tjob.getConfiguration().set(\"mapred.job.tracker\", \"NYSJHL101-144.opi.com:8021\");\n\t\tjob.getConfiguration().set(\"trainpath\", args[0]);\n\t\tFileInputFormat.addInputPath(job, new Path(args[1]));\n\t\tFileOutputFormat.setOutputPath(job, new Path(args[2]));\n\t\tFileSystem hdfs = FileSystem.get(job.getConfiguration());\n\t\t\t\t\n\t\tjob.setMapperClass(DataMapper.class);\n\t\tjob.setReducerClass(DataReducer.class);\n\t\tjob.setCombinerClass(DataCombiner.class);\n\t\tjob.setOutputKeyClass(Text.class);\n\t\tjob.setOutputValueClass(Text.class);\n\t\tjob.setNumReduceTasks(10);\n\t\t\n\t\tSystem.exit(job.waitForCompletion(true) ? 0 : 1);\n\t\t\n\t}", "private void dataSubmission() {\n getPreferences(); // reload all the data\n\n String jsonObjectString = createJsonObject();\n StringBuilder url = new StringBuilder();\n url.append(serverUrl);\n\n if (vslaName == null || numberOfCycles == null || representativeName == null || representativePost == null\n || repPhoneNumber == null || grpBankAccount == null || physAddress == null\n || grpPhoneNumber == null || grpSupportType == null) {\n flashMessage(\"Please Fill all Fields\");\n\n } else if (IsEditing.equalsIgnoreCase(\"1\")) {\n url.append(\"editVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n\n } else { // Creating a new VSLA\n url.append(\"addNewVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n }\n }", "private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }", "public void submit(View v) {\n nam = name.getText().toString();\n phon = phone.getText().toString();\n bookname = bname.getText().toString();\n authorname = aname.getText().toString();\n edition = edi.getText().toString();\n price = pric.getText().toString();\n subject = sub.getText().toString();\n numberofbooks = num.getText().toString();\n rating = r.getRating();\n //TODO: Add this object into the SellingBook model class and retrofit it\n MyAsyncTask task = new MyAsyncTask();\n task.execute(\"\");//url\n\n }", "protected void _submit(Context ctx, IObjectPK pk, IObjectValue model)\n \t\tthrows BOSException, EASBizException {\n \tsuper._submit(ctx, pk, model);\n }", "public void fit(int[][] trainingData, int[][] trainingLabels) {\n\t\tfor(int epoch = 0; epoch < maxEpoch; epoch ++) {\n\t\t\tfor(int i = 0; i < trainingData.length; i++) {\n\t\t\t\ttrain(trainingData[i], trainingLabels[i]);\n\t\t\t}\n\t\t}\n\t}", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}", "public abstract void Train() throws Exception;", "public void submit(final EvaluatorRequest req);" ]
[ "0.61615855", "0.6125686", "0.6031967", "0.59588534", "0.58757704", "0.5809467", "0.57490736", "0.57155085", "0.56735057", "0.5658799", "0.56569594", "0.5587014", "0.5570596", "0.5534008", "0.54988855", "0.54975724", "0.5443308", "0.54428124", "0.544174", "0.54089606", "0.54041857", "0.5364986", "0.53566605", "0.5315326", "0.5222139", "0.5217577", "0.51903117", "0.51807", "0.5178946", "0.51772267", "0.5172128", "0.5170246", "0.5166067", "0.5145626", "0.51433396", "0.5137283", "0.513288", "0.51047534", "0.51030993", "0.50939953", "0.5076628", "0.50658965", "0.50629014", "0.50616556", "0.50588137", "0.50551045", "0.5048134", "0.50478625", "0.50443", "0.5036632", "0.50321454", "0.4999347", "0.499302", "0.49852514", "0.49769184", "0.49754134", "0.49691135", "0.49677765", "0.49607015", "0.493674", "0.49304435", "0.49263448", "0.49255735", "0.4922557", "0.49182698", "0.4917343", "0.4916653", "0.49157876", "0.49148688", "0.490255", "0.48950726", "0.48931462", "0.4881882", "0.48731208", "0.48669037", "0.4857839", "0.48373592", "0.48344967", "0.48329175", "0.48318768", "0.4827349", "0.48271373", "0.48242423", "0.4820882", "0.48155177", "0.4814081", "0.4808705", "0.47992706", "0.4783791", "0.47805142", "0.4768805", "0.47648445", "0.47524348", "0.47432977", "0.47363454", "0.47339585", "0.47319007", "0.47292736", "0.47198683", "0.47172323", "0.47157788" ]
0.0
-1
Submit model for training (asynchronously) Submit the model for training using the provided training data
public okhttp3.Call trainModelAsync(String workspaceId, String modelId, final ApiCallback<ModelApiResponse> _callback) throws ApiException { okhttp3.Call localVarCall = trainModelValidateBeforeCall(workspaceId, modelId, _callback); Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "public void run() {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n LOG.error(\"Submit: {} - run {}/{}\", topologies.get(jobIndex).name, ((jobCounter - 1) % runs) + 1, runs);\n client.submitTopology(topologies.get(jobIndex), null);\n }", "public void train(){\n recoApp.training(idsToTest);\n }", "private Response performDT_training(String model_name, String data) {\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MMM-yyyy_HmsS\");\n \tJSONObject summary = new JSONObject();\n \t\n \tif(model_name.trim().length()< 1) {\n \t\tmodel_name = \"DTree_Model_\" + sdf.format(Calendar.getInstance().getTime());\n \t}\n \t\n \t// check if the model name is already present\n \tif(utilObj.isModelNameUnique(model_name)) {\n \t\tsummary = new JSONObject();\n \t\tsummary.put(\"Error\", \"Duplicate model name : \" + model_name);\n \t\tlog.error(\"Duplicate model name\");\n \t\treturn Response.status(200).entity(summary.toString()).build();\n \t}\n \t\n \tlog.info(String.format(\"model_Name: %s\", model_name ));\n \tString modelFilePath = Util.CurrentDir+\"/models/\"+model_name;\n \t\n \ttry {\n\n \t\t// write the data to the disk\n \t\tfinal String inputFileName = \"TrainData_DT_\" + sdf.format(Calendar.getInstance().getTime()) + \".csv\";\n \t\tfinal String inputFilePath = Util.CurrentDir+\"/\"+Util.DataDir+\"/\"+inputFileName;\n \t\tFileWriter writer = new FileWriter(inputFilePath);\n \t\twriter.write(data);\n \t\twriter.flush();\n \t\twriter.close();\n \t\tlog.info(\"File created : \" + inputFilePath);\n \t\t\n \t\tString cmd = String.format(\"Rscript \"+Util.CurrentDir+\"/Rscripts/DTTraining.R %s %s \",inputFilePath, model_name);\n \t\tlog.info(cmd);\n\t \tProcess pr = Runtime.getRuntime().exec(cmd);\n\t\t\t\n\t\t\tBufferedReader results = new BufferedReader(new InputStreamReader(pr.getInputStream()));\n\t\t\tString line = null;\n\t\t\t\n\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\twhile((line=results.readLine()) != null) {\n\t\t\t\tbuf.append(line);\n\t\t\t\tif(line.trim().isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine().trim();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tsummary.put(\"summary\", line);\n\t\t\t\t} \n\t\t\t\telse if(line.trim().equalsIgnoreCase(\"Primary splits:\")) {\n\t\t\t\t\tline = results.readLine();\n\t\t\t\t\tbuf.append(line);\n\t\t\t\t\tJSONArray Psplits = new JSONArray();\t\t\t\t\t\n\t\t\t\t\twhile(!line.trim().equalsIgnoreCase(\"Surrogate splits:\")) {\n\t\t\t\t\t\tString s[] = line.split(\"\\t\");\n\t\t\t\t\t\tfor(String s1 : s) {\n\t\t\t\t\t\t\tSystem.out.println(s1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJSONArray splitCols = new JSONArray(s);\n\t\t\t\t\t\tline = results.readLine();\n\t\t\t\t\t\tbuf.append(line);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tsummary.put(\"model_name\", model_name + \".RData\");\n\t\t\t\tsummary.put(\"InputFile\", inputFileName);\n\t\t\t\tsummary.put(\"CommandName\", \"Rscripts/DTTraining.R\");\n\t\t\t}\n\t\t\tsummary.put(\"raw\", buf.toString());\n\t\t\t\n\t\t\t// format the summary json as params { [key : val] }\n\t\t\tJSONArray finalSummary = new JSONArray();\n\t\t\tIterator<String> keys = summary.keySet().iterator();\n\t\t\twhile(keys.hasNext()) {\n\t\t\t\tJSONObject row = new JSONObject();\n\t\t\t\trow.put(\"attribute\", keys.next());\n\t\t\t\trow.put(\"value\", summary.get(row.getString(\"attribute\")));\n\t\t\t\tfinalSummary.put(row);\n\t\t\t}\n\t\t\treturn Response.status(200).entity(new JSONObject().put(\"summary\", finalSummary).toString()).build();\n\t\t\t\n \t} catch (Exception e) {\n \t\te.printStackTrace();\n \t}\n\t\t\n \treturn Response.status(200).entity(summary.toString()).build();\n }", "public void submit(Batch batch);", "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "private synchronized void downloadModel(String modelName) {\n final FirebaseCustomRemoteModel remoteModel =\n new FirebaseCustomRemoteModel\n .Builder(modelName)\n .build();\n FirebaseModelDownloadConditions conditions =\n new FirebaseModelDownloadConditions.Builder()\n .requireWifi()\n .build();\n final FirebaseModelManager firebaseModelManager = FirebaseModelManager.getInstance();\n firebaseModelManager\n .download(remoteModel, conditions)\n .continueWithTask(task ->\n firebaseModelManager.getLatestModelFile(remoteModel)\n )\n .continueWith(executorService, (Continuation<File, Void>) task -> {\n // Initialize a text classifier instance with the model\n File modelFile = task.getResult();\n\n // TODO 6: Initialize a TextClassifier with the downloaded model\n textClassifier = NLClassifier.createFromFile(modelFile);\n\n // Enable predict button\n predictButton.setEnabled(true);\n return null;\n })\n .addOnFailureListener(e -> {\n Log.e(TAG, \"Failed to download and initialize the model. \", e);\n Toast.makeText(\n MainActivity.this,\n \"Model download failed, please check your connection.\",\n Toast.LENGTH_LONG)\n .show();\n predictButton.setEnabled(false);\n });\n }", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "public void submitWorkTasks(WorkflowDefine workflowDefine) {\n\t\t\n\t\t\n\t}", "public void submitMicrotask(Key<Microtask> microtaskKey, String jsonDTOData, String workerID, Project project){\n\t\tWorkerCommand.increaseStat(workerID, \"submits\",1);\n\t\tMicrotask microtask = ofy().load().key( microtaskKey ).now();\n\t\tif(microtask!=null){\t\t\t\n\t\t\t// submit only if the request come from\n\t\t\t// the current assigned worker of the microtask\n\t\t\tif(microtask.isAssignedTo(workerID) ){\t\t\n\t\t\t\t//boolean to signal if review microtask was created -> microtask is waiting review\n\t\t\t\tboolean waitReview = true;\n\t\t\t\t\n\t\t\t\t// If reviewing is enabled and the microtask\n\t\t\t\t// is not in [Review, ReuseSearch,DebugTestFailure],\n\t\t\t\t// spawn a new review microtask\n\t\t\t\tif (reviewsEnabled && !( microtask.getClass().equals(Review.class) || microtask.getClass().equals(ChallengeReview.class)) ){\n\t\t\t\t\tMicrotaskCommand.createReview(microtaskKey, workerID, jsonDTOData, workerID);\n\n\t\t\t\t}\n\t\t\t\t// else submit the microtask\n\t\t\t\telse {\n\t\t\t\t\tMicrotaskCommand.submit(microtaskKey, jsonDTOData, workerID, microtask.getSubmitValue());\n\t\t\t\t\twaitReview = false;\n\t\t\t\t}\n\n\t\t\t\tFirebaseService.writeMicrotaskWaitingReview(Microtask.keyToString(microtaskKey),workerID, this.id, waitReview);\n\t\t\t\t// write the history log entry about the microtask submission\n\t\t\t\tHistoryLog.Init(this.getID()).addEvent(new MicrotaskSubmitted(microtask, workerID));\n\t\t\t\tFirebaseService.writeMicrotaskSubmission(jsonDTOData, Microtask.keyToString(microtaskKey), this.id);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLogger.getLogger(\"LOGGER\").severe(\"LOAD FAILED: MICROTASK \"+microtaskKey);\n\t\t}\n\n\n\t}", "public void updateDataModel() {\n //this.dataModel = new TelemetryChartDataModel();\n this.dataModel.\n setModel(getStartDate(), getEndDate(), selectedProjects, telemetryName, parameters);\n Thread thread = new Thread() {\n @Override\n public void run() {\n dataModel.loadData();\n }\n };\n thread.start();\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate void buildAndSubmit() throws Exception\r\n {\r\n TopologyBuilder builder = new TopologyBuilder();\r\n builder.setSpout(RANDOM_SENTENCE_SPOUT_ID, new RandomSentenceSpout(), 1);\r\n builder.setBolt(KAFKA_BOLT_ID, new KafkaBolt(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n builder.setBolt(HBASE_UPDATE_BOLT_ID, HBaseUpdateBolt.make(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n \r\n Config conf = new Config(); \r\n conf.setDebug(false);\r\n \r\n StormSubmitter.submitTopology(\"jason-hbase-storm\", conf, builder.createTopology());\r\n }", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifierObject = ObjectClassifier.create(context.getAssets(), TYPE_MODEL, LABEL_TYPE, INPUT_SIZE_TYPE);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "private void train(NeuralDataSet input) {\n\n\tfinal NeuralDataSet theInput = input;\n\tfinal VirtualLibraryButler that = this;\n\n\ttraining = new Thread() {\n\t public void run() {\n\n\t\torg.encog.util.logging.Logging.setConsoleLevel(Level.OFF);\n\n\t\tfinal Train train = new CompetitiveTraining(brain, 0.7,\n\t\t\ttheInput, new NeighborhoodGaussian(\n\t\t\t\tnew GaussianFunction(0.0, 5.0, 1.5)));\n\t\tStrategy smartLearn = new SmartLearningRate();\n\n\t\tsmartLearn.init(train);\n\t\ttrain.addStrategy(smartLearn);\n\n\t\tint epoch = 0;\n\t\tint errorSize = 250;\n\n\t\tdouble[] lastErrors = new double[errorSize];\n\n\t\t// training loop\n\t\tdo {\n\t\t train.iteration();\n\t\t // System.out.println(\"Epoch #\" + epoch + \" Error:\" +\n\t\t // train.getError()); // + \" MovingAvg:\" + movingAvg);\n\t\t lastErrors[epoch % errorSize] = train.getError();\n\n\t\t double avg = 0;\n\t\t for (int i = 0; (i < epoch) && (i < errorSize); ++i)\n\t\t\tavg = (avg * i + lastErrors[i]) / (i + 1);\n\n\t\t if (Math.abs(avg - train.getError()) < 0.01)\n\t\t\ttrain.setError(0.001);\n\n\t\t epoch++;\n\t\t} while (train.getError() > 0.01);\n\n\t\t// System.out.println(\"training complete.\");\n\n\t\tthat.initialized = true;\n\t }\n\t};\n\n\ttraining.start();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.train(groupid_long, TRAIN_TYPE.all );\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsessionId = result.data+\"\";\n\t\t\t\t Log.e(TAG,sessionId);\n\t\t\t}", "public void submitSyncAppsTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncAppsTrafficTask()...\");\n\t\taddTask(new SyncAppsTrafficTask());\n\t}", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "void setTrainData(DataModel trainData);", "public void train() throws Exception;", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_FILE,\n LABEL_FILE,\n INPUT_SIZE,\n IMAGE_MEAN,\n IMAGE_STD,\n INPUT_NAME,\n OUTPUT_NAME);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "private static native boolean train_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj);", "public void run() {\n\n // Initialize control center.\n\n control = new Dispatch(parameters);\n control.run();\n linked = control.gettasks();\n\n // Initialize trains.\n\n trains = new TrainSim[parameters.numTrains];\n\n for (int i = 0; i < parameters.numTrains; i++) {\n\n trains[i] = new TrainSim(parameters, i);\n trains[i].genbasis();\n\n }\n\n // Add linked tasks to trains.\n\n for (Task each : linked) {\n\n int trainid = each.getTrain();\n each = new Task(each.getType(), each.getBeginTime(), parameters, false);\n each.setID(trainid);\n if (each.getArrTime() < parameters.numHours*60) {\n trains[trainid].linktask(each);\n }\n }\n\n // Run each train\n\n for (TrainSim each : trains) {\n\n each.run();\n\n }\n\n }", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_PATH,\n LABEL_PATH,\n INPUT_SIZE,\n QUANT);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public void submitSyncDeviceTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncDeviceTrafficTask()...\");\n\t\taddTask(new SyncDeviceTrafficTask());\n\t}", "public void startTrainingMode() {\n\t\t\r\n\t}", "public abstract void fit(BinaryData trainingData);", "private JsonObject callSpark(JsonObject o, String coords) {\n\t\t\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\r\n\t\tString sparkMasterIp = context.getInitParameter(\"sparkMasterIp\");\r\n\t\tString cassandraIp = context.getInitParameter(\"cassandraIp\");\r\n\t\t\r\n\t\tString url = \"http://\"+sparkMasterIp+\":6066/v1/submissions/create\";\r\n\r\n\t\tString payload = \"{\"+\"\\\"action\\\" : \\\"CreateSubmissionRequest\\\",\"+\r\n \"\\\"appArgs\\\" : [ \\\"\"+coords+\"\\\", \\\"1\\\" ],\"+\r\n \"\\\"appResource\\\" : \\\"file:/job-dependencies/CVSTSparkJobEngine-0.0.1-SNAPSHOT.jar\\\",\"+\r\n \"\\\"clientSparkVersion\\\" : \\\"1.3.0\\\",\"+\r\n \"\\\"environmentVariables\\\" : {\"+\r\n \"\\\"SPARK_ENV_LOADED\\\" : \\\"1\\\"\"+\r\n \"},\"+\r\n \"\\\"mainClass\\\" : \\\"ca.yorku.ceras.cvstsparkjobengine.job.LegisJob\\\",\"+\r\n \"\\\"sparkProperties\\\" : {\"+\r\n\t\"\\\"spark.jars\\\" : \\\"file:/job-dependencies/CVSTSparkJobEngine-0.0.1-SNAPSHOT.jar\\\",\"+\r\n \"\\\"spark.driver.extraClassPath\\\" : \\\"file:/job-dependencies/RoaringBitmap-0.4.5.jar:file:/job-dependencies/activation-1.1.jar:file:/job-dependencies/akka-actor_2.10-2.2.3-shaded-protobuf.jar:file:/job-dependencies/akka-remote_2.10-2.2.3-shaded-protobuf.jar:file:/job-dependencies/akka-slf4j_2.10-2.2.3-shaded-protobuf.jar:file:/job-dependencies/apacheds-i18n-2.0.0-M15.jar:file:/job-dependencies/apacheds-kerberos-codec-2.0.0-M15.jar:file:/job-dependencies/api-asn1-api-1.0.0-M20.jar:file:/job-dependencies/api-util-1.0.0-M20.jar:file:/job-dependencies/asm-3.1.jar:file:/job-dependencies/asm-5.0.3.jar:file:/job-dependencies/asm-analysis-5.0.3.jar:file:/job-dependencies/asm-commons-5.0.3.jar:file:/job-dependencies/asm-tree-5.0.3.jar:file:/job-dependencies/asm-util-5.0.3.jar:file:/job-dependencies/avro-1.7.6-cdh5.3.0.jar:file:/job-dependencies/aws-java-sdk-1.7.14.jar:file:/job-dependencies/cassandra-clientutil-2.1.5.jar:file:/job-dependencies/cassandra-driver-core-2.1.10.jar:file:/job-dependencies/chill-java-0.5.0.jar:file:/job-dependencies/chill_2.10-0.5.0.jar:file:/job-dependencies/commons-beanutils-1.7.0.jar:file:/job-dependencies/commons-beanutils-core-1.8.0.jar:file:/job-dependencies/commons-cli-1.2.jar:file:/job-dependencies/commons-codec-1.7.jar:file:/job-dependencies/commons-collections-3.2.1.jar:file:/job-dependencies/commons-compress-1.4.1.jar:file:/job-dependencies/commons-configuration-1.6.jar:file:/job-dependencies/commons-daemon-1.0.13.jar:file:/job-dependencies/commons-digester-1.8.jar:file:/job-dependencies/commons-el-1.0.jar:file:/job-dependencies/commons-httpclient-3.1.jar:file:/job-dependencies/commons-io-2.4.jar:file:/job-dependencies/commons-lang-2.6.jar:file:/job-dependencies/commons-lang3-3.3.2.jar:file:/job-dependencies/commons-logging-1.1.1.jar:file:/job-dependencies/commons-math-2.1.jar:file:/job-dependencies/commons-math3-3.2.jar:file:/job-dependencies/commons-net-2.2.jar:file:/job-dependencies/compress-lzf-1.0.0.jar:file:/job-dependencies/config-1.0.2.jar:file:/job-dependencies/core-3.1.1.jar:file:/job-dependencies/curator-client-2.6.0.jar:file:/job-dependencies/curator-framework-2.4.0.jar:file:/job-dependencies/curator-recipes-2.4.0.jar:file:/job-dependencies/findbugs-annotations-1.3.9-1.jar:file:/job-dependencies/gson-2.4.jar:file:/job-dependencies/guava-16.0.1.jar:file:/job-dependencies/hadoop-annotations-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-auth-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-aws-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-client-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-common-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-core-2.5.0-mr1-cdh5.3.0.jar:file:/job-dependencies/hadoop-hdfs-2.5.0-cdh5.3.0-tests.jar:file:/job-dependencies/hadoop-hdfs-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-mapreduce-client-app-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-common-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-core-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-jobclient-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-shuffle-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-api-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-client-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-common-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-server-common-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hamcrest-core-1.3.jar:file:/job-dependencies/hbase-client-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-common-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-common-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-hadoop-compat-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-hadoop-compat-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-hadoop2-compat-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-hadoop2-compat-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-prefix-tree-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-protocol-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-server-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-server-0.98.6-cdh5.3.0.jar:file:/job-dependencies/high-scale-lib-1.1.1.jar:file:/job-dependencies/hsqldb-1.8.0.10.jar:file:/job-dependencies/htrace-core-2.04.jar:file:/job-dependencies/httpclient-4.1.2.jar:file:/job-dependencies/httpcore-4.1.2.jar:file:/job-dependencies/ivy-2.4.0.jar:file:/job-dependencies/jackson-annotations-2.2.3.jar:file:/job-dependencies/jackson-core-2.2.3.jar:file:/job-dependencies/jackson-core-asl-1.8.8.jar:file:/job-dependencies/jackson-databind-2.2.3.jar:file:/job-dependencies/jackson-jaxrs-1.8.8.jar:file:/job-dependencies/jackson-mapper-asl-1.8.8.jar:file:/job-dependencies/jackson-module-scala_2.10-2.2.3.jar:file:/job-dependencies/jackson-xc-1.7.1.jar:file:/job-dependencies/jamon-runtime-2.3.1.jar:file:/job-dependencies/jasper-compiler-5.5.23.jar:file:/job-dependencies/jasper-runtime-5.5.23.jar:file:/job-dependencies/java-xmlbuilder-0.4.jar:file:/job-dependencies/javax.servlet-3.0.0.v201112011016.jar:file:/job-dependencies/jaxb-api-2.1.jar:file:/job-dependencies/jaxb-impl-2.2.3-1.jar:file:/job-dependencies/jcl-over-slf4j-1.7.5.jar:file:/job-dependencies/jersey-client-1.9.jar:file:/job-dependencies/jersey-core-1.8.jar:file:/job-dependencies/jersey-json-1.8.jar:file:/job-dependencies/jersey-server-1.8.jar:file:/job-dependencies/jets3t-0.9.0.jar:file:/job-dependencies/jettison-1.1.jar:file:/job-dependencies/jetty-6.1.26.cloudera.4.jar:file:/job-dependencies/jetty-continuation-8.1.14.v20131031.jar:file:/job-dependencies/jetty-http-8.1.14.v20131031.jar:file:/job-dependencies/jetty-io-8.1.14.v20131031.jar:file:/job-dependencies/jetty-server-8.1.14.v20131031.jar:file:/job-dependencies/jetty-sslengine-6.1.26.cloudera.4.jar:file:/job-dependencies/jetty-util-6.1.26.cloudera.4.jar:file:/job-dependencies/jetty-util-8.1.14.v20131031.jar:file:/job-dependencies/jffi-1.2.10-native.jar:file:/job-dependencies/jffi-1.2.10.jar:file:/job-dependencies/jnr-constants-0.9.0.jar:file:/job-dependencies/jnr-ffi-2.0.7.jar:file:/job-dependencies/jnr-posix-3.0.27.jar:file:/job-dependencies/jnr-x86asm-1.0.2.jar:file:/job-dependencies/joda-convert-1.2.jar:file:/job-dependencies/joda-time-2.3.jar:file:/job-dependencies/jodd-core-3.6.3.jar:file:/job-dependencies/jsch-0.1.42.jar:file:/job-dependencies/json4s-ast_2.10-3.2.10.jar:file:/job-dependencies/json4s-core_2.10-3.2.10.jar:file:/job-dependencies/json4s-jackson_2.10-3.2.10.jar:file:/job-dependencies/jsp-2.1-6.1.14.jar:file:/job-dependencies/jsp-api-2.1-6.1.14.jar:file:/job-dependencies/jsp-api-2.1.jar:file:/job-dependencies/jsr166e-1.1.0.jar:file:/job-dependencies/jsr305-1.3.9.jar:file:/job-dependencies/jul-to-slf4j-1.7.5.jar:file:/job-dependencies/junit-4.11.jar:file:/job-dependencies/kryo-2.21.jar:file:/job-dependencies/leveldbjni-all-1.8.jar:file:/job-dependencies/log4j-1.2.17.jar:file:/job-dependencies/lz4-1.2.0.jar:file:/job-dependencies/mesos-0.21.0-shaded-protobuf.jar:file:/job-dependencies/metrics-core-2.2.0.jar:file:/job-dependencies/metrics-core-3.0.2.jar:file:/job-dependencies/metrics-core-3.1.0.jar:file:/job-dependencies/metrics-graphite-3.1.0.jar:file:/job-dependencies/metrics-json-3.1.0.jar:file:/job-dependencies/metrics-jvm-3.1.0.jar:file:/job-dependencies/minlog-1.2.jar:file:/job-dependencies/netty-3.9.0.Final.jar:file:/job-dependencies/netty-all-4.0.23.Final.jar:file:/job-dependencies/netty-buffer-4.0.33.Final.jar:file:/job-dependencies/netty-codec-4.0.33.Final.jar:file:/job-dependencies/netty-common-4.0.33.Final.jar:file:/job-dependencies/netty-handler-4.0.33.Final.jar:file:/job-dependencies/netty-transport-4.0.33.Final.jar:file:/job-dependencies/objenesis-1.2.jar:file:/job-dependencies/oro-2.0.8.jar:file:/job-dependencies/paranamer-2.3.jar:file:/job-dependencies/parquet-column-1.6.0rc3.jar:file:/job-dependencies/parquet-common-1.6.0rc3.jar:file:/job-dependencies/parquet-encoding-1.6.0rc3.jar:file:/job-dependencies/parquet-format-2.2.0-rc1.jar:file:/job-dependencies/parquet-generator-1.6.0rc3.jar:file:/job-dependencies/parquet-hadoop-1.6.0rc3.jar:file:/job-dependencies/parquet-jackson-1.6.0rc3.jar:file:/job-dependencies/protobuf-java-2.4.1-shaded.jar:file:/job-dependencies/protobuf-java-2.5.0.jar:file:/job-dependencies/py4j-0.8.2.1.jar:file:/job-dependencies/pyrolite-2.0.1.jar:file:/job-dependencies/quasiquotes_2.10-2.0.1.jar:file:/job-dependencies/reflectasm-1.07-shaded.jar:file:/job-dependencies/scala-compiler-2.10.4.jar:file:/job-dependencies/scala-library-2.10.4.jar:file:/job-dependencies/scala-reflect-2.10.5.jar:file:/job-dependencies/scalap-2.10.0.jar:file:/job-dependencies/scalatest_2.10-2.1.5.jar:file:/job-dependencies/servlet-api-2.5-6.1.14.jar:file:/job-dependencies/servlet-api-2.5.jar:file:/job-dependencies/slf4j-api-1.7.5.jar:file:/job-dependencies/slf4j-log4j12-1.7.5.jar:file:/job-dependencies/snappy-java-1.0.4.1.jar:file:/job-dependencies/spark-cassandra-connector-java_2.10-1.3.1.jar:file:/job-dependencies/spark-cassandra-connector_2.10-1.3.1.jar:file:/job-dependencies/spark-catalyst_2.10-1.3.0.jar:file:/job-dependencies/spark-core_2.10-1.3.0-cdh5.4.7.jar:file:/job-dependencies/spark-hbase-0.0.2-clabs.jar:file:/job-dependencies/spark-network-common_2.10-1.3.0-cdh5.4.7.jar:file:/job-dependencies/spark-network-shuffle_2.10-1.3.0-cdh5.4.7.jar:file:/job-dependencies/spark-sql_2.10-1.3.0.jar:file:/job-dependencies/spark-streaming_2.10-1.2.0-cdh5.3.0-tests.jar:file:/job-dependencies/spark-streaming_2.10-1.2.0-cdh5.3.0.jar:file:/job-dependencies/stream-2.7.0.jar:file:/job-dependencies/tachyon-0.5.0.jar:file:/job-dependencies/tachyon-client-0.5.0.jar:file:/job-dependencies/uncommons-maths-1.2.2a.jar:file:/job-dependencies/unused-1.0.0.jar:file:/job-dependencies/xmlenc-0.52.jar:file:/job-dependencies/xz-1.0.jar:file:/job-dependencies/zookeeper-3.4.5-cdh5.3.0.jar\\\",\"+\r\n\t\"\\\"spark.executor.extraClassPath\\\" : \\\"file:/job-dependencies/RoaringBitmap-0.4.5.jar:file:/job-dependencies/activation-1.1.jar:file:/job-dependencies/akka-actor_2.10-2.2.3-shaded-protobuf.jar:file:/job-dependencies/akka-remote_2.10-2.2.3-shaded-protobuf.jar:file:/job-dependencies/akka-slf4j_2.10-2.2.3-shaded-protobuf.jar:file:/job-dependencies/apacheds-i18n-2.0.0-M15.jar:file:/job-dependencies/apacheds-kerberos-codec-2.0.0-M15.jar:file:/job-dependencies/api-asn1-api-1.0.0-M20.jar:file:/job-dependencies/api-util-1.0.0-M20.jar:file:/job-dependencies/asm-3.1.jar:file:/job-dependencies/asm-5.0.3.jar:file:/job-dependencies/asm-analysis-5.0.3.jar:file:/job-dependencies/asm-commons-5.0.3.jar:file:/job-dependencies/asm-tree-5.0.3.jar:file:/job-dependencies/asm-util-5.0.3.jar:file:/job-dependencies/avro-1.7.6-cdh5.3.0.jar:file:/job-dependencies/aws-java-sdk-1.7.14.jar:file:/job-dependencies/cassandra-clientutil-2.1.5.jar:file:/job-dependencies/cassandra-driver-core-2.1.10.jar:file:/job-dependencies/chill-java-0.5.0.jar:file:/job-dependencies/chill_2.10-0.5.0.jar:file:/job-dependencies/commons-beanutils-1.7.0.jar:file:/job-dependencies/commons-beanutils-core-1.8.0.jar:file:/job-dependencies/commons-cli-1.2.jar:file:/job-dependencies/commons-codec-1.7.jar:file:/job-dependencies/commons-collections-3.2.1.jar:file:/job-dependencies/commons-compress-1.4.1.jar:file:/job-dependencies/commons-configuration-1.6.jar:file:/job-dependencies/commons-daemon-1.0.13.jar:file:/job-dependencies/commons-digester-1.8.jar:file:/job-dependencies/commons-el-1.0.jar:file:/job-dependencies/commons-httpclient-3.1.jar:file:/job-dependencies/commons-io-2.4.jar:file:/job-dependencies/commons-lang-2.6.jar:file:/job-dependencies/commons-lang3-3.3.2.jar:file:/job-dependencies/commons-logging-1.1.1.jar:file:/job-dependencies/commons-math-2.1.jar:file:/job-dependencies/commons-math3-3.2.jar:file:/job-dependencies/commons-net-2.2.jar:file:/job-dependencies/compress-lzf-1.0.0.jar:file:/job-dependencies/config-1.0.2.jar:file:/job-dependencies/core-3.1.1.jar:file:/job-dependencies/curator-client-2.6.0.jar:file:/job-dependencies/curator-framework-2.4.0.jar:file:/job-dependencies/curator-recipes-2.4.0.jar:file:/job-dependencies/findbugs-annotations-1.3.9-1.jar:file:/job-dependencies/gson-2.4.jar:file:/job-dependencies/guava-16.0.1.jar:file:/job-dependencies/hadoop-annotations-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-auth-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-aws-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-client-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-common-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-core-2.5.0-mr1-cdh5.3.0.jar:file:/job-dependencies/hadoop-hdfs-2.5.0-cdh5.3.0-tests.jar:file:/job-dependencies/hadoop-hdfs-2.5.0-cdh5.3.0.jar:file:/job-dependencies/hadoop-mapreduce-client-app-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-common-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-core-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-jobclient-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-mapreduce-client-shuffle-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-api-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-client-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-common-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hadoop-yarn-server-common-2.6.0-cdh5.4.7.jar:file:/job-dependencies/hamcrest-core-1.3.jar:file:/job-dependencies/hbase-client-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-common-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-common-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-hadoop-compat-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-hadoop-compat-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-hadoop2-compat-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-hadoop2-compat-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-prefix-tree-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-protocol-0.98.6-cdh5.3.0.jar:file:/job-dependencies/hbase-server-0.98.6-cdh5.3.0-tests.jar:file:/job-dependencies/hbase-server-0.98.6-cdh5.3.0.jar:file:/job-dependencies/high-scale-lib-1.1.1.jar:file:/job-dependencies/hsqldb-1.8.0.10.jar:file:/job-dependencies/htrace-core-2.04.jar:file:/job-dependencies/httpclient-4.1.2.jar:file:/job-dependencies/httpcore-4.1.2.jar:file:/job-dependencies/ivy-2.4.0.jar:file:/job-dependencies/jackson-annotations-2.2.3.jar:file:/job-dependencies/jackson-core-2.2.3.jar:file:/job-dependencies/jackson-core-asl-1.8.8.jar:file:/job-dependencies/jackson-databind-2.2.3.jar:file:/job-dependencies/jackson-jaxrs-1.8.8.jar:file:/job-dependencies/jackson-mapper-asl-1.8.8.jar:file:/job-dependencies/jackson-module-scala_2.10-2.2.3.jar:file:/job-dependencies/jackson-xc-1.7.1.jar:file:/job-dependencies/jamon-runtime-2.3.1.jar:file:/job-dependencies/jasper-compiler-5.5.23.jar:file:/job-dependencies/jasper-runtime-5.5.23.jar:file:/job-dependencies/java-xmlbuilder-0.4.jar:file:/job-dependencies/javax.servlet-3.0.0.v201112011016.jar:file:/job-dependencies/jaxb-api-2.1.jar:file:/job-dependencies/jaxb-impl-2.2.3-1.jar:file:/job-dependencies/jcl-over-slf4j-1.7.5.jar:file:/job-dependencies/jersey-client-1.9.jar:file:/job-dependencies/jersey-core-1.8.jar:file:/job-dependencies/jersey-json-1.8.jar:file:/job-dependencies/jersey-server-1.8.jar:file:/job-dependencies/jets3t-0.9.0.jar:file:/job-dependencies/jettison-1.1.jar:file:/job-dependencies/jetty-6.1.26.cloudera.4.jar:file:/job-dependencies/jetty-continuation-8.1.14.v20131031.jar:file:/job-dependencies/jetty-http-8.1.14.v20131031.jar:file:/job-dependencies/jetty-io-8.1.14.v20131031.jar:file:/job-dependencies/jetty-server-8.1.14.v20131031.jar:file:/job-dependencies/jetty-sslengine-6.1.26.cloudera.4.jar:file:/job-dependencies/jetty-util-6.1.26.cloudera.4.jar:file:/job-dependencies/jetty-util-8.1.14.v20131031.jar:file:/job-dependencies/jffi-1.2.10-native.jar:file:/job-dependencies/jffi-1.2.10.jar:file:/job-dependencies/jnr-constants-0.9.0.jar:file:/job-dependencies/jnr-ffi-2.0.7.jar:file:/job-dependencies/jnr-posix-3.0.27.jar:file:/job-dependencies/jnr-x86asm-1.0.2.jar:file:/job-dependencies/joda-convert-1.2.jar:file:/job-dependencies/joda-time-2.3.jar:file:/job-dependencies/jodd-core-3.6.3.jar:file:/job-dependencies/jsch-0.1.42.jar:file:/job-dependencies/json4s-ast_2.10-3.2.10.jar:file:/job-dependencies/json4s-core_2.10-3.2.10.jar:file:/job-dependencies/json4s-jackson_2.10-3.2.10.jar:file:/job-dependencies/jsp-2.1-6.1.14.jar:file:/job-dependencies/jsp-api-2.1-6.1.14.jar:file:/job-dependencies/jsp-api-2.1.jar:file:/job-dependencies/jsr166e-1.1.0.jar:file:/job-dependencies/jsr305-1.3.9.jar:file:/job-dependencies/jul-to-slf4j-1.7.5.jar:file:/job-dependencies/junit-4.11.jar:file:/job-dependencies/kryo-2.21.jar:file:/job-dependencies/leveldbjni-all-1.8.jar:file:/job-dependencies/log4j-1.2.17.jar:file:/job-dependencies/lz4-1.2.0.jar:file:/job-dependencies/mesos-0.21.0-shaded-protobuf.jar:file:/job-dependencies/metrics-core-2.2.0.jar:file:/job-dependencies/metrics-core-3.0.2.jar:file:/job-dependencies/metrics-core-3.1.0.jar:file:/job-dependencies/metrics-graphite-3.1.0.jar:file:/job-dependencies/metrics-json-3.1.0.jar:file:/job-dependencies/metrics-jvm-3.1.0.jar:file:/job-dependencies/minlog-1.2.jar:file:/job-dependencies/netty-3.9.0.Final.jar:file:/job-dependencies/netty-all-4.0.23.Final.jar:file:/job-dependencies/netty-buffer-4.0.33.Final.jar:file:/job-dependencies/netty-codec-4.0.33.Final.jar:file:/job-dependencies/netty-common-4.0.33.Final.jar:file:/job-dependencies/netty-handler-4.0.33.Final.jar:file:/job-dependencies/netty-transport-4.0.33.Final.jar:file:/job-dependencies/objenesis-1.2.jar:file:/job-dependencies/oro-2.0.8.jar:file:/job-dependencies/paranamer-2.3.jar:file:/job-dependencies/parquet-column-1.6.0rc3.jar:file:/job-dependencies/parquet-common-1.6.0rc3.jar:file:/job-dependencies/parquet-encoding-1.6.0rc3.jar:file:/job-dependencies/parquet-format-2.2.0-rc1.jar:file:/job-dependencies/parquet-generator-1.6.0rc3.jar:file:/job-dependencies/parquet-hadoop-1.6.0rc3.jar:file:/job-dependencies/parquet-jackson-1.6.0rc3.jar:file:/job-dependencies/protobuf-java-2.4.1-shaded.jar:file:/job-dependencies/protobuf-java-2.5.0.jar:file:/job-dependencies/py4j-0.8.2.1.jar:file:/job-dependencies/pyrolite-2.0.1.jar:file:/job-dependencies/quasiquotes_2.10-2.0.1.jar:file:/job-dependencies/reflectasm-1.07-shaded.jar:file:/job-dependencies/scala-compiler-2.10.4.jar:file:/job-dependencies/scala-library-2.10.4.jar:file:/job-dependencies/scala-reflect-2.10.5.jar:file:/job-dependencies/scalap-2.10.0.jar:file:/job-dependencies/scalatest_2.10-2.1.5.jar:file:/job-dependencies/servlet-api-2.5-6.1.14.jar:file:/job-dependencies/servlet-api-2.5.jar:file:/job-dependencies/slf4j-api-1.7.5.jar:file:/job-dependencies/slf4j-log4j12-1.7.5.jar:file:/job-dependencies/snappy-java-1.0.4.1.jar:file:/job-dependencies/spark-cassandra-connector-java_2.10-1.3.1.jar:file:/job-dependencies/spark-cassandra-connector_2.10-1.3.1.jar:file:/job-dependencies/spark-catalyst_2.10-1.3.0.jar:file:/job-dependencies/spark-core_2.10-1.3.0-cdh5.4.7.jar:file:/job-dependencies/spark-hbase-0.0.2-clabs.jar:file:/job-dependencies/spark-network-common_2.10-1.3.0-cdh5.4.7.jar:file:/job-dependencies/spark-network-shuffle_2.10-1.3.0-cdh5.4.7.jar:file:/job-dependencies/spark-sql_2.10-1.3.0.jar:file:/job-dependencies/spark-streaming_2.10-1.2.0-cdh5.3.0-tests.jar:file:/job-dependencies/spark-streaming_2.10-1.2.0-cdh5.3.0.jar:file:/job-dependencies/stream-2.7.0.jar:file:/job-dependencies/tachyon-0.5.0.jar:file:/job-dependencies/tachyon-client-0.5.0.jar:file:/job-dependencies/uncommons-maths-1.2.2a.jar:file:/job-dependencies/unused-1.0.0.jar:file:/job-dependencies/xmlenc-0.52.jar:file:/job-dependencies/xz-1.0.jar:file:/job-dependencies/zookeeper-3.4.5-cdh5.3.0.jar\\\",\"+\r\n \"\\\"spark.driver.supervise\\\" : \\\"false\\\",\"+\r\n \"\\\"spark.app.name\\\" : \\\"ca.yorku.ceras.cvstsparkjobengine.job.LegisJob\\\",\"+\r\n \"\\\"spark.eventLog.enabled\\\": \\\"false\\\",\"+\r\n \"\\\"spark.submit.deployMode\\\" : \\\"cluster\\\",\"+\r\n \"\\\"spark.master\\\" : \\\"spark://\"+sparkMasterIp+\":6066\\\",\"+\r\n\t\"\\\"spark.cassandra.connection.host\\\" : \\\"\"+cassandraIp+\"\\\",\"+\r\n \"\\\"spark.executor.cores\\\" : \\\"1\\\",\"+\r\n \"\\\"spark.cores.max\\\" : \\\"1\\\"\"+\r\n \"}\"+\r\n\"}'\";\r\n\t\t\r\n\t\tClient client = ClientBuilder.newClient();\r\n\t\tResponse response = client.target(url).request(MediaType.APPLICATION_JSON_TYPE).post(Entity.json(payload));\r\n\t\t\r\n\t\t// check response status code\r\n if (response.getStatus() != 200) {\r\n throw new RuntimeException(\"Failed : HTTP error code : \" + response.getStatus());\r\n }\r\n \r\n\t\tJsonReader reader = new JsonReader(new StringReader(response.readEntity(String.class)));\r\n\t\treader.setLenient(true);\r\n\t\tJsonObject jsonResponse = new JsonParser().parse(reader).getAsJsonObject();\r\n\t\t\r\n\t\tString submissionId = jsonResponse.get(\"submissionId\").getAsString();\r\n\t\t\r\n\t\turl = \"http://\"+sparkMasterIp+\":6066/v1/submissions/status/\" + submissionId;\r\n\t\t\r\n\t\tString status = \"\";\r\n\t\t\r\n\t\tint attempts = 0;\r\n\t\t\r\n\t\twhile (attempts < 600) {\t\t\t\r\n\t\t\tresponse = client.target(url).request(MediaType.APPLICATION_JSON_TYPE).get();\r\n\t\t\t\r\n\t\t\t// check response status code\r\n\t if (response.getStatus() != 200) {\r\n\t throw new RuntimeException(\"Failed : HTTP error code : \" + response.getStatus());\r\n\t }\r\n\t \r\n\t String result = response.readEntity(String.class);\r\n\t \r\n\t //System.out.println(\"RESULT: \" + result);\r\n\t \r\n\t if (result.contains(\"FINISHED\")) {\r\n\t \tstatus = \"FINISHED\";\r\n\t \tbreak;\r\n\t } else if (result.contains(\"FAILED\")) {\r\n\t \tstatus = \"FAILED\";\r\n\t \tbreak;\r\n\t }\r\n\t \r\n\t try {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t \r\n\t attempts++;\r\n\t\t}\r\n\t\t\r\n\t\tif (status.equals(\"\"))\r\n\t\t\tthrow new RuntimeException(\"Failed to retrieve Spark job status\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\treader.close();\r\n\t\t\tclient.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tint cont = 0;\r\n\t\t\r\n\t\tfor (JsonElement route : o.get(\"routes\").getAsJsonArray()) {\r\n\t\t\tfor (JsonElement leg : route.getAsJsonObject().get(\"legs\").getAsJsonArray()) {\r\n\t\t\t\tfor (JsonElement step : leg.getAsJsonObject().get(\"steps\").getAsJsonArray()) {\r\n\t\t\t\t\tJsonObject stepObject = step.getAsJsonObject();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (status.equals(\"FINISHED\")) {\r\n\t\t\t\t\t\tstepObject.addProperty(\"score\", \"\"+SCORES[cont]);\r\n\t\t\t\t\t\tcont++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstepObject.addProperty(\"score\", \"FAILED\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\r\n\t\tServletContextInitializer.logger.info(\"TIME SPENT WITH SPARK: \" + (endTime-startTime) + \" milliseconds\");\r\n\t\t\r\n\t\treturn o;\r\n\t}", "public abstract void submit(Callable callable);", "@WorkerThread\n public abstract void saveToDb(NetworkModel fetchedModel);", "@Override\n\tpublic TimeSeriesForestClassifier call()\n\t\t\tthrows InterruptedException, AlgorithmExecutionCanceledException, TimeoutException, AlgorithmException {\n\t\t\n\t\tTimeSeriesDataset dataset = this.getInput();\n\t\t\n\t\t// Perform Training\n\t\tfinal TimeSeriesTree[] trees = new TimeSeriesTree[this.numTrees];\n\t\tExecutorService execService = Executors.newFixedThreadPool(this.cpus);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tFuture<TimeSeriesTree>[] futures = new Future[this.numTrees];\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\tTimeSeriesTree tst = new TimeSeriesTree(this.maxDepth, this.seed + i, this.useFeatureCaching);\n\t\t\tfutures[i] = execService.submit(new Callable<TimeSeriesTree>() {\n\t\t\t\t@Override\n\t\t\t\tpublic TimeSeriesTree call() throws Exception {\n\n\t\t\t\t\ttst.train(dataset);\n\t\t\t\t\ttst.setTrained(true);\n\t\t\t\t\treturn tst;\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Wait for completion\n\t\texecService.shutdown();\n\t\texecService.awaitTermination(this.timeout.seconds(), TimeUnit.SECONDS);\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\ttry {\n\t\t\t\tTimeSeriesTree tst = futures[i].get();\n\t\t\t\ttrees[i] = tst;\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\tthrow new AlgorithmException(\n\t\t\t\t\t\t\"Could not train time series tree due to training exception: \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\tthis.model.setTrees(trees);\n\t\tthis.model.setTrained(true);\n\n\t\treturn this.model;\n\t}", "public void submit(Task task) {\n\t\tthis.engine.pushTask(task);\n\t}", "@Override\n public void onTaskSubmit() {\n TaskInput taskInput = new TaskInput();\n taskInput.setTaskId(mTaskId);\n taskInput.setRatings(ratings);\n\n Callback<TaskInputResponse> taskInputCallback = new Callback<TaskInputResponse>() {\n @Override\n public void success(TaskInputResponse taskInputResponse, Response response) {\n ((GameActivity)mCtx).hideProgress();\n ((GameActivity) mCtx).finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n ((GameActivity)mCtx).hideProgress();\n ((GameActivity) mCtx).finish();\n }\n };\n\n // The multipart content that will be sent to server when the task is submitted\n MultipartTypedOutput attachments = new MultipartTypedOutput();\n\n // Populate a TypedFile list with all the recordings made during the current task\n ArrayList<TypedFile> typedFiles = new ArrayList<>();\n for(TaskInputAnswer answer : answers) {\n ArrayList<String> fileNames = answer.getFileNames();\n for(String fileName : fileNames) {\n typedFiles.add(new TypedFile(\"multipart/form-data\", new File(fileName)));\n }\n }\n\n // Get rid of the absolute path and keep only the file name for the recorded files list that\n //will be stored in the json\n for(int i = 0; i < answers.size(); ++i) {\n ArrayList<String> newFileNames = new ArrayList<>();\n for(int j = 0; j < answers.get(i).getFileNames().size(); ++j) {\n File file = new File(answers.get(i).getFileNames().get(j));\n newFileNames.add(file.getName());\n }\n answers.get(i).setFileNames(newFileNames);\n }\n taskInput.setAnswers(answers);\n\n // Convert TaskInput into JSON using Gson library\n Gson gson = new Gson();\n String taskInputJson = gson.toJson(taskInput);\n TypedString inputs = new TypedString(taskInputJson);\n\n // Add the json to the multipart objects as text/plain using the key \"Inputs\"\n attachments.addPart(\"Inputs\", inputs);\n\n // Add each file to the multipart object using the key \"file\"\n for(TypedFile typedFile : typedFiles) {\n attachments.addPart(\"file\", typedFile);\n }\n\n ((GameActivity)mCtx).showProgress();\n // Execute the POST request\n ((GameApi) SpeechApp.getApiOfType(ApiTypes.GAME_API)).taskInput(attachments, taskInputCallback);\n }", "public abstract void submit(Runnable runnable);", "private void runOnlineModel() {\n myScenario.setProbe(myProbe);\n myScenario.setSynchronizationMode(mySrcSelector);\n try {\n myScenario.resync();\n myScenario.run();\n } catch (SynchronizationException e) {\n System.out.println(e);\n } catch (ModelException e) {\n System.out.println(e);\n }\n }", "private static native boolean train_auto_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj, int k_fold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);", "public void flushAndSubmit() {\n nFlushAndSubmit(mNativeInstance);\n }", "private void startSubmitting() {\n final Runnable submitTask = () -> {\n if (!plugin.isEnabled()) { // Plugin was disabled\n scheduler.shutdown();\n return;\n }\n // Nevertheless we want our code to run in the Nukkit main thread, so we have to use the Nukkit scheduler\n // Don't be afraid! The connection to the bStats server is still async, only the stats collection is sync ;)\n Server.getInstance().getScheduler().scheduleTask(plugin, this::submitData);\n };\n \n // Many servers tend to restart at a fixed time at xx:00 which causes an uneven distribution of requests on the\n // bStats backend. To circumvent this problem, we introduce some randomness into the initial and second delay.\n // WARNING: You must not modify and part of this Metrics class, including the submit delay or frequency!\n // WARNING: Modifying this code will get your plugin banned on bStats. Just don't do it!\n long initialDelay = (long) (1000 * 60 * (3 + Math.random() * 3));\n long secondDelay = (long) (1000 * 60 * (Math.random() * 30));\n scheduler.schedule(submitTask, initialDelay, TimeUnit.MILLISECONDS);\n scheduler.scheduleAtFixedRate(submitTask, initialDelay + secondDelay, 1000 * 60 * 30, TimeUnit.MILLISECONDS);\n }", "public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "private void readModelAndTrain(boolean readExistingModel,\n\t\t\tbyte[] trainingDataFile) {\n\t\tInputStream dataIn = null;\n\t\ttry {\n\t\t\tObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(\n\t\t\t\t\tnew PlainTextByLineStream(new FileInputStream(\n\t\t\t\t\t\t\tcreateModelInput(INPUT_TWEETS_ORIG_TXT)), \"UTF-8\"));\n\t\t\tsetModel(DocumentCategorizerME.train(\"en\", sampleStream,\n\t\t\t\t\tCUTOFF_FREQ, TRAINING_ITERATIONS));\n\t\t\tserialize(model);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (dataIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public IObserver train(IContext context) throws ThinklabException;", "public void run(JavaSparkContext jsc, String trainingDataPath) throws IOException {\n if (trainingDataPath == null) {\n upload(jsc);\n return;\n }\n\n JavaPairRDD<String, String> docLoad;\n if (trainingDataPath.isEmpty()) {\n docLoad = load(jsc);\n } else {\n String docDelimiter = StringEscapeUtils.unescapeJava(conf.get(DOC_DELIMITER));\n docLoad = new HDFSRead().loadTextFile(jsc, trainingDataPath).mapToPair(line -> new Tuple2<>(line.split(docDelimiter)[0], line.split(docDelimiter)[1]));\n\n }\n\n JavaPairRDD<String, Tuple2<String, String>> docDownload = download(docLoad);\n JavaPairRDD<String, Tuple2<String, String>> docClean = clean(docDownload);\n save(docClean);\n }", "public void upload(JavaSparkContext jsc) throws IOException {\n int partitions = conf.getInt(PARTITIONS, 48);\n String docDelimiter = StringEscapeUtils.unescapeJava(conf.get(DOC_DELIMITER));\n\n /* load training data */\n List<String> resource = IOUtils\n .readLines(getClass().getClassLoader().getResourceAsStream(conf.get(TRAININGDATA_RESOURCE)));\n\n Broadcast<List<String>> broadcastRes = jsc.broadcast(resource);\n\n JavaPairRDD<String, Tuple2<String, String>> doc = jsc\n .parallelize(broadcastRes.value())\n .persist(StorageLevel.MEMORY_AND_DISK_SER_2())\n .repartition(partitions)\n .filter(line -> line.split(docDelimiter).length >= 2)\n .mapToPair(line -> new Tuple2<>(line.split(docDelimiter)[0],\n new Tuple2<>(line.split(docDelimiter)[1], line.split(docDelimiter)[2])));\n /* save */\n save(doc);\n }", "public boolean train_auto(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params, int k_fold, CvParamGrid Cgrid, CvParamGrid gammaGrid, CvParamGrid pGrid, CvParamGrid nuGrid, CvParamGrid coeffGrid, CvParamGrid degreeGrid, boolean balanced)\r\n {\r\n\r\n boolean retVal = train_auto_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj, k_fold, Cgrid.nativeObj, gammaGrid.nativeObj, pGrid.nativeObj, nuGrid.nativeObj, coeffGrid.nativeObj, degreeGrid.nativeObj, balanced);\r\n\r\n return retVal;\r\n }", "public okhttp3.Call addTrainingDataAsync(String workspaceId, String modelId, TrainingData trainingData, final ApiCallback<ModelApiResponse> _callback) throws ApiException {\n\n okhttp3.Call localVarCall = addTrainingDataValidateBeforeCall(workspaceId, modelId, trainingData, _callback);\n Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();\n localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);\n return localVarCall;\n }", "public void submit() {\n fileUploadContainer.upload.submit();\n }", "public void submit(View v) {\n nam = name.getText().toString();\n phon = phone.getText().toString();\n bookname = bname.getText().toString();\n authorname = aname.getText().toString();\n edition = edi.getText().toString();\n price = pric.getText().toString();\n subject = sub.getText().toString();\n numberofbooks = num.getText().toString();\n rating = r.getRating();\n //TODO: Add this object into the SellingBook model class and retrofit it\n MyAsyncTask task = new MyAsyncTask();\n task.execute(\"\");//url\n\n }", "public String execute(String input) {\n Data data = Serializer.parse(input, Data.class);\n\n // Step #2: Check the discriminator\n final String discriminator = data.getDiscriminator();\n if (discriminator.equals(Discriminators.Uri.ERROR)) {\n // Return the input unchanged.\n return input;\n }\n\n // Create a series of pipes to process the training files\n ArrayList<Pipe> pipeList = new ArrayList<>();\n pipeList.add(new Input2CharSequence(\"UTF-8\"));\n // Pipes: lowercase, tokenize, remove stopwords, map to features\n pipeList.add( new CharSequenceLowercase() );\n pipeList.add( new CharSequence2TokenSequence(Pattern.compile(\"\\\\p{L}[\\\\p{L}\\\\p{P}]+\\\\p{L}\")) );\n pipeList.add( new TokenSequenceRemoveStopwords());\n pipeList.add( new TokenSequence2FeatureSequence());\n pipe = new SerialPipes(pipeList);\n\n // put the directory of files used for training through the pipes\n String directory = data.getParameter(\"directory\").toString();\n InstanceList instances = readDirectory(new File(directory));\n\n // create a topic to be trained\n int numberOfTopics = (Integer) data.getParameter(\"numTopics\");\n ParallelTopicModel topicModel = new ParallelTopicModel(numberOfTopics);\n topicModel.addInstances(instances);\n\n // train the model\n try {\n topicModel.estimate();\n } catch (IOException e){\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to train the model\").asJson();\n }\n\n // write topic keys file\n String path = data.getParameter(\"path\").toString();\n String keysName = data.getParameter(\"keysName\").toString();\n int wordsPerTopic = (Integer) data.getParameter(\"wordsPerTopic\");\n try {\n topicModel.printTopWords(new File(path + \"/\" + keysName), wordsPerTopic, false);\n } catch (IOException e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the topic keys to \" + path + \"/\" + keysName).asJson();\n }\n\n // write the .inferencer file\n String inferencerName = data.getParameter(\"inferencerName\").toString();\n try {\n ObjectOutputStream oos =\n new ObjectOutputStream (new FileOutputStream (path + \"/\" + inferencerName));\n oos.writeObject (topicModel.getInferencer());\n oos.close();\n } catch (Exception e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the inferencer to \" + path + \"/\" + inferencerName).asJson();\n }\n\n // Success\n return new Data<>(Discriminators.Uri.TEXT, \"Success\").asJson();\n }", "@Override\n public void run() {\n if (checkFailure()) {\n throw new InvalidInputException(\"任务结果计算器暂时无法工作,因为未满足条件\");\n } else {\n analysisDistribution();\n File file = writeFile();\n task.setResult(OSSWriter.upload(file));\n task.setHasResult(true);\n taskController.update(task);\n }\n }", "@Override\n public void run() {\n long[] saved = AppDatabase.getInstance().modelByName(name).insertAll((List) response);\n updateProgressDownload(1, name);\n }", "public static void submitSensorData(final Context context) {\n SharedPreferences loginPrefs = context.getSharedPreferences(\"UserLogin\", MODE_PRIVATE);\n if (Tools.isNetworkAvailable(context)) {\n List<Long> fileNamesInLong = new ArrayList<>();\n File[] filePaths = context.getFilesDir().listFiles(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return (file.getPath().endsWith(\".csv\"));\n }\n });\n\n for (File filePath : filePaths) {\n String fName = filePath.getName();\n String tmp = fName.substring(fName.lastIndexOf('_') + 1);\n fileNamesInLong.add(Long.valueOf(tmp.substring(0, tmp.lastIndexOf('.'))));\n }\n Collections.sort(fileNamesInLong);\n\n for (int n = 0; n < fileNamesInLong.size() - 1; n++) {\n String fPath = context.getFilesDir() + \"/\" + \"sp_\" + fileNamesInLong.get(n) + \".csv\";\n File file = new File(fPath);\n\n String url = context.getString(R.string.url_sensor_data_submit, context.getString(R.string.server_ip));\n String email = loginPrefs.getString(SignInActivity.user_id, null);\n String password = loginPrefs.getString(SignInActivity.password, null);\n\n try {\n JSONObject json = new JSONObject(Tools.postFiles(url, email, password, file));\n\n switch (json.getInt(\"result\")) {\n case Tools.RES_OK:\n Log.d(TAG, \"Submitted to server\");\n if (file.delete()) {\n Log.e(TAG, \"File \" + file.getName() + \" deleted\");\n } else {\n Log.e(TAG, \"File \" + file.getName() + \" NOT deleted\");\n }\n break;\n case Tools.RES_FAIL:\n Thread.sleep(1000);\n Log.e(TAG, \"Submission to server Failed\");\n break;\n case Tools.RES_SRV_ERR:\n Thread.sleep(1000);\n Log.d(TAG, \"Submission Failed (SERVER)\");\n break;\n default:\n break;\n }\n } catch (IOException | JSONException | InterruptedException e) {\n e.printStackTrace();\n Log.e(TAG, \"Submission to server Failed\");\n }\n }\n }\n }", "void applyForTraining(int studentId, int trainingId) throws ServiceException;", "public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;", "private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}", "private void submitCollectAppsTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectAppsTrafficTask()...\");\n\t\taddTask(new CollectAppsTrafficTask());\n\t}", "Future_<V> submit(Callable_<V> task);", "TrainingTest createTrainingTest();", "@Test\n public void testTrain_RegressionDataSet_ExecutorService() {\n System.out.println(\"train\");\n RegressionDataSet trainSet = FixedProblems.getSimpleRegression1(150, new Random(2));\n RegressionDataSet testSet = FixedProblems.getSimpleRegression1(50, new Random(3));\n\n for (boolean modification1 : new boolean[] { true, false })\n for (SupportVectorLearner.CacheMode cacheMode : SupportVectorLearner.CacheMode.values()) {\n PlattSMO smo = new PlattSMO(new RBFKernel(0.5));\n smo.setCacheMode(cacheMode);\n smo.setC(1);\n smo.setEpsilon(0.1);\n smo.setModificationOne(modification1);\n smo.train(trainSet, true);\n\n double errors = 0;\n for (int i = 0; i < testSet.size(); i++)\n errors += Math.pow(testSet.getTargetValue(i) - smo.regress(testSet.getDataPoint(i)), 2);\n assertTrue(errors / testSet.size() < 1);\n }\n }", "void storeTraining(Training training);", "private String train(float[][][] features, float[] label, int epochs){\n org.tensorflow.Tensor x_train = Tensor.create(features);\n Tensor y_train = Tensor.create(label);\n int ctr = 0;\n while (ctr < epochs) {\n sess.runner().feed(\"input\", x_train).feed(\"target\", y_train).addTarget(\"train_op\").run();\n ctr++;\n }\n return \"Model Trained\";\n }", "public void buildModel() {\n double loss_pre = Double.MAX_VALUE;\n for (int iter = 0; iter < maxIter; iter ++) {\n Long start = System.currentTimeMillis();\n if (showProgress)\n System.out.println(\"Iteration \"+(iter+1)+\" started\");\n // Update user latent vectors\n IntStream.range(0,userCount).parallel().peek(i->update_user(i)).forEach(j->{});\n /*\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n */\n if (showProgress) {\n System.out.println(\"Users updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n IntStream.range(0,itemCount).parallel().peek(i->update_item(i)).forEach(j->{});\n // Update item latent vectors\n /*\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n */\n if (showProgress) {\n System.out.println(\"Items updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n // Show loss\n if (showLoss)\n loss_pre = showLoss(iter, start, loss_pre);\n\n\n } // end for iter\n\n }", "private Future<Job> submitJob(String token, Job job, int retryLimit) {\n return this.submit(() ->\n this.fuzzerServiceManager.submitJob(\n job, token, retryLimit\n )\n );\n }", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "DataWrapper submit(Long projectId);", "public void driveTrainLoop() {\n if (Config.getInstance().getBoolean(Key.ROBOT__HAS_DRIVETRAIN)) {\n // Check User Inputs\n double driveThrottle = mOperatorInterface.getDriveThrottle();\n double driveTurn = mOperatorInterface.getDriveTurn();\n\n boolean WantsAutoAim = mOperatorInterface.getFeederSteer();\n\n // Continue Driving\n if (WantsAutoAim == true) {\n // Harvest Mode - AutoSteer Functionality\n // Used for tracking a ball\n // we may want to limit the speed?\n // RobotTracker.RobotTrackerResult DriveResult =\n // mRobotTracker.GetFeederStationError(Timer.getFPGATimestamp());\n mDriveState = DriveState.AUTO_DRIVE;\n\n VisionPacket vp = mRobotTracker.GetTurretVisionPacket(Timer.getFPGATimestamp());\n // mDrive.autoSteerFeederStation(driveThrottle, vp.Error_Angle);\n } else {\n // Standard Manual Drive\n mDrive.setDrive(driveThrottle, driveTurn, false);\n\n // if we were previously in auto drive.. turn it off\n if (mDriveState == DriveState.AUTO_DRIVE) {\n mDriveState = DriveState.MANUAL;\n }\n }\n }\n }", "public void submitSyncAllTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncAllTrafficTask()...\");\n\t\tsubmitSyncDeviceTrafficTask();\n\t\taddTask(new SyncAppsTrafficTask());\n\t\tthis.runTask();\n\t}", "@RequestMapping(value = \"/submitJob\", method = RequestMethod.POST, consumes = \"application/json\")\n\tpublic ResponseEntity<String> submitJob(@RequestBody UrlList list) {\n\t\t\n\t\t\n\t\t\n\t\tif(list ==null || list.getUrlList() == null || list.getUrlList().isEmpty()) {\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(\"\");\n\t\t}\n\t\t\n\t\t\n\t\tlogger.debug(\"Started submitJob method.\");\n\t\tif(logger.isDebugEnabled()) {\n\t\tlogger.debug(\"following urls got as input -\");\n\t\tlist.getUrlList().stream().forEach(x -> {\n\t\t logger.debug(x);\t\n\t\t});\n\t\t}\n\n\t\tJob newJob = new Job(list.getUrlList());\n\t\tLong jobId = System.currentTimeMillis();\n\t\tjobDirectory.put(jobId, newJob);\n\t\ttry {\n\t\t\tnewJob.compute();\n\t\t} catch (JobExecutionException e) {\n\t\t\tlogger.error(\"Error occured while submitting the job.\" + e.getMessage());\n\t\t}\n\n\t\tlogger.debug(\"Job saved. jobId is-\" + jobId.toString());\n\t\treturn ResponseEntity.ok(jobId.toString());\n\t}", "public static void createAllModels() throws IOException, InterruptedException {\n ConsoleLogger.printHeader(\"Creating models\");\n List<String> modelsToCreate = new ArrayList<>(FileHelper.loadAllFilesInPath(MODELS_PATH).values());\n final CountDownLatch createModelsLatch = new CountDownLatch(1);\n\n // Call API to create the models. For each async operation, once the operation is completed successfully, a latch is counted down.\n client.createModels(modelsToCreate)\n .doOnNext(listOfModelData -> listOfModelData.forEach(\n modelData -> ConsoleLogger.printSuccess(\"Created model: \" + modelData.getModelId())\n ))\n .doOnError(IGNORE_CONFLICT_ERROR)\n .doOnTerminate(createModelsLatch::countDown)\n .subscribe();\n\n // Wait until the latch count reaches zero, signifying that the async calls have completed successfully.\n createModelsLatch.await(MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS, TimeUnit.SECONDS);\n }", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "public void submitOrder() throws BackendException;", "public void train ()\t{\t}", "public boolean train(Mat trainData, Mat responses)\r\n {\r\n\r\n boolean retVal = train_1(nativeObj, trainData.nativeObj, responses.nativeObj);\r\n\r\n return retVal;\r\n }", "@Override\n public Void run() throws Exception {\n Callable<Job> jobCreator = ReflectionUtils.newInstance(jobConfig.getJobCreator(), jobConfiguration);\n Job job = jobCreator.call();\n job.submit();\n\n // Blocking mode is only for testing\n if(waitForCompletition) {\n job.waitForCompletion(true);\n }\n\n // And generate event with further job details\n EventRecord event = getContext().createEventRecord(\"job-created\", 1);\n Map<String, Field> eventMap = ImmutableMap.of(\n \"tracking-url\", Field.create(job.getTrackingURL()),\n \"job-id\", Field.create(job.getJobID().toString())\n );\n event.set(Field.create(eventMap));\n getContext().toEvent(event);\n return null;\n }", "public void train(DoubleDataTable trainTable, Progress prog) throws InterruptedException\n\t{\n \tif (m_ClassifierTypes.size()==0)\n \t{\n \t\tprog.set(\"Training classifiers\", 1);\n \t\tprog.step();\n \t\treturn;\n \t}\n \tint[] progressVolumes = new int[m_ClassifierTypes.size()];\n \tprogressVolumes[0] = 100/progressVolumes.length;\n \tfor (int i = 1; i < progressVolumes.length; i++)\n \t\tprogressVolumes[i] = 100*(i+1)/progressVolumes.length-progressVolumes[i-1];\n \tprog = new MultiProgress(\"Training classifiers\", prog, progressVolumes);\n\t\tfor (Map.Entry<String,Class> cl : m_ClassifierTypes.entrySet())\n\t\t{\n\t\t\tm_Classifiers.remove(cl.getKey());\n\t\t\ttry\n\t\t\t{\n\t\t\t\tClass classifierClass = cl.getValue();\n\t\t\t\tProperties prop = m_ClassifierProperties.get(cl.getKey());\n\t\t\t\tClassifier classifier = ClassifierFactory.createClassifier(classifierClass, prop, trainTable, prog);\n\t\t\t\tm_Classifiers.put(cl.getKey(), classifier);\n\t\t\t}\n\t\t\tcatch (InvocationTargetException e)\n\t\t\t{\n\t\t\t\tif (e.getTargetException() instanceof BadHeaderException)\n\t\t\t\t\tReport.displaynl(cl.getKey()+\" not trained: \"+e.getTargetException().getMessage());\n\t\t\t\telse Report.exception((Exception)e.getTargetException());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tReport.exception(e);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void _02submitJob() throws ApiException {\n // Change the default deletion after first retrieval to manual deletion for the manual deletion test\n ocrJob.getSettings().getLifecycle().setType(Lifecycle.TypeEnum.TIME);\n ocrJob.getSettings().engine(OCRSettings.EngineEnum.ADVANCED);\n OCRJobResponse response = api.submitJob(ocrJob.getJobId(), ocrJob);\n Assert.assertNotNull(response);\n Assert.assertNotNull(response.getJob());\n Assert.assertEquals(OCRJobResponse.StatusEnum.PROCESSING, response.getStatus());\n }", "public void trainData() throws IOException {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttestingFold = i;\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Training Tree-Augmented Naive Bayes for writing Fold\");\n\t\t\t}\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Calculating Class Priors across Data set.\\n\");\n\t\t\t}\n\t\t\tbuildPriors();\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Priors built.\\n Discretizing data into Naive Bin Estimator...\\n\" +\n\t\t\t\t\t\t\"Generating Completed Graph...\\nWeighting Edges...\\n\");\n\t\t\t}\n\t\t\tdiscretizeData();\n\t\t\ttest();\n\t\t}\n\n\t}", "public void doneClassifying() {\n\t\tbinaryTrainClassifier = trainFactory.trainClassifier(binaryTrainingData);\n\t\tmultiTrainClassifier = testFactory.trainClassifier(multiTrainingData);\n\t\tLinearClassifier.writeClassifier(binaryTrainClassifier, BINARY_CLASSIFIER_FILENAME);\n\t\tLinearClassifier.writeClassifier(multiTrainClassifier, MULTI_CLASSIFIER_FILENAME);\n\t}", "private void trainText() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.TEXT);\n\t\tSystem.out.println(\"Starting reading Text Trainingset ..\");\n\n\t\tPipe serialpipe = getTextPipe();\n\t\tInstanceList text_instances = new InstanceList(serialpipe);\n\n\t\tSystem.out.println(\"Preprocessing on Text Trainingset ..\");\n\t\ttext_instances.addThruPipe(dbiterator);\n\n\t\tSystem.out.println(\"Text Training set : \" + text_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(text_instances, Train + \"T.bin\");\n\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\ttext_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"text.dat\")));\n\n\t\tNaiveBayesTrainer trainer = new NaiveBayesTrainer();\n\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Text training set ..\");\n\t\tNaiveBayes classifier = trainer.train(text_instances);\n\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Text_Train);\n\t\tSystem.out.println(\"Text classifier saved to : \" + Text_Train);\n\t}", "public boolean train_auto(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n boolean retVal = train_auto_1(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj);\r\n\r\n return retVal;\r\n }", "public void train (String trainingCollection) throws IOException {\n\t\tDocumentCollection trainCol = new DocumentCollection(trainingCollection);\n\t\ttrainCol.open();\n\t\tfor (int i=0; i<trainCol.size(); i++) {\n\t\t\tExternalDocument doc = trainCol.get(i);\n\t\t\ttrain (doc);\n\t\t}\n\t}", "@Override\n\n protected Integer doInBackground(Integer... params) {\n Bitmap resized_image = ImageUtils.processBitmap(bitmap, 224);\n\n //Normalize the pixels\n floatValues = ImageUtils.normalizeBitmap(resized_image, 224, 127.5f, 1.0f);\n\n //Pass input into the tensorflow\n tf.feed(INPUT_NAME, floatValues, 1, 224, 224, 3);\n\n //compute predictions\n tf.run(new String[]{OUTPUT_NAME});\n\n //copy the output into the PREDICTIONS array\n tf.fetch(OUTPUT_NAME, PREDICTIONS);\n\n //Obtained highest prediction\n Object[] results = argmax(PREDICTIONS);\n\n\n int class_index = (Integer) results[0];\n float confidence = (Float) results[1];\n\n\n try {\n\n final String conf = String.valueOf(confidence * 100).substring(0, 5);\n\n //Convert predicted class index into actual label name\n final String label = ImageUtils.getLabel(getAssets().open(\"labels.json\"), class_index);\n\n\n //Display result on UI\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n progressBar.dismiss();\n resultView.setText(label + \" : \" + conf + \"%\");\n\n }\n });\n\n } catch (Exception e) {\n\n\n }\n\n\n return 0;\n }", "<T> CompletableFuture<T> submit(Callable<T> request);", "@Override\n public void run() {\n try {\n while (this.getState() != Thread.State.TERMINATED) {\n IDataModel dataModel = myDataModelController.getCurrentModel();\n\n if ((dataModel != null) && (!dataModel.isModelChecked())) {\n runAllValidations(dataModel);\n }\n Thread.sleep(CYCLE_SLEEP_TIME);\n }\n } catch (InterruptedException e) {\n // state = Thread.State.TERMINATED;\n this.interrupt();\n }\n }", "public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "<T> CompletableFuture<T> submit(Integer key, Callable<T> request);", "private void invokeSubmitP2AScoreService(User p2aUser) {\n if (submitP2AScoreTask != null) {\n return;\n }\n mSubmitScoreStatusMessage.setText(\"Committing score to P2A ...\");\n showSubmitScoreProgress(true);\n submitP2AScoreTask = new SubmitP2AScoreTask();\n submitP2AScoreTask.execute(p2aUser);\n }", "public static void main(String[] args) {\n String pathToTrain = \"train.csv\";\n String pathToTest = \"test.csv\";\n try {\n ArrayList<String> trainSentences = readCSV(pathToTrain);\n trainSentences.remove(0);\n ArrayList<String> testSentences = readCSV(pathToTest);\n testSentences.remove(0);\n\n ArrayList<String[]> trainWords = preprocess(trainSentences);\n NaiveBayesClassifier model = new NaiveBayesClassifier();\n model.fit(trainWords);\n\n ArrayList<String[]> testWords = preprocess(testSentences);\n double accuracy = evaluate(testWords, model);\n model.writeParams(\"params.json\");\n System.out.printf(\"Accuracy of the model is: %.4f%n\", accuracy);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "protected String createBatchAndUpload() throws IOException {\n String batchId;\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload\")) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n batchId = node.get(\"batchId\").asText();\n assertNotNull(batchId);\n }\n\n // fist file\n \n String data = \"SomeDataExtractedFromNuxeoDBToFeedTensorFlow\";\n String fileSize = String.valueOf(data.getBytes(UTF_8).length);\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"text/plain\");\n headers.put(\"X-Upload-Type\", \"normal\");\n headers.put(\"X-File-Name\", \"aidata.bin\");\n headers.put(\"X-File-Size\", fileSize);\n headers.put(\"X-File-Type\", \"application/octet-stream\");\n\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload/\" + batchId + \"/0\", data,\n headers)) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n assertEquals(\"true\", node.get(\"uploaded\").asText());\n assertEquals(batchId, node.get(\"batchId\").asText());\n assertEquals(\"0\", node.get(\"fileIdx\").asText());\n assertEquals(\"normal\", node.get(\"uploadType\").asText());\n } \n\n // second file\n data = \"SomeDataExtractedFromNuxeoDBToValidateTensorFlow\";\n fileSize = String.valueOf(data.getBytes(UTF_8).length);\n headers.clear();\n headers.put(\"Content-Type\", \"text/plain\");\n headers.put(\"X-Upload-Type\", \"normal\");\n headers.put(\"X-File-Name\", \"aidatacheck.bin\");\n headers.put(\"X-File-Size\", fileSize);\n headers.put(\"X-File-Type\", \"application/octet-stream\");\n\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload/\" + batchId + \"/1\", data,\n headers)) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n assertEquals(\"true\", node.get(\"uploaded\").asText());\n assertEquals(batchId, node.get(\"batchId\").asText());\n assertEquals(\"1\", node.get(\"fileIdx\").asText());\n assertEquals(\"normal\", node.get(\"uploadType\").asText());\n } \n \n return batchId;\n }", "@Override\r\n public void run() {\n upload();\r\n }", "public <T> void submit(T workLoad, Consumer<T> workerFunction) {\n this.submit(() -> workerFunction.accept(workLoad));\n }", "public void submitJob(Job job) throws IOException {\n\t\tCore.submitJob(job, getHttpMethodExecutor());\n\t}", "public static void main(String[] args) throws IOException, InterruptedException {\n\n File src = new ClassPathResource(\"winequality-red.csv\").getFile();\n\n FileSplit fileSplit = new FileSplit(src);\n\n RecordReader rr = new CSVRecordReader(1,',');// since there is header in the file remove row 1 with delimter coma\n rr.initialize(fileSplit);\n\n Schema sc = new Schema.Builder()\n .addColumnsDouble(\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\")\n .addColumnCategorical(\"quality\", Arrays.asList(\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"))\n .build();\n\n TransformProcess tp = new TransformProcess.Builder(sc)\n .categoricalToInteger(\"quality\")\n .build();\n\n System.out.println(\"Initial Schema : \"+tp.getInitialSchema());\n System.out.println(\"New Schema : \"+tp.getFinalSchema());\n\n List<List<Writable>> original_data = new ArrayList<>();\n\n while(rr.hasNext()){\n original_data.add(rr.next());\n }\n\n List<List<Writable>> transformed_data = LocalTransformExecutor.execute(original_data,tp);\n\n CollectionRecordReader crr = new CollectionRecordReader(transformed_data);\n\n DataSetIterator iter = new RecordReaderDataSetIterator(crr,transformed_data.size(),-1,6);\n\n DataSet fullDataSet = iter.next();\n fullDataSet.shuffle(seed);\n\n SplitTestAndTrain traintestsplit = fullDataSet.splitTestAndTrain(0.8);\n DataSet trainDataSet = traintestsplit.getTrain();\n DataSet testDataSet = traintestsplit.getTest();\n\n\n DataNormalization normalization = new NormalizerMinMaxScaler();\n normalization.fit(trainDataSet);\n normalization.transform(trainDataSet);\n normalization.transform(testDataSet);\n\n MultiLayerConfiguration config = getConfig (numberInput,numberClasses,learning_rate);\n\n MultiLayerNetwork model = new MultiLayerNetwork(config);\n model.init();\n\n //UI-Evaluator\n StatsStorage storage = new InMemoryStatsStorage();\n UIServer server = UIServer.getInstance();\n server.attach(storage);\n\n //Set model listeners\n model.setListeners(new StatsListener(storage, 10));\n\n Evaluation eval;\n\n for(int i=0;i<epochs;i++) {\n model.fit(trainDataSet);\n eval = model.evaluate(new ViewIterator(testDataSet, transformed_data.size()));\n System.out.println(\"Epoch \" + i + \", Accuracy : \"+eval.accuracy());\n }\n\n Evaluation evalTrain = model.evaluate(new ViewIterator(trainDataSet,transformed_data.size()));\n Evaluation evalTest = model.evaluate(new ViewIterator(testDataSet,transformed_data.size()));\n\n System.out.println(\"Train Eval : \"+evalTrain.stats());\n System.out.println(\"Test Eval : \"+evalTest.stats());\n\n\n\n\n\n\n\n }", "@Override\n public void run() {\n if(counter+1<trainingObjectList.size()) {\n setupForGame();\n }\n else{//bitir activity. main activitiye dönülebilir belki.\n dbHandler.setTrainingCompletedAll(trainingID);\n if (!CheckNetwork.isOnline(MatchingGame.this)) {\n Log.d(TAG, \"MatchingGame no db no wifi, checknetworktrue\");\n CheckNetwork.showNoConnectionDialog(MatchingGame.this, false, 2); //display dialog\n } else {\n new CreateTrainingResponse(MatchingGame.this, false, username).execute(trainingID);\n Intent intent = new Intent(MatchingGame.this, MainActivity.class);\n intent.putExtra(\"username\", username);\n //startActivity(intent);\n //finish();\n }\n }\n }", "public void upload() {\r\n\t\t\tARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vboVertexId);\r\n\t\t\tFloatBuffer coordinates = shapePeer.shape.getVertexData().coordinates;\r\n\t\t\tint tempIdx=0;\r\n\t\t\tfor (int i=0; i<count; i++) {\r\n\t\t\t\ttempP3f.x = coordinates.get((minIndex+i)*3+0);\r\n\t\t\t\ttempP3f.y = coordinates.get((minIndex+i)*3+1);\r\n\t\t\t\ttempP3f.z = coordinates.get((minIndex+i)*3+2);\r\n\t\t\t\tshapePeer.shape.getModelMatrix().transform(tempP3f);\r\n\t\t\t\tuploadBuffer.put(tempIdx*3+0, tempP3f.x);\r\n\t\t\t\tuploadBuffer.put(tempIdx*3+1, tempP3f.y);\r\n\t\t\t\tuploadBuffer.put(tempIdx*3+2, tempP3f.z);\r\n\t\t\t\tif (tempIdx*3 >= uploadBuffer.capacity() || i==count-1) {\r\n\t\t\t\t\tint offset = (startIdx+i-tempIdx)*3;\r\n\t\t\t\t\tuploadBuffer.position(0).limit((tempIdx+1)*3);\r\n//\t\t\t\t\tSystem.out.println(\"upload \"+offset+\" \"+uploadBuffer.limit()+\" \"+startIdx);\r\n\t\t\t\t\tARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offset*4, uploadBuffer);\r\n\t\t\t\t\tuploadBuffer.position(0).limit(uploadBuffer.capacity());\r\n\t\t\t\t\ttempIdx=0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttempIdx++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// upload colors\r\n\t\t\tFloatBuffer colors = shapePeer.shape.getVertexData().colors;\r\n\t\t\tif (colors != null) {\r\n\t\t\t\tcolors.position(minIndex).limit(minIndex+count*3);\r\n\t\t\t\tint offset = (numElements*3)+(startIdx*3);\r\n\t\t\t\tARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offset*4, colors);\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// upload texture coordinates\r\n\t\t\tObjectArray<VertexData.TexCoordData> texCoords = shapePeer.shape.getVertexData().texCoords;\r\n\t\t\tif (texCoords != null) {\r\n\t\t\t\tfor (int unit=0; unit<texCoords.length(); unit++) {\r\n\t\t\t\t\tVertexData.TexCoordData texCoord = texCoords.get(unit);\r\n\t\t\t\t\tif (texCoord != null) {\r\n\t\t\t\t\t\tGL13.glClientActiveTexture(GL13.GL_TEXTURE0 + unit);\r\n\t\t\t\t\t\ttexCoord.data.position(minIndex*2).limit(minIndex*2+count*2);\r\n//\t\t\t\t\t\tint offset = (numElements*(6+unit*2))+(startIdx*2);\r\n\t\t\t\t\t\tint offset = (numElements*(6+unit*2))+startIdx+startIdx;\r\n\t\t\t\t\t\tARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offset*4, texCoord.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGL13.glClientActiveTexture(GL13.GL_TEXTURE0);\r\n\t\t\t\r\n\t\t\tARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 0);\r\n\r\n\t\t\tVertexData vertexData = shapePeer.shape.getVertexData();\r\n\t\t\tIntBuffer indices = vertexData.indices;\r\n\t\t\tindices.position(0).limit(indices.capacity());\r\n\t\t\tthis.indices = new int[indices.capacity()];\r\n\t\t\tindices.get(this.indices);\r\n\t\t\tfor (int i=0; i<this.indices.length; i++) {\r\n\t\t\t\tthis.indices[i] += startIdx-minIndex;\r\n\t\t\t}\r\n\t\t\tUtil.checkGLError();\r\n\t\t}", "public static void main(String[] args) throws Exception {\n ExecutionEnvironment env = ExecutionEnvironment.createLocalEnvironment();\n env.getConfig().disableSysoutLogging();\n env.setParallelism(4);\n\n /********** DATA LOADING ***************/\n //Load the data set\n DataFlink<DataInstance> data = DataFlinkLoader.open(env,\"./datasets/BigSensorReadings.arff\");\n\n int nRooms = 10;\n\n /********** Model Definition ************/\n DAG fireDetectorModel = creatBigFireDectectorModel(data.getAttributes(),nRooms);\n\n /********** Model Learning ************/\n //Define the learning engine (distributed Variational Message Passing) and the parameters\n dVMP svb = new dVMP();\n svb.setBatchSize(1000);\n svb.setOutput(true);\n svb.setDAG(fireDetectorModel);\n\n //Specify the associated constraints (encoding prior knowledge)\n for (int i = 0; i < nRooms; i++) {\n Variable sensorT1 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp1_\"+i);\n Variable sensorT2 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp2_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT1, 0.0));\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT2, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT1, 1.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT2, 1.0));\n\n Variable temp = fireDetectorModel.getVariables().getVariableByName(\"Temperature_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha | {Fire_\"+i+\" = 0}\", temp, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1 | {Fire_\"+i+\" = 0}\", temp, 1.0));\n\n }\n\n //Set-up the learning phase\n svb.initLearning();\n\n //Perform Learning\n Stopwatch watch = Stopwatch.createStarted();\n svb.updateModel(data);\n System.out.println(watch.stop());\n\n\n //Print the learnt model\n System.out.println(svb.getLearntBayesianNetwork());\n\n }", "@Override\n public void run() {\n if(counter+1<trainingObjectList.size()) {\n setupForGame();\n }\n else{//bitir activity. main activitiye dönülebilir belki.\n dbHandler.setTrainingCompletedAll(trainingID);\n if (!CheckNetwork.isOnline(MatchingGame.this)) {\n Log.d(TAG, \"MatchingGame no db no wifi, checknetworktrue\");\n CheckNetwork.showNoConnectionDialog(MatchingGame.this, false, 2); //display dialog\n } else {\n new CreateTrainingResponse(MatchingGame.this, false, username).execute(trainingID);\n Intent intent = new Intent(MatchingGame.this, MainActivity.class);\n intent.putExtra(\"username\", username);\n //startActivity(intent);\n //finish();\n }\n }\n }" ]
[ "0.6137546", "0.57201684", "0.56931275", "0.5637776", "0.55242324", "0.54908836", "0.54077226", "0.53809667", "0.535324", "0.5351579", "0.53506535", "0.5299705", "0.5279328", "0.5263023", "0.525408", "0.5244407", "0.51954424", "0.51912576", "0.5180646", "0.5173923", "0.51639634", "0.51571345", "0.5132833", "0.51296985", "0.51247644", "0.5120049", "0.50863934", "0.5077114", "0.5044328", "0.50021756", "0.50007594", "0.49938965", "0.49665722", "0.49658877", "0.49556687", "0.4939802", "0.49374756", "0.4918787", "0.48963183", "0.48848423", "0.48664957", "0.48563704", "0.4843893", "0.48377526", "0.48284194", "0.48245004", "0.48196924", "0.481484", "0.4781128", "0.4780949", "0.4779816", "0.47702745", "0.47498745", "0.47354412", "0.47246194", "0.47208583", "0.47170657", "0.4712477", "0.47114983", "0.47071838", "0.4689193", "0.46881175", "0.4677274", "0.46686146", "0.46653074", "0.4654716", "0.4647273", "0.46467406", "0.46458992", "0.4645447", "0.46441916", "0.4624828", "0.46157584", "0.46111825", "0.46108618", "0.4608182", "0.46066642", "0.45884243", "0.4580775", "0.4566541", "0.45617926", "0.45383868", "0.45295867", "0.45290405", "0.4527814", "0.45243892", "0.45202342", "0.45179668", "0.4514903", "0.4506353", "0.44976318", "0.44956174", "0.44937822", "0.44928607", "0.44924423", "0.44906995", "0.44852427", "0.44835398", "0.44811216", "0.4478864", "0.44777983" ]
0.0
-1
Time Complexity: O(n) Space Complexity: O(1)
public int maxProfit(int[] prices) { if (prices == null || prices.length == 0) { return 0; } int res = 0, buy = Integer.MAX_VALUE; for (int price : prices) { buy = Math.min(buy, price); res = Math.max(res, price - buy); } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] seqArray = new int[n];\n for (int i = 0; i < n; i++) {\n seqArray[i] = scanner.nextInt();\n }\n // getSeqValue(seqArray); //this method is an accepted one on Hackerrank but time complexity is not order n; i.e. !O(n);\n getLinearOrderY(seqArray); // trying to get O(n) time complexity;\n }", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "@Override public short getComplexity() {\n return 0;\n }", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public static int solveEfficient(int n) {\n if (n == 0 || n == 1)\n return 1;\n\n int n1 = 1;\n int n2 = 1;\n int sum = 0;\n\n for (int i = 2; i <= n; i++) {\n sum = n1 + n2;\n n1 = n2;\n n2 = sum;\n }\n return sum;\n }", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> result = new ArrayList<>(nums.length);\n\n // Prepare\n Arrays.sort(nums);\n// int firstPositiveIndex = 0;\n// int negativeLength = 0;\n// List<Integer> numsFiltered = new ArrayList<>();\n// for (int i = 0; i < nums.length; i++) {\n// if (i == 0 || i == 1 || nums[i] == 0 || (nums[i] != nums[i-2])) {\n// numsFiltered.add(nums[i]);\n// if ((nums[i] >= 0) && (firstPositiveIndex == 0)) {\n// firstPositiveIndex = numsFiltered.size() - 1;\n// }\n// if ((nums[i] <= 0)) {\n// negativeLength = numsFiltered.size();\n// }\n// }\n// }\n// nums = numsFiltered.stream().mapToInt(i->i).toArray();\n\n // Func\n\n for(int i=0; (i < nums.length) && (nums[i] <= 0); i++) {\n if (i != 0 && nums[i] == nums[i-1]) {\n continue;\n }\n for(int j=i+1; j<nums.length; j++) {\n if (j != i+1 && nums[j] == nums[j-1]) {\n continue;\n }\n for(int k=nums.length-1; (k>j) && nums[k] >= 0; k--) {\n if (k != nums.length-1 && nums[k] == nums[k+1]) {\n continue;\n }\n int sum = nums[i]+nums[j]+nums[k];\n if (sum > 0) {\n continue;\n } else if (sum < 0) {\n break;\n }\n\n List<Integer> ok = new ArrayList<>();\n ok.add(nums[i]);\n ok.add(nums[j]);\n ok.add(nums[k]);\n result.add(ok);\n break;\n }\n }\n }\n\n// System.out.println(\"Finish time = \" + (System.nanoTime() - start) / 1_000_000);\n// System.out.println(\"result size = \" + result.size());\n\n return result;\n }", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }", "static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "public int removeDuplicates(int[] nums) {\n if (nums.length == 0) return 0;\n int i = 0;\n for (int j = 1; j < nums.length; j++) {\n if (nums[j] != nums[i]) {\n i++;\n nums[i] = nums[j];\n }\n }\n return i + 1;\n}", "public int findFirstUniqueNumber (List<Integer> numberList) {\n\n ////// Solution 1:\n LinkedHashMap<Integer, Integer> occurMap = new LinkedHashMap<>();\n\n for (int number: numberList) { // O(n)\n if (occurMap.containsKey(number) && occurMap.get(number) != 0) {\n occurMap.replace(number, occurMap.get(number), 0);\n }\n occurMap.putIfAbsent(number, 1);\n }\n\n for (Map.Entry<Integer, Integer> entry: occurMap.entrySet()) {\n if (entry.getValue() == 1) {\n return entry.getKey();\n }\n }\n\n ////// Solution 2: O(n * n)\n// for (int n: numberList) {\n// if (numberList.indexOf(n) == numberList.lastIndexOf(n)) { // O(n * n)\n// return n;\n// }\n// }\n\n return -1;\n }", "public static boolean addUpToFast(int[] array, int n){\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor(int i = 0; i < array.length; i++){\n\t\t\tif(hs.contains(n-array[i]))\n\t\t\t\treturn true;\n\t\t\ths.add(array[i]);\n\t\t}\n\t\treturn false;\n\t}", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfinal long startTime = System.nanoTime();\r\n\t\t\r\n\t\tint [] plop = {1,1,1,2,2,3};\r\n\t\tSystem.out.println(removeDuplicates2(plop));\r\n\t\t\r\n\r\n\t\tfinal long duration = System.nanoTime() - startTime;\r\n\t\tSystem.out.println(duration);\r\n\t\t\r\n\t}", "static int runningTime(int[] arr) {\n return insertionSort(arr);\n \n }", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "public static void a2v2(int[] A)\n {\n Map<Integer, List<Integer>> hashMap = new HashMap<>();\n\n insert(hashMap, 0, -1);\n\n int sum = 0;\n\n for (int i = 0; i < A.length; i++)\n {\n sum += A[i];\n\n if (hashMap.containsKey(sum))\n {\n List<Integer> list = hashMap.get(sum);\n\n // find all subarrays with the same sum\n for (Integer value: list)\n {\n System.out.println(\"Subarray [\" + (value + 1) + \"…\" +\n i + \"]\");\n }\n }\n\n // insert (sum so far, current index) pair into the hashmap\n insert(hashMap, sum, i);\n }\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "private static void findDuplicatesByHashTable(int[] arr) {\n\t\t\n\t\t\n\t\tHashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++)\n\t\t{\n\t\t\tif(!map.containsKey(arr[i]))\n\t\t\t{\n\t\t\t\tmap.put(arr[i], 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmap.put(arr[i], map.get(arr[i])+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( Map.Entry<Integer, Integer> entry : map.entrySet() )\n\t\t{\n\t\t\tif(entry.getValue() > 1 )\n\t\t\t{\n\t\t\t\tSystem.out.println(\" Duplicate is by HashTable \" + entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbers.length; i++) {\n valueToIndex.put(numbers[i], i);\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n \n int[] result = new int[2];\n if (aux[i] == aux[j]) { /* Handle duplicates */\n int first = -1, second = -1;\n for (int k = 0; k < numbers.length; k++) {\n if (numbers[k] == aux[i]) {\n if (first == -1) {\n first = k;\n } else if (second == -1) {\n second = k;\n break;\n }\n }\n }\n result[0] = first + 1;\n result[1] = second + 1;\n return result;\n }\n \n \n if (valueToIndex.get(aux[i]) < valueToIndex.get(aux[j])) {\n result[0] = valueToIndex.get(aux[i]) + 1;\n result[1] = valueToIndex.get(aux[j]) + 1;\n } else {\n result[0] = valueToIndex.get(aux[j]) + 1;\n result[1] = valueToIndex.get(aux[i]) + 1;\n }\n return result;\n }", "static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }", "public void log(int[] numbers) {\n\t\tSystem.out.println(); // O(1)\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\tSystem.out.println(); // O(1)\n\t\t\n\t\t// O(2n), O(n+n)\n\t\t// We can drop 2* constant, O(n). Both represent linear growth\n\t\t// as we care only about input size\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\t\n\t\t\n\t\t\n\t}", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }", "public static int f3(int N) {\n \n // O(1)\n if (N == 0) return 1;\n else{ \n \n int x = 0;\n // O(N)\n for(int i = 0; i < N; i++)\n x += f3(N-1);\n return x;\n }\n }", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "static int countSubarrWithEqualZeroAndOne(int arr[], int n)\n {\n int count=0;\n int currentSum=0;\n HashMap<Integer,Integer> mp=new HashMap<>();\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==0)\n arr[i]=-1;\n currentSum+=arr[i];\n \n if(currentSum==0)\n count++;\n if(mp.containsKey(currentSum))\n count+=mp.get(currentSum);\n if(!mp.containsKey(currentSum))\n mp.put(currentSum,1);\n else\n mp.put(currentSum,mp.get(currentSum)+1);\n \n \n }\n return count;\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "static long arrayManipulation(int n, int[][] queries) {\r\n long result = 0, sum = 0;\r\n long[] arr = new long[n];\r\n for(int i = 0; i < queries.length; i++){\r\n int firstIndex = queries[i][0] - 1;\r\n int lastIndex = queries[i][1] - 1;\r\n long numberToAdd = queries[i][2];\r\n arr[firstIndex] += numberToAdd;\r\n if (lastIndex+1 < n)\r\n arr[lastIndex+1] -= numberToAdd;\r\n }\r\n\r\n for(long l : arr){\r\n sum += l;\r\n if(sum > result)\r\n result = sum;\r\n }\r\n\r\n return result;\r\n }", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "private static List<Integer> getCommonElementsAlgo2(int [] arr1, int [] arr2) {\n\t\t\n\t\tList<Integer> duplicates = new ArrayList<>();\n\t\t\n\t\tHashtable<Integer, Integer> table = new Hashtable<>();\n\t\t\n\t\tfor (int i : arr1) {\n\t\t\tif (table.containsKey(i)) {\n\t\t\t\ttable.put(i, table.get(i) + 1);\n\t\t\t}\n\t\t\ttable.put(i, 1);\n\t\t}\n\t\t\n\t\tfor (int j : arr2) {\n\t\t\tif (table.containsKey(j)) {\n\t\t\t\tduplicates.add(j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn duplicates;\n\t\t\n\t}", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "private int gameV(int i, int j, int x) {\n int count = 2;\n for (int ii = 0; ii < i; ii++) {\n for (int jj = ii + 1; jj < n; jj++) {\n if (ii != x && jj != x) count++;\n }\n }\n for (int jj = i + 1; jj < j; jj++) {\n if (jj != x) count++;\n }\n return count;\n }", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }", "public static void main(String[] args) {\n float[] fb=new float[9];\n fb[0]=(int)12;\n fb[1]=(byte)13;\n fb[2]=(short)8;\n fb[3]=12.021f;\n // fb[4]=23443.43d;\n// fb[4]='a';\n// for(int i=0;i<=4;i++) {\n// \t System.out.println(fb[i]);\n// }\n List<Integer> lis1=new ArrayList<>();\n List<Integer> lis2=new ArrayList<>();\n lis1.add(2);\n lis1.add(4);\n lis1.add(16);\n lis1.add(32);\n lis1.add(96);\n lis1.add(123);\n lis1.add(435);\n lis1.add(234);\n lis1.add(100);\n lis1.add(122);\n lis1.add(240);\n lis1.add(350);\n java.util.Iterator<Integer> itr= lis1.iterator();\n //while(itr.hasNext()) {\n // itr.remove();\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(lis1);\n // \n// long startTime = System.currentTimeMillis();\n// getTotalX(lis1,lis2);\n// System.out.println(\"Time taken by 2 * o(n^2) \" + (System.currentTimeMillis() - startTime) + \"ms\"); \n// \n \t\t \n\t}", "public int findDuplicate(int[] nums) {\n int slow = nums[0];\n int fast = nums[0];\n do {\n slow = nums[slow];\n fast = nums[nums[fast]];\n } while (slow != fast);\n \n slow = nums[0];\n while (slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n return slow;\n }", "private static void sortAccording(int A1[], int A2[], int m, int n)\n {\n // The temp array is used to store a copy \n // of A1[] and visited[] is used to mark the \n // visited elements in temp[].\n int temp[] = new int[m], visited[] = new int[m];\n for (int i = 0; i < m; i++)\n {\n temp[i] = A1[i];\n visited[i] = 0;\n }\n \n // Sort elements in temp\n Arrays.sort(temp);\n \n // for index of output which is sorted A1[]\n int ind = 0; \n \n // Consider all elements of A2[], find them\n // in temp[] and copy to A1[] in order.\n for (int i = 0; i < n; i++){\n\n // Find index of the first occurrence\n // of A2[i] in temp\n int f = first(temp, 0, m-1, A2[i], m);\n \n // If not present, no need to proceed\n if (f == -1) \n continue;\n \n // Copy all occurrences of A2[i] to A1[]\n for (int j = f; (j < m && temp[j] == A2[i]); j++){\n \n A1[ind++] = temp[j];\n visited[j] = 1;\n }\n }\n \n // Now copy all items of temp[] which are \n // not present in A2[]\n for (int i = 0; i < m; i++)\n if (visited[i] == 0)\n A1[ind++] = temp[i];\n }", "private void discretization(int[] nums) {\n\t\tint[] sorted = nums.clone();\n\t\tArrays.sort(sorted);\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tnums[i] = Arrays.binarySearch(sorted, nums[i]);\n\t\t}\n\t}", "private static void task03(int nUMS, AVLTree<Integer> h) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(h.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\th.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + h.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "private int hashFunc1(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n // Java can return negative vals with hashCode() it's biggg so need to check for this\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n return hashVal; // Idea index position we'd like to insert or search in\n }", "public static void main(String[] args) {\n\t\tArrays.fill(arr, 1);\n\t\tlong startTime = System.nanoTime();\n\t\t// Traverse till square root of MAX\n\t\t// Using logic similar to sieve of eratosthenes to\n\t\t// populate factor sum array\n\t\tint limit = (int)Math.sqrt(MAX);\n\t\tfor (int i = 2; i <= limit; ++i) {\n\t\t\tint j = i+i;\n\t\t\tint count = 2;\n\t\t\twhile (j <= MAX){\n\t\t\t\t// As we already add count (j/i) to the factor sum when adding i,\n\t\t\t\t// we don't add when i is equal to or greater than count\n\t\t\t\tif (i < count) {\n\t\t\t\t\t// Adding i and count (j/i) to the factor sum of j\n\t\t\t\t\tarr[j] += i;\n\t\t\t\t\tarr[j] += count;\n\t\t\t\t}\n\t\t\t\tj += i;\n\t\t\t\tcount++;\n\t\t\t} \n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tSystem.out.println(\"The following are amicable numbers\");\n\t\tfor (int i = 2; i <= MAX; ++i) {\n\t\t\tint num = arr[i];\n\t\t\tif (num <= MAX && num > i) {\n\t\t\t\tif (arr[num] == i) {\n\t\t\t\t\tSystem.out.println(count+\": \"+i+\" and \"+num);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlong endTime = System.nanoTime();\n\t\tdouble duration = timeInSec(endTime,startTime) ;\n\t\tSystem.out.println(\"Run time \" + duration + \" : secs\");\t\t\n\t}", "public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "public static String findSum2(int[] a, int x){\n\t\tMap<Integer, Integer> cache = new HashMap<Integer, Integer>();\r\n\t\tint delta;\r\n\t\tfor(int i = 0; i < a.length; i++) {\r\n\t\t\tdelta = x - a[i];\r\n\t\t\tif(cache.get(delta) != null) {\r\n\t\t\t\treturn delta + \" \" + a[i];\r\n\t\t\t}else{\r\n\t\t\t\tcache.put(a[i], delta);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"Not Found\";\r\n\t}", "public static void process(int n){\n\t\tint right, left, i;\n\n\t\tright = i = 0;\n\t\twhile(i < n){\n\t\t\twhile (right < n && c[i] == c[right]) right++;\n\t\t\tfor(int j = i; j < right; ++j) max_right[j] = right;\n\t\t\ti = right;\n\t\t}\n\n\t\tleft = i = n-1;\n\t\twhile(i >= 0){\n\t\t\twhile (left >= 0 && c[i] == c[left]) left--;\n\t\t\tfor (int j = i; j > left; --j) max_left[j] = left;\n\t\t\ti = left;\n\t\t}\n\t}", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint n=s.nextInt();\nint a[]=new int[n];\nint x=0;\nfor(int i=1;i<=n;i++)\n{\n\tif(i%2!=0)\n\t{\n\t\ta[x++]=i;\n\t}\n}\nint sum=0;\nsum=a[0];\nfor(int i=0;i<x;i++)\n{\n\tif((i+1)<x)\n\t{\n\tif(i%2==0)\n\t\tsum=sum+a[i+1];\n\telse\n\t\tsum=sum-a[i+1];\n\t}\n}\nSystem.out.println(sum);\n\t}", "static int logTime(int[] n, int start, int end, int val) {\n if(n == null || n.length == 0) return -1;\n int mid = (start + end) / 2;\n if(val < n[mid]) logTime(n, 0, mid, val);\n if(val > n[mid]) logTime(n, mid + 1, n.length, val);\n return n[mid];\n }", "public int solution(int K, int[] A) {\n HashMap<Integer,ArrayList<Integer>> map = new HashMap<Integer,ArrayList<Integer>>();\n \n int dup=0,nonDup=0;\n for (int i=0;i< A.length;i++){\n if(2*A[i]==K){\n if(!map.containsKey(A[i])){\n dup++;\n map.put(A[i],new ArrayList<Integer>());\n }\n continue;\n }\n \n if(!map.containsKey(A[i])){\n \tmap.put(A[i],new ArrayList<Integer>());\n }\n map.get(A[i]).add(i);\n nonDup+=map.get(K-A[i]).size();\n }\n return nonDup*2+dup;\n }", "private static int[] p2(int[] ar, int n) {\n int[] p2 = new int[n];\n Arrays.fill(p2, n);\n Stack<Integer> st = new Stack<>();\n for (int i = 0; i < n; i++) {\n while (st.size() != 0 && ar[i] < ar[st.peek()]) {\n p2[st.peek()] = i;\n st.pop();\n }\n st.push(i);\n }\n return p2;\n }", "static int linearLogTime(int[] n, int[] m) {\n if(n == null || n.length == 0 || m == null || m.length == 0) return -1;\n int sum = 0;\n for(int i = 0; i < n.length; ++i) {\n sum += logTime(m, 0, m.length, 15);\n }\n return sum;\n }", "public ArrayList<ArrayList<Integer>> fourSum_02(ArrayList<Integer> a, int b) {\n\t\t//List to store the result\n\t\tArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();\n \tint len = a.size();\n \tif(len < 4)\n \t return res;\n \t\n //Using the hashMap to store sum and corresponding 2 elements\n \tHashMap<Integer, Index> h = new HashMap<Integer, Index>();\n \t\n \tfor(int i = 0; i < len-1; i++) {\n \t\tfor(int j = i+1; j < len; j++) {\n \t\t\tint sum = a.get(i) + a.get(j);\n \t\t\tif(h.containsKey(b-sum)) {\n \t\t\t\t//then get the elements of the existing sum stored in hashmap\n \t\t\t\tIndex indx = h.get(b-sum);\n \t\t\t\tint exI = indx.getI();\n \t\t\t\tint exJ = indx.getJ();\n \t\t\t\tif(res.size() == 0) {\n \t\t\t\t\tArrayList<Integer> l = new ArrayList<Integer>();\n\t \t\t\t\tl.add(exI);\n\t \t\t\t\tl.add(exJ);\n\t \t\t\t\tl.add( a.get(i));\n\t \t\t\t\tl.add( a.get(j));\n\t \t\t\t\tCollections.sort(l);\n\t \t\t\t\tres.add(l);\n \t\t\t\t} else {\n\t \t\t\t\tif((exI != a.get(i)) && (exJ != a.get(j))) {\n\t \t\t\t\t\tArrayList<Integer> l = new ArrayList<Integer>();\n\t\t \t\t\t\tl.add(exI);\n\t\t \t\t\t\tl.add(exJ);\n\t\t \t\t\t\tl.add(a.get(i));\n\t\t \t\t\t\tl.add(a.get(j));\n\n\t\t \t\t\t\tCollections.sort(l);\n\t\t \t\t\t\tboolean flag = true;\n\t\t \t\t\t\t\n\t\t \t\t\t\tfor(ArrayList<Integer> ll : res) {\n\t\t \t\t\t\t\tif(ll.equals(l)) {\n\t\t \t\t\t\t\t\tflag = false;\n\t\t \t\t\t\t\t\tbreak;\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(flag == true)\n\t\t \t\t\t\t\tres.add(l);\n\t\t \t\t\t\t\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t} else\n \t\t\t\th.put(sum, new Index(a.get(i), a.get(j)));\n \t\t}\n \t}\n \treturn res;\n\t}", "public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\r\n }", "public static void func(){\n\t\tHashMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tint limit = 1000;\n\t\tboolean psb[] = generatePrime(limit);\n\t\t\n\t\tint ps[] = MathTool.generatePrime(100000);\n\t\tfor (int i = 1; ps[i]<1000; i++) {\n\t\t\t//System.out.println(ps[i]);\n\t\t}\n\t\tint max=0;\n\t\tfor (int i = 0; ps[i] < limit; i++) {\n\t\t\tint n = ps[i];\n\t\t\tint j=i;\n\t\t\twhile(n<limit){\n\t\t\t\tif(!psb[n]){\n\t\t\t\t\tint num =j-i+1;\n\t\t\t\t\tif(map.containsKey(n)){\n\t\t\t\t\t\tif(map.get(new Integer(n)) < num){\n\t\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t}\n\t\t\t\t\tif(num > max){\n\t\t\t\t\t\tmax=num;\n\t\t\t\t\t\tSystem.out.println(num+\" \"+n+\" \"+i+\" \"+j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tn+=ps[j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }", "public static void main(String[] args) {\n\t\tint p[]=new int[200];\n\t\tint n;int count=0;\n\t\tint pp=0;\n\t\tfor(int i=2;i<1000;i++) {\n\t\t\tint flag=1;\n\t\t\tfor(int j=2;j<i;j++) {\n\t\t\t\tif(i%j==0) {\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t//checking if flag is 0 or not\t\n\t\t\t}if(flag==1) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(i);\n\t\t\t \n\t\t\t\tp[pp]=i;\n\t\t\t pp++;\n\t\t\t count++;\n\t\t\t}\n\t}\n\t\tn=count;\n\t//for(int i=0;i<p.length;i++) {\n\t//if(p[i]!=0)\n\t //System.out.println(p[i]);\n\t//}\n\tint k=0;\n\tint count1=0;\n\tboolean b=false;\n\tint aa[]=new int[200];\t\n\t//calling my stack class \n\tMyStack m=new MyStack();\n\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t//calling check method anagram calss\t\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\tSystem.out.println(p[i]+\" \"+p[j]);\n\t\t\taa[k]=p[i];\n\t\t\tm.push(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\tk++; \n\t\t\taa[k]=p[j];\n\t\t\tk++;\n\t\t\tm.push(p[j]);\n\t\t\tcount1++;\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<count1*2;i++)\n\t//{int a=m.popint();\n\t//if(p[i]!=0)\n\t\t//System.out.println(a);\n\t//}\n\t//for(int t=0;t<aa.length;t++) {\n\t\t//if(aa[t]!=0) {\n\t\t//\tSystem.out.println(aa[t]);\n\t\t//}\n\t//}\n\tSystem.out.println(\"this is for stack\");\n\tSystem.out.println(\" ************************\");\n\n\tm.reverse();\n\t System.out.println(count1); \n\tSystem.out.println(\"this for queue\");\n\tSystem.out.println(\" ************************\");\n\tMyQueue mq=new MyQueue(count1*2);\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\t//System.out.println(p[i]+\" \"+p[j]);\n\t\t\t//aa[k]=p[i];\n\t\t\tmq.enqueue(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\t//k++; \n\t\t\t//aa[k]=p[j];\n\t\t\t//k++;\n\t\t\tmq.enqueue(p[j]);\n\t\t\t\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<(count1*2)-1;i++);\n\t//{\n\t//int a=mq.dequeue();\n\t//System.out.println(a);\n\t//}\n\tSystem.out.println(mq);\n\n\n\t}", "private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }", "public int get_odd_occurences_optimal_v2(int[] a) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tresult ^= i;\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "static void compute(List<Integer> slate, int[] input) {\n if (input.length == 0)\n System.out.println(slate);\n else {\n int[] copy = Arrays.copyOfRange(input, 1, input.length);\n compute(slate, copy);\n slate.add(input[0]);\n compute(slate, copy);\n slate.remove(slate.size() - 1);\n }\n }", "public void triplet(int[] b,int n){\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<n;i++){\r\n\t\t\tfor(int j=i+1;j<n-1;j++){\r\n\t\t\t\tfor(int k=j+1;k<n-2;k++){\r\n\t\t\t\t\tif(b[i]+b[j]+b[k]==0){\r\n\t\t\t\t\t\tSystem.out.println(b[i]+\" \"+b[j]+\" \"+b[k]);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"no of distinct triplet is:\"+count);\t\r\n\r\n\t}", "static int findMajority(int[] nums) {\n if (nums.length == 1) {//one element in array\n return nums[0];\n }\n\n Map<Integer, Integer> occurrencesCountMap = new HashMap<>();// element - times occured\n\n for (int n : nums) {//traverse nums\n\n if (occurrencesCountMap.containsKey(n) //if in map\n &&//and\n occurrencesCountMap.get(n) + 1 > nums.length / 2) {//times occurred +1 ( for current iteration ) > len/2\n\n return n;\n\n } else {//not in map yet\n\n occurrencesCountMap.put(n, occurrencesCountMap.getOrDefault(n, 0) + 1);//add 1 to existing , or inti with 1\n\n }\n }\n return -1;//no majority ( no one length/2 times occurred )\n }", "private static void traverse(int i, int j) {\r\n\t\tif(i + j == SIZE + SIZE){\r\n\t\t\tCOUNT++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(i < SIZE){\r\n\t\t\ttraverse(i + 1, j);\r\n\t\t}\r\n\t\tif(j < SIZE){\r\n\t\t\ttraverse(i, j + 1);\r\n\t\t}\r\n\t}", "static void heapify1(Vector<Integer> arr, int n, int i) {\r\n\t\tint s = i;\r\n\t\tint l = 2 * i + 1;\r\n\t\tint r = l + 1;\r\n\r\n\t\tif (r < n && arr.get(s) > arr.get(r)) {\r\n\t\t\ts = r;\r\n\t\t}\r\n\t\tif (l < n && arr.get(s) > arr.get(l)) {\r\n\t\t\ts = l;\r\n\t\t}\r\n\t\tif (s != i) {\r\n\t\t\tint temp = arr.get(i);\r\n\t\t\tarr.set(i, arr.get(s));\r\n\t\t\tarr.set(s, temp);\r\n\t\t\theapify1(arr, n, s);\r\n\t\t}\r\n\t}", "private int d(amj paramamj)\r\n/* 50: */ {\r\n/* 51: 70 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 52: 71 */ if ((this.a[i] != null) && (this.a[i].b() == paramamj.b()) && (this.a[i].d()) && (this.a[i].b < this.a[i].c()) && (this.a[i].b < p_()) && ((!this.a[i].f()) || (this.a[i].i() == paramamj.i())) && (amj.a(this.a[i], paramamj))) {\r\n/* 53: 72 */ return i;\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 75 */ return -1;\r\n/* 57: */ }", "public static void main(String[] args) {\n\t\tArrayList<Integer> array = new ArrayList<>();\n\t\tLinkedList<Integer> linked = new LinkedList<>();\n\t\t\n\t\tlong aStart = System.currentTimeMillis();\n\t\tint i;\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tarray.add(i);\n\t\t}\n\t\tlong aEnd = System.currentTimeMillis();\n\t\tlong aTime = aEnd - aStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+aTime+\"ms\");\n\t\t\n\t\t\n\t\tlong lStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\tlong lEnd = System.currentTimeMillis();\n\t\tlong lTime = lEnd - lStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+lTime+\"ms\");\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\t\n\t\t\n\t\taStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<1000000; i++){\n\t\t\tarray.add(i);\n\t\t}\n\t\taEnd = System.currentTimeMillis();\n\t\taTime = aEnd - aStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+aTime+\"ms\");\n\t\t\n\t\t\n\t\tlStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\tlEnd = System.currentTimeMillis();\n\t\tlTime = lEnd - lStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+lTime+\"ms\");\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t}", "public static void cntArray(int A[], int N) \n { \n // initialize result with 0 \n int result = 0; \n \n for (int i = 0; i < N; i++) { \n \n // all size 1 sub-array \n // is part of our result \n result++; \n \n // element at current index \n int current_value = A[i]; \n \n for (int j = i + 1; j < N; j++) { \n \n // Check if A[j] = A[i] \n // increase result by 1 \n if (A[j] == current_value) { \n result++; \n } \n } \n } \n \n // print the result \n System.out.println(result); \n }", "@Override\n public long getComplexity() {\n final long[] complexity = {0};\n getChecks().forEachRemaining(element -> {\n complexity[0] += element.getComplexity();\n });\n return complexity[0];\n }" ]
[ "0.7179713", "0.70217144", "0.66647255", "0.63780856", "0.63235724", "0.6167886", "0.6111599", "0.60377115", "0.5962103", "0.5946287", "0.5799606", "0.5778182", "0.5755147", "0.5726366", "0.56830114", "0.5662858", "0.56538105", "0.55846494", "0.55842006", "0.55830675", "0.55801857", "0.556345", "0.5542923", "0.55268914", "0.5487111", "0.54700136", "0.54499775", "0.5441784", "0.5425758", "0.5386318", "0.53768355", "0.5356031", "0.5355934", "0.53507835", "0.53306335", "0.53271884", "0.53231156", "0.52969027", "0.52927333", "0.5269758", "0.5269593", "0.5263829", "0.52621955", "0.5242783", "0.52399445", "0.52324325", "0.52318454", "0.52311623", "0.5222673", "0.5218311", "0.52030426", "0.52006495", "0.51888573", "0.51803106", "0.51793313", "0.51766896", "0.51753885", "0.5173932", "0.51695514", "0.5165587", "0.5162354", "0.5160205", "0.51594603", "0.5148757", "0.51372933", "0.51352173", "0.5130323", "0.51279336", "0.51267636", "0.51258475", "0.5113951", "0.51130605", "0.50896007", "0.5087742", "0.5076326", "0.50758517", "0.5073695", "0.5069943", "0.50672454", "0.50660646", "0.50625974", "0.50549227", "0.5053411", "0.5038985", "0.50374895", "0.503342", "0.5032277", "0.5032186", "0.50318116", "0.5031527", "0.5025842", "0.5018026", "0.5015711", "0.5011046", "0.5010673", "0.5010299", "0.500463", "0.5000643", "0.4998423", "0.4997839", "0.4995669" ]
0.0
-1
Creates a new ServerProperties instance, initialized from a default properties file. Prints an error to the console if problems occur on loading.
public DataInputClientProperties() throws IOException { this(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServerProperties() {\n try {\n initializeProperties();\n }\n catch (Exception e) {\n System.out.println(\"Error initializing server properties.\");\n }\n }", "private void initializeProperties(String propertiesFilename) throws IOException {\n this.properties = new Properties();\n\n // Set defaults for 'standard' operation.\n // properties.setProperty(FILENAME_KEY, clientHome + \"/bmo-data.tsv\");\n properties.setProperty(BMO_URI_KEY,\n \"http://www.buildingmanageronline.com/members/mbdev_export.php/download.txt\");\n\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propertiesFilename);\n properties.load(stream);\n System.out.println(\"Loading data input client properties from: \" + propertiesFilename);\n }\n catch (IOException e) {\n System.out.println(propertiesFilename\n + \" not found. Using default data input client properties.\");\n throw e;\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n trimProperties(properties);\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "public Server(String propertiesFile) throws IOException\n {\n Properties properties = new Properties();\n FileInputStream input = new FileInputStream(propertiesFile);\n properties.load(input);\n port = Integer.parseInt(properties.getProperty(\"port\"));\n socket = new ServerSocket(port);\n System.out.println(\"Server ready for client\");\n while(true)\n {\n new ServerConnection(socket.accept()).start();\n }\n }", "private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }", "private void init(String propFilePath) {\n properties = new Properties();\n try {\n properties.load(new FileInputStream(new File(propFilePath)));\n } catch (FileNotFoundException e1) {\n logger.error(\"External properties file not found!\", e1);\n System.exit(1);\n } catch (IOException e2) {\n logger.error(\"Error while reading External properties file!\", e2);\n System.exit(1);\n }\n }", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "@Test\n public void testCreateFromProperties_Properties() throws Exception {\n System.out.println(\"createFromProperties\");\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n EngineConfiguration result = EngineConfiguration.createFromProperties(props);\n assertProperties(result);\n }", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "public void init(Properties properties) throws IOException;", "private static void checkServerProperties() throws IOException {\r\n\r\n Properties serverProperties = new Properties();\r\n FileInputStream input = new FileInputStream(SERVER_PROPERTIES_PATH);\r\n serverProperties.load(input);\r\n port = Integer.valueOf(serverProperties.getProperty(\"server.port\"));\r\n String adminLogin = serverProperties.getProperty(\"admin.login\");\r\n String adminPassword = serverProperties.getProperty(\"admin.password\");\r\n\r\n User admin = MongoDB.get(User.class, adminLogin);\r\n if (admin == null) {\r\n admin = new User(adminLogin, adminPassword, \"Administrator\",\r\n \"[email protected]\", false, false);\r\n MongoDB.store(admin);\r\n System.out.println(\"Created default admin user.\");\r\n }\r\n\r\n if (!admin.checkPassword(adminPassword)) {\r\n MongoDB.delete(User.class, adminLogin);\r\n admin = new User(adminLogin, adminPassword, \"Administrator\",\r\n \"[email protected]\", false, false);\r\n MongoDB.store(admin);\r\n System.out.println(\"Assigned a new admin password.\");\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "public static void init(String propfile) throws Exception\r\n\t{\r\n\t\tinit(propfile, \"Properties\", new String[0]);\r\n\t}", "public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void init() throws Exception\r\n\t{\r\n\t\tinit(PROPERTY_FILE, \"Properties\", new String[0]);\r\n\t}", "public DefaultProperties() {\n\t\t// Festlegung der Werte für Admin-Zugang\n\t\tthis.setProperty(\"admin.username\", \"admin\");\n\t\tthis.setProperty(\"admin.password\", \"password\");\n\t\tthis.setProperty(\"management.port\", \"8443\");\n\n\t\t// Festlegung der Werte für CouchDB-Verbindung\n\t\tthis.setProperty(\"couchdb.adress\", \"http://localhost\");\n\t\tthis.setProperty(\"couchdb.port\", \"5984\");\n\t\tthis.setProperty(\"couchdb.databaseName\", \"profiles\");\n\n\t\t// Festlegung der Werte für Zeitvergleiche\n\t\tthis.setProperty(\"server.minTimeDifference\", \"5\");\n\t\tthis.setProperty(\"server.monthsBeforeDeletion\", \"18\");\n\t}", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "private void initializeProperties () throws Exception {\n String userHome = System.getProperty(\"user.home\");\n String userDir = System.getProperty(\"user.dir\");\n String hackyHome = userHome + \"/.hackystat\";\n String sensorBaseHome = hackyHome + \"/sensorbase\"; \n String propFile = userHome + \"/.hackystat/sensorbase/sensorbase.properties\";\n this.properties = new Properties();\n // Set defaults\n properties.setProperty(ADMIN_EMAIL_KEY, \"[email protected]\");\n properties.setProperty(ADMIN_PASSWORD_KEY, \"[email protected]\");\n properties.setProperty(CONTEXT_ROOT_KEY, \"sensorbase\");\n properties.setProperty(DB_DIR_KEY, sensorBaseHome + \"/db\");\n properties.setProperty(DB_IMPL_KEY, \"org.hackystat.sensorbase.db.derby.DerbyImplementation\");\n properties.setProperty(HOSTNAME_KEY, \"localhost\");\n properties.setProperty(LOGGING_LEVEL_KEY, \"INFO\");\n properties.setProperty(SMTP_HOST_KEY, \"mail.hawaii.edu\");\n properties.setProperty(PORT_KEY, \"9876\");\n properties.setProperty(XML_DIR_KEY, userDir + \"/xml\");\n properties.setProperty(TEST_INSTALL_KEY, \"false\");\n properties.setProperty(TEST_DOMAIN_KEY, \"hackystat.org\");\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propFile);\n properties.load(stream);\n System.out.println(\"Loading SensorBase properties from: \" + propFile);\n }\n catch (IOException e) {\n System.out.println(propFile + \" not found. Using default sensorbase properties.\");\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n // Now add to System properties. Since the Mailer class expects to find this stuff on the \n // System Properties, we will add everything to it. In general, however, clients should not\n // use the System Properties to get at these values, since that precludes running several\n // SensorBases in a single JVM. And just is generally bogus. \n Properties systemProperties = System.getProperties();\n systemProperties.putAll(properties);\n System.setProperties(systemProperties);\n }", "private static void init()\n {\n long nTimeOut = 12 * 60 * 60 * 1000; // Default == 12 hrs\n \n // Loading values from properties file\n Properties props = new Properties();\n \n try\n {\n ClassLoader classLoader = Constant.class.getClassLoader();\n InputStream is = classLoader.getResourceAsStream(\"joing-server.properties\");\n props.load( is );\n is.close();\n }\n catch( Exception exc )\n {\n // If can not read the file, create a file with default values\n String sHome = System.getProperty( \"user.home\" );\n char cDir = File.separatorChar;\n \n if( sHome.charAt( sHome.length() - 1 ) != cDir )\n sHome += cDir;\n \n // Initialise properties instance with default values\n props.setProperty( sSYSTEM_NAME , \"joing.org\" );\n props.setProperty( sBASE_DIR , cDir +\"joing\" );\n props.setProperty( sEMAIL_SRV , \"localhost\" );\n props.setProperty( sSESSION_TIMEOUT, Long.toString( nTimeOut ));\n }\n \n // Read properties from created props\n sVersion = \"0.1\"; // It's better to hardcode this property than to store it in a file\n sSysName = props.getProperty( sSYSTEM_NAME );\n fBaseDir = new File( props.getProperty( sBASE_DIR ) );\n fUserDir = new File( fBaseDir, \"users\" );\n fAppDir = new File( fBaseDir, \"apps\" );\n \n if( ! fBaseDir.exists() )\n fBaseDir.mkdirs();\n \n if( ! fAppDir.exists() )\n fAppDir.mkdirs();\n \n if( ! fUserDir.exists() )\n fUserDir.mkdirs();\n \n try\n {\n emailServer = new URL( props.getProperty( sEMAIL_SRV ) );\n }\n catch( MalformedURLException exc )\n {\n emailServer = null;\n }\n \n try\n { // From minutes (in file) to milliseconds\n nSessionTimeOut = Long.parseLong( props.getProperty( sSESSION_TIMEOUT ) ) * 60 * 1000;\n }\n catch( NumberFormatException exc )\n {\n nSessionTimeOut = nTimeOut;\n }\n }", "private void initializeProperties() throws IOException {\n String userHome = org.wattdepot.util.logger.WattDepotUserHome.getHomeString();\n String wattDepotHome = userHome + \"/.wattdepot\";\n String clientHome = wattDepotHome + \"/client\";\n String propFile = clientHome + \"/datainput.properties\";\n initializeProperties(propFile);\n }", "private static Properties loadProperties() {\n Properties properties;\n try (InputStream in = FHIRServerProperties.class.getClassLoader().getResourceAsStream(HAPI_PROPERTIES)) {\n properties = new Properties();\n properties.load(in);\n } catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties\", e);\n }\n\n Properties overrideProps = loadOverrideProperties();\n if (overrideProps != null) {\n properties.putAll(overrideProps);\n }\n return properties;\n }", "public\n YutilProperties()\n {\n super(new Properties());\n }", "private void init() {\n\t\tif ( PropertiesConfigurationFilename == null ) {\n\t\t\tlogger.info(\"config.properties is default\");\n\t\t\tconfigProp = createDefaultProperties();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tlogger.info(\"config.properties is \"+ PropertiesConfigurationFilename.getAbsolutePath());\n\t\t\t\tconfigProp = new PropertiesConfiguration();\n\t\t\t\tconfigProp.load(PropertiesConfigurationFilename);\n\t\t\t} catch (ConfigurationException e) {\n\t\t\t\tlogger.error(\"Unable to open config file: \" + PropertiesConfigurationFilename.getAbsolutePath(), e);\n\t\t\t\tlogger.info(\"config.properties is default\");\n\t\t\t\tconfigProp = createDefaultProperties();\n\t\t\t}\n\t\t}\n\n\n\t\t// Load the locale information\n\t\tString locale = configProp.getString(\"locale\");\n\n\t\tconfigProp.setProperty(\"zmMsg\", ResourceBundle.getBundle(\"ZmMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zhMsg\", ResourceBundle.getBundle(\"ZhMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"ajxMsg\", ResourceBundle.getBundle(\"AjxMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"i18Msg\", ResourceBundle.getBundle(\"I18nMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zsMsg\", ResourceBundle.getBundle(\"ZsMsg\", new Locale(locale)));\n\n\t}", "public DataInputClientProperties(String propertiesFilename) throws IOException {\n if (propertiesFilename == null) {\n initializeProperties();\n }\n else {\n initializeProperties(propertiesFilename);\n }\n }", "public void init()\n {\n try\n {\n userPasswordsProperties = new Properties();\n userPasswordsProperties.load(new FileInputStream(userPasswordsPropertiesFileName));\n log.info(\"Successfully initialized. UsersPasswords property file is: \" + userPasswordsPropertiesFileName);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"UserNamesPropertyFile name: \" + userPasswordsPropertiesFileName + \" not valid. Error: \" + e);\n }\n \n }", "@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }", "public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "public void echoProperties(Server server) {\n String cr = System.getProperty(\"line.separator\"); \n String eq = \" = \";\n String pad = \" \";\n String propertyInfo = \"SensorBase Properties:\" + cr +\n pad + ADMIN_EMAIL_KEY + eq + get(ADMIN_EMAIL_KEY) + cr +\n pad + ADMIN_PASSWORD_KEY + eq + get(ADMIN_PASSWORD_KEY) + cr +\n pad + HOSTNAME_KEY + eq + get(HOSTNAME_KEY) + cr +\n pad + CONTEXT_ROOT_KEY + eq + get(CONTEXT_ROOT_KEY) + cr +\n pad + DB_DIR_KEY + eq + get(DB_DIR_KEY) + cr +\n pad + DB_IMPL_KEY + eq + get(DB_IMPL_KEY) + cr +\n pad + LOGGING_LEVEL_KEY + eq + get(LOGGING_LEVEL_KEY) + cr +\n pad + SMTP_HOST_KEY + eq + get(SMTP_HOST_KEY) + cr +\n pad + PORT_KEY + eq + get(PORT_KEY) + cr +\n pad + TEST_INSTALL_KEY + eq + get(TEST_INSTALL_KEY) + cr + \n pad + XML_DIR_KEY + eq + get(XML_DIR_KEY);\n server.getLogger().info(propertyInfo);\n }", "public TestProperties() {\n\t\tthis.testProperties = new Properties();\n\t}", "public final Properties init() throws FileNotFoundException, IOException{\n /*\n Your properties file must be in the deployed .war file in WEB-INF/classes/tokens. It is there automatically\n if you have it in Source Packages/java/tokens when you build. That is how this will read it in without defining a root location\n https://stackoverflow.com/questions/2395737/java-relative-path-of-a-file-in-a-java-web-application\n */\n String fileLoc =TinyTokenManager.class.getResource(Constant.PROPERTIES_FILE_NAME).toString();\n fileLoc = fileLoc.replace(\"file:\", \"\");\n setFileLocation(fileLoc);\n InputStream input = new FileInputStream(propFileLocation);\n props.load(input);\n input.close();\n currentAccessToken = props.getProperty(\"access_token\");\n currentRefreshToken = props.getProperty(\"refresh_token\");\n currentS3AccessID = props.getProperty(\"s3_access_id\");\n currentS3Secret = props.getProperty(\"s3_secret\");\n currentS3BucketName = props.getProperty(\"s3_bucket_name\");\n currentS3Region = Region.US_WEST_2;\n apiSetting = props.getProperty(\"open_api_cors\");\n return props;\n }", "public static void loadProperties() {\n properties = new Properties();\n try {\n File f = new File(\"system.properties\");\n if (!(f.exists())) {\n OutputStream out = new FileOutputStream(f);\n }\n InputStream is = new FileInputStream(f);\n properties.load(is);\n lastDir = getLastDir();\n if (lastDir == null) {\n lastDir = \"~\";\n setLastDir(lastDir);\n }\n properties.setProperty(\"lastdir\", lastDir);\n\n // Try loading properties from the file (if found)\n properties.load(is);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static Properties loadOrCreateProperties(String filename, Properties defaultProperties) {\n\n Properties properties = new Properties();\n try {\n properties.load(new FileInputStream(filename));\n } catch (Exception loadException) {\n try {\n FileOutputStream out = new FileOutputStream(filename);\n if (defaultProperties != null) {\n defaultProperties.store(out, null);\n }\n out.close();\n properties.load(new FileInputStream(filename));\n } catch (Exception writeException) {\n // Do nothing\n return null;\n }\n }\n return properties;\n }", "public DetectionProperties() throws Exception {\n super(DetectionProperties.class.getResourceAsStream(PROPERTIES_FILE_NAME));\n }", "protected Properties loadClientProperties(String filename) throws Exception {\n InputStream is = null;\n try {\n Properties props = new Properties();\n\n // Open the properties file specified by the user.\n File f = new File(filename);\n if (f.exists()) {\n is = new FileInputStream(f);\n } else {\n throw new FileNotFoundException(\"Properties file '\" + filename + \"' not found.\");\n }\n\n // Load the properties.\n props.load(is);\n is.close();\n\n return props;\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "private void loadProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Loading Properties from {}\", path.toString());\n try {\n FileInputStream fis = new FileInputStream(getSamplePropertiesPath().toFile());\n Properties properties = new Properties();\n properties.load(fis);\n\n String privateKey = properties.getProperty(PRIVATE_KEY);\n this.credentials = Credentials.create(privateKey);\n this.contract1Address = properties.getProperty(CONTRACT1_ADDRESS);\n this.contract2Address = properties.getProperty(CONTRACT2_ADDRESS);\n this.contract3Address = properties.getProperty(CONTRACT3_ADDRESS);\n this.contract4Address = properties.getProperty(CONTRACT4_ADDRESS);\n this.contract5Address = properties.getProperty(CONTRACT5_ADDRESS);\n this.contract6Address = properties.getProperty(CONTRACT6_ADDRESS);\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "public PropertiesUtil() {\n\t\t// Read properties file.\n\n\t\tproperties = new Properties();\n\t\ttry {\n\t\t\tproperties.load(PropertiesUtil.class.getClassLoader().getResourceAsStream(\"variables.properties\"));\n\t\t\tlog.info(\"variables.properties file loaded successfully\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"variables.properties file not found: \", e);\n\t\t}\n\t}", "public FileServicePropertiesProperties() {\n }", "private void createPropertiesFile(final File configFile) throws IOException {\n if (configFile.createNewFile()) {\n FileWriter writer = new FileWriter(configFile);\n writer.append(\"ch.hslu.vsk.server.port=1337\\n\");\n writer.append(\"ch.hslu.vsk.server.logfile=\");\n writer.flush();\n writer.close();\n }\n }", "@Test\r\n\t\tpublic static void Properties() \r\n\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tprop = new Properties();\r\n\t\t\t\tfile = new File(\"C:\\\\Users\\\\vardhan\\\\eclipse-workspace\\\\com.makemytrip\\\\prop.properties\");\r\n\t\t\t\tfilereader = new FileReader(file);\r\n\t\t\t\tprop.load(filereader);\r\n\t\t\t\t\r\n\t\t\t }\r\n\t\t\r\n\t\t\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}", "@BeforeSuite\n\tpublic void propertiesFileReader(){\n\t\tif(prop == null){\t\t\t\n\t\t\tprop = new Properties();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"qa\")){ prop.load(new\n\t\t\t\t * FileInputStream(qaProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"stage\")){ prop.load(new\n\t\t\t\t * FileInputStream(stagProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"prod\")){ prop.load(new\n\t\t\t\t * FileInputStream(prodProperty)); }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"qa\")) \n\t\t\t\t\tFileUtils.copyFile(new File(qaProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"stage\"))\n\t\t\t\t\tFileUtils.copyFile(new File(stagProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"prod\"))\n\t\t\t\t\tFileUtils.copyFile(new File(prodProperty), new File(defaultProperty));\n\t\t\t\t\n\t\t\t\tprop.load(new FileInputStream(defaultProperty));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"user + pass [\"+prop.getProperty(\"username\")+\"===\"+prop.getProperty(\"password\"));\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public Properties init_prop() {\n\t\tprop = new Properties();\n\t\tString path = null;\n\t\tString env = null;\n\n\t\ttry {\n\n\t\t\tenv = System.getProperty(\"env\");\n\t\t\tSystem.out.println(\"Running on Envirnment: \" + env);\n\n\t\t\tif (env == null) {\n\t\t\t\tSystem.out.println(\"Default Envirnment: \" + \"PROD\");\n\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.prod.properties\";\n\n\t\t\t} else {\n\t\t\t\tswitch (env) {\n\t\t\t\tcase \"qa\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.qa.properties\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dev\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.dev.properties\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stage\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.stage.properties\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prod\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.prod.properties\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Please Pass the Correct Env Value...\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tFileInputStream finput = new FileInputStream(path);\n\t\t\tprop.load(finput);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn prop;\n\t}", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "public void SetPropertiesGenerateServer(java.lang.String s) {\r\n java.lang.String thred = ThredProperties();\r\n Properties prop = new Properties();\r\n\r\n try (FileOutputStream out = new FileOutputStream(\"./config.properties\")) {\r\n\r\n switch (s) {\r\n case \"SimpleMazeGenerator\": {\r\n System.out.println(\"ggg\");\r\n prop.setProperty(\"algorithm\", solve);\r\n prop.setProperty(\"generate\", \"SimpleMazeGenerator\");\r\n generate=\"SimpleMazeGenerator\";\r\n prop.setProperty(\"threadNum\", thred);\r\n prop.store(out, null);\r\n break;\r\n }\r\n case \"MyMazeGenerator\": {\r\n prop.setProperty(\"algorithm\", solve);\r\n prop.setProperty(\"generate\", \"MyMazeGenerator\");\r\n generate=\"MyMazeGenerator\";\r\n prop.setProperty(\"threadNum\", thred);\r\n prop.store(out, null);\r\n break;\r\n }\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setupProp() {\r\n\t\tprop = new Properties();\r\n\t\tInputStream in = getClass().getResourceAsStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(in);\r\n\t\t\tFileInputStream fin = new FileInputStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(fin);\r\n\t\t\tdblogic = (PatronDBLogic) ois.readObject();\r\n\t\t\tois.close();\r\n\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void basefn() throws IOException {\r\n\t\t//Below line creates an object of Properties called 'prop'\r\n\t\tprop = new Properties(); \r\n\t\t\r\n\t\t//Below line creates an object of FileInputStream called 'fi'. Give the path of the properties file which you have created\r\n\t\tFileInputStream fi = new FileInputStream(\"D:\\\\Java\\\\workspace\\\\Buffalocart\\\\src\\\\test\\\\resources\\\\config.properties\");\r\n\t\t\r\n\t\t//Below line of code will load the property file\r\n\t\tprop.load(fi);\t\t\t\t\r\n\t}", "private static synchronized void initialize(String prop) {\n\t\tFileInputStream is=null;\n\t\tproperties = new Properties();\n\t\ttry {\n\t\t\tis = new FileInputStream(prop);\n\t\t\tif (is == null) {\n\t\t\t System.out.println(\"The prop is null.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tproperties.load(is);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t System.out.println(\"properties loading fails.\");\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\tfinally{\n\t\t\t\ttry{\n\t\t\t\t\tif(is!=null)\n\t\t\t\t\t\tis.close();\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex){\n\t\t\t\t System.out.println(\"properties loading fails for runtime exception.\");\n\t\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t}\n\t}", "private void loadProperties() {\n driver = JiveGlobals.getXMLProperty(\"database.defaultProvider.driver\");\n serverURL = JiveGlobals.getXMLProperty(\"database.defaultProvider.serverURL\");\n username = JiveGlobals.getXMLProperty(\"database.defaultProvider.username\");\n password = JiveGlobals.getXMLProperty(\"database.defaultProvider.password\");\n String minCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.minConnections\");\n String maxCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.maxConnections\");\n String conTimeout = JiveGlobals.getXMLProperty(\"database.defaultProvider.connectionTimeout\");\n // See if we should use Unicode under MySQL\n mysqlUseUnicode = Boolean.valueOf(JiveGlobals.getXMLProperty(\"database.mysql.useUnicode\")).booleanValue();\n try {\n if (minCons != null) {\n minConnections = Integer.parseInt(minCons);\n }\n if (maxCons != null) {\n maxConnections = Integer.parseInt(maxCons);\n }\n if (conTimeout != null) {\n connectionTimeout = Double.parseDouble(conTimeout);\n }\n }\n catch (Exception e) {\n Log.error(\"Error: could not parse default pool properties. \" +\n \"Make sure the values exist and are correct.\", e);\n }\n }", "protected Properties newTestProperties() throws IOException\n {\n Properties props = new Properties();\n storeTestConf(props); \n return props;\n }", "public TestBase() {\n try {\n properties = new Properties();\n FileInputStream fileInputStream = new FileInputStream(\"F:/LearningStuff/PracticalWork\" +\n \"/Frameworks/DataDrivenFrameworkSelenium/src/main/resources/config/config.properties\");\n properties.load(fileInputStream);\n } catch (FileNotFoundException f) {\n f.printStackTrace();\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "public Properties initProperties() {\r\n\t\tprop = new Properties();\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(\"./src/main/java/com/automation/qe/config/config.properties\");\r\n\t\t\tprop.load(fis);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn prop;\r\n\t}", "public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STANDARD_PROPERTY_FILE;\r\n\r\n\t\tif (System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE) != null\r\n\t\t\t\t&& System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE)\r\n\t\t\t\t\t\t.length() != 0) {\r\n\t\t\tfile = System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE);\r\n\t\t}\r\n\r\n\t\t// load property file\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.load(ClassLoader.getSystemResourceAsStream(file));\r\n\t\t\tSystem.setProperties(props);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t}\r\n\r\n\t}", "public PropertyManager() {\n propFileName = System.getProperty(\"user.home\") + File.separator +\n defPropFile;\n\n recentResult = loadPropertyFile(propFileName);\n }", "private PropertyUtil(){\n\t\ttry{\n\t\t\tloadURL();\n\t\t\tRuntime.getRuntime().addShutdownHook(new UtilShutdownHook());\n\t\t}catch(IOException ioe){\n\t\t\tLOGGER.error(\"Unable to load Property File\\n\"+ioe);\n\t\t}\n\t\tLOGGER.debug(\"INSTANTIATED\");\n\t}", "private static synchronized void setProperties(\n final String strPropertiesFilename) {\n if (msbPropertiesLoaded) {\n Verbose.warning(\"Properties already loaded; ignoring request\");\n\n return;\n }\n\n File oFile = new File(strPropertiesFilename);\n\n if (!oFile.exists()) {\n // Try to get it from jar file\n ClassLoader classLoader = Thread.currentThread()\n .getContextClassLoader();\n final InputStream input;\n\n if (classLoader == null) {\n classLoader = Class.class.getClassLoader();\n }\n input = classLoader\n .getResourceAsStream('/' + strPropertiesFilename);\n PropertyDef.setProperties(input, null);\n } else {\n PropertyDef.setProperties(new File(strPropertiesFilename), null,\n false);\n }\n if (strPropertiesFilename == DEFAULT_PROPERTIES_FILENAME) {\n oFile = new File(CUSTOMER_PROPERTIES_FILENAME);\n if (oFile.exists() && oFile.isFile()) {\n PropertyDef.addProperties(oFile);\n }\n }\n AdaptiveReplicationTool.msbPropertiesLoaded = true;\n }", "public void init() {\n\t\tProperties prop = new Properties();\n\t\tInputStream propStream = this.getClass().getClassLoader().getResourceAsStream(\"db.properties\");\n\n\t\ttry {\n\t\t\tprop.load(propStream);\n\t\t\tthis.host = prop.getProperty(\"host\");\n\t\t\tthis.port = prop.getProperty(\"port\");\n\t\t\tthis.dbname = prop.getProperty(\"dbname\");\n\t\t\tthis.schema = prop.getProperty(\"schema\");\n\t\t\tthis.passwd=prop.getProperty(\"passwd\");\n\t\t\tthis.user=prop.getProperty(\"user\");\n\t\t} catch (IOException e) {\n\t\t\tString message = \"ERROR: db.properties file could not be found\";\n\t\t\tSystem.err.println(message);\n\t\t\tthrow new RuntimeException(message, e);\n\t\t}\n\t}", "public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }", "public void testConstructor_NoParameter_ValidProperties() throws Exception {\n Properties p = new Properties();\n p.put(\"java.util.logging.StreamHandler.level\", \"FINE\");\n p.put(\"java.util.logging.StreamHandler.filter\", className\n + \"$MockFilter\");\n p.put(\"java.util.logging.StreamHandler.formatter\", className\n + \"$MockFormatter\");\n p.put(\"java.util.logging.StreamHandler.encoding\", \"iso-8859-1\");\n LogManager.getLogManager().readConfiguration(\n EnvironmentHelper.PropertiesToInputStream(p));\n\n assertEquals(\"FINE\", LogManager.getLogManager().getProperty(\n \"java.util.logging.StreamHandler.level\"));\n assertEquals(\"iso-8859-1\", LogManager.getLogManager().getProperty(\n \"java.util.logging.StreamHandler.encoding\"));\n StreamHandler h = new StreamHandler();\n assertSame(h.getLevel(), Level.parse(\"FINE\"));\n assertTrue(h.getFormatter() instanceof MockFormatter);\n assertTrue(h.getFilter() instanceof MockFilter);\n assertEquals(\"iso-8859-1\", h.getEncoding());\n }", "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "public PropertiesDocument() {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n\t\t\tthis.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Exception with default configuration\n\t\t\te.printStackTrace();\n\t\t}\n this.properties = new Properties();\n\t}", "public void loadProperties() throws IOException\n\t{\n\t\tFile src = new File(\"D://Selenium Stuff//Selenium Workspace//OpenCartL2_28112017//ObjectRepo.properties\");\n\t\tFileInputStream fis = new FileInputStream(src);\n\t\tpro = new Properties();\n\t\tpro.load(fis);\n\t}", "public LoadTestProperties() {\n }", "private static Properties loadOverrideProperties() {\n String confFile = System.getProperty(HAPI_PROPERTIES);\n if(confFile != null) {\n try {\n Properties props = new Properties();\n props.load(new FileInputStream(confFile));\n return props;\n }\n catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties file: \" + confFile, e);\n }\n }\n\n return null;\n }", "@PostConstruct\n\tpublic void loadProperties() {\n\t\tproperties.put(PropertyKey.TRANSLATION_FILE_STORE, \"C:\\\\development\\\\projects\\\\mega-translator\\\\store\");\n\t}", "private void loadProperties() {\n\t\tInputStream propsFile;\n\t\tProperties tempProp = new Properties();\n\n\t\ttry {\n\t\t\t//propsFile = new FileInputStream(\"plugins\\\\balloonplugin\\\\BalloonSegmentation.properties\");\n\t\t\tpropsFile = getClass().getResourceAsStream(\"/BalloonSegmentation.properties\");\n\t\t\ttempProp.load(propsFile);\n\t\t\tpropsFile.close();\n\n\t\t\t// load properties\n\t\t\tinit_channel = Integer.parseInt(tempProp.getProperty(\"init_channel\"));\t\t\t\t// initial channel selected for segmenting the cell architecture 1 - red, 2 - green, 3 - blue\n\t\t\tinit_max_pixel = Integer.parseInt(tempProp.getProperty(\"init_max_pixel\"));\t\t\t// initial max pixel intensity used for finding the doundaries of the colony of cells\n\t\t\tinit_HL = Integer.parseInt(tempProp.getProperty(\"init_HL\"));\t\t\t\t\t\t// initial H*L factor used finding seeds in the population\n\t\t\tinit_min_I = Integer.parseInt(tempProp.getProperty(\"init_min_I\"));\t\t\t\t\t// initial pixel intensity when balloon algorithm starts\n\t\t\tinit_max_I = Integer.parseInt(tempProp.getProperty(\"init_max_I\"));\t\t\t\t\t// final pixel intensity when balloon algorithm stops\n\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tIJ.error(\"I/O Exception: cannot read .properties file\");\n\t\t}\n\t}", "public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}", "protected void initVars() {\n prefFile = \"./server.ini\";\n mimeFile = \"./mime.ini\";\n }", "Properties defaultProperties();", "public static Properties load(String basedir, boolean bServer)\n throws Exception {\n if (!basedir.endsWith(File.separator)) {\n basedir = basedir + File.separator;\n }\n \n Properties prop = null;\n String amConfigProperties = basedir +\n SetupConstants.AMCONFIG_PROPERTIES;\n File file = new File(amConfigProperties);\n if (file.exists()) {\n prop = new Properties();\n InputStream propIn = new FileInputStream(amConfigProperties);\n try {\n prop.load(propIn);\n } finally {\n propIn.close();\n }\n SystemProperties.initializeProperties(prop);\n } else {\n isBootstrap = true;\n BootstrapData bData = new BootstrapData(basedir);\n prop = getConfiguration(bData, true, bServer);\n }\n \n return prop;\n }", "private static Properties setup() {\n Properties props = System.getProperties();\n try {\n props.load(new FileInputStream(new File(\"src/config.properties\")));\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n return props;\n }", "public static Properties getPropertiesDefault() throws IOException {\n\t\treturn getProperties(\"/properties/configuration.properties\");\n\t\t\n\t}", "public PSBeanProperties()\n {\n loadProperties();\n }", "PropertiesTask setProperties( File propertiesFile );", "public void testConstructor_NoParameter_InvalidProperties()\n throws Exception {\n Properties p = new Properties();\n p.put(\"java.util.logging.StreamHandler.level\", INVALID_LEVEL);\n p.put(\"java.util.logging.StreamHandler.filter\", className + \"\");\n p.put(\"java.util.logging.StreamHandler.formatter\", className + \"\");\n p.put(\"java.util.logging.StreamHandler.encoding\", \"XXXX\");\n LogManager.getLogManager().readConfiguration(\n EnvironmentHelper.PropertiesToInputStream(p));\n\n assertEquals(INVALID_LEVEL, LogManager.getLogManager().getProperty(\n \"java.util.logging.StreamHandler.level\"));\n assertEquals(\"XXXX\", LogManager.getLogManager().getProperty(\n \"java.util.logging.StreamHandler.encoding\"));\n StreamHandler h = new StreamHandler();\n assertSame(Level.INFO, h.getLevel());\n assertTrue(h.getFormatter() instanceof SimpleFormatter);\n assertNull(h.getFilter());\n assertNull(h.getEncoding());\n h.publish(new LogRecord(Level.SEVERE, \"test\"));\n assertTrue(CallVerificationStack.getInstance().empty());\n assertNull(h.getEncoding());\n }", "private static Properties loadProperties() throws SystemException {\r\n final Properties result;\r\n try {\r\n result = getProperties(PROPERTIES_DEFAULT_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n throw new SystemException(\"properties not found.\", e);\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Default properties: \" + result);\r\n }\r\n Properties specific;\r\n try {\r\n specific = getProperties(PROPERTIES_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n specific = new Properties();\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on loading specific properties.\", e);\r\n }\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Specific properties: \" + specific);\r\n }\r\n result.putAll(specific);\r\n \r\n // Load constant properties\r\n Properties constant = new Properties();\r\n try {\r\n constant = getProperties(PROPERTIES_CONSTANT_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n if (LOGGER.isWarnEnabled()) {\r\n LOGGER.warn(\"Error on loading contant properties.\");\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on loading contant properties.\", e);\r\n }\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Constant properties: \" + constant);\r\n }\r\n result.putAll(constant);\r\n \r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Merged properties: \" + result);\r\n }\r\n // set Properties as System-Variables\r\n for (final Object o : result.keySet()) {\r\n final String key = (String) o;\r\n String value = result.getProperty(key);\r\n value = replaceEnvVariables(value);\r\n System.setProperty(key, value);\r\n }\r\n return result;\r\n }", "public void init(java.util.Properties props) {\r\n }", "private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void init(){\n\t\tif(prop==null){\r\n\t\t\tprop=new Properties();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileInputStream fs = new FileInputStream(System.getProperty(\"user.dir\")+\"//src//test//resources//projectconfig.properties\");\r\n\t\t\t\tprop.load(fs);\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static Properties init(){\n // Get a Properties object\n Properties props = System.getProperties();\n props.setProperty(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.setProperty(\"mail.smtp.socketFactory.class\", SSL_FACTORY);\n props.setProperty(\"mail.smtp.socketFactory.fallback\", \"false\");\n props.setProperty(\"mail.smtp.port\", \"465\");\n props.setProperty(\"mail.smtp.socketFactory.port\", \"465\");\n props.put(\"mail.smtp.auth\", \"true\");\n //props.put(\"mail.debug\", \"true\");\n props.put(\"mail.store.protocol\", \"pop3\");\n props.put(\"mail.transport.protocol\", \"smtp\");\n\n return props;\n }", "public void init() {\n this.properties = loadProperties(\"/project3.properties\");\n }", "void setPropertiesFile(File file);", "public Configuration(Properties props) {\n test = Boolean.valueOf(props.getProperty(\"test\", \"false\"));\n name = props.getProperty(\"name\", \"OpenCraft Server\");\n message = props.getProperty(\"message\", \"http://opencraft.sf.net/\");\n maximumPlayers = Integer.valueOf(props.getProperty(\"max_players\", \"16\"));\n publicServer = Boolean.valueOf(props.getProperty(\"public\", \"false\"));\n verifyNames = Boolean.valueOf(props.getProperty(\"verify_names\", \"false\"));\n spongeRadius = Integer.valueOf(props.getProperty(\"sponge_radius\", \"2\"));\n gameMode = props.getProperty(\"game_mode\", CTFGameMode.class.getName());\n statsPostURL = props.getProperty(\"statsPostURL\");\n discordURL = props.getProperty(\"discordURL\");\n discordToken = props.getProperty(\"discordToken\");\n welcomeMessage = props.getProperty(\"welcomeMessage\");\n Constants.PORT = Integer.valueOf(props.getProperty(\"port\"));\n Constants.WEB_PORT = Integer.valueOf(props.getProperty(\"webPort\"));\n }", "public void init(Properties props) {\n\t\tString url = props.getProperty(EWARP_CONFIG_URL);\n\t\tif (url != null) {\n\t\t\tInputStream in = null;\n\t\t\ttry {\n\t\t\t\t// TODO consider other loading options, e.g. through WebHelper using ServletContext\n\t\t\t\tin = loadResource(url);\n\t\t\t\tProperties externalProps = new Properties();\n\t\t\t\texternalProps.load(in);\n\t\t\t}\n\t\t\tcatch (Throwable t) {\n\t\t\t\tlog.warn(\"failed to load external runtime configuration from \" + url + \": \" + t.getMessage());\n\t\t\t\t// TODO check another property, whether to bail out, \n\t\t\t\t// if external configuration can not be found\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif (in != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tin.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Throwable t) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcreateLifecycleInterceptor(props);\n\n\t\t// give interceptor a change to modify properties\n\t\truntimeProps = interceptor.configure(props);\n\t\t\n\t\t// log configuration\n\t\tif (log.isDebugEnabled()) {\n\t\t\tList<String> params = new ArrayList<String>();\n\t\t\tfor (Object key : runtimeProps.keySet()) {\n\t\t\t\tparams.add(key.toString());\n\t\t\t}\n\t\t\tif (params.size() > 0) {\n\t\t\t\tCollections.sort(params);\n\t\t\t\tlog.debug(\"=============== configuration ==============\");\n\t\t\t\tfor (String name : params) {\n\t\t\t\t\tString value = runtimeProps.getProperty(name);\n\t\t\t\t\tlog.debug(name + \"=\" + value);\n\t\t\t\t}\n\t\t\t\tlog.debug(\"============================================\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// init from properties\n\t\tList<String> args = new ArrayList<String>();\n\t\tconfigureErjang(runtimeProps, args);\n\t\truntimeArgs = (String[]) args.toArray(new String[args.size()]);\n\t}", "private void loadProperties() {\n\t\t\n\t\tString fldr = env.getProperty(\"response.folder\");\n\t\tthis.repo.setRootFolder( new File(fldr));;\n\t\t\n\t\tint nthConfigItem = 1;\n\t\twhile(true) {\n\t\t\tString seq = (\"\"+nthConfigItem++).trim();\n\t\t\t\n\t\t\tString xpathPropName = \"request.\" + seq + \".xpath\";\n\t\t\tString responseTextFilePropName = \"request.\" + seq + \".response.file\";\n\t\t\tString xpath = env.getProperty(xpathPropName);\n\t\t\tString responseTextFileName = env.getProperty(responseTextFilePropName);\n\t\t\tif (xpath!=null && !\"\".equals(xpath.trim())\n\t\t\t\t&& responseTextFileName!=null & !\"\".equals(responseTextFileName.trim())\t) {\n\t\t\t\t\n\t\t\t\trepo.addFile(xpath, responseTextFileName);\n\t\t\t\tController.logAlways(\"Loading config item [\" + seq + \"] xpath: [\" + rpad(xpath, 60) + \"] data file: [\" + rpad(responseTextFileName,25) + \"]\" );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tController.logAlways(\"End of littleMock initialization. No more properties from application.properties will be loaded because either [\" + xpathPropName + \"] or [\" + responseTextFilePropName + \"] was not found in application.properties.\");\n\t\t\t\t//parameters in application.properties must be\n\t\t\t\t//in sequential order, starting at 1.\n\t\t\t\t//When we discover the first missing one, stop looking for more.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\thumanReadableConfig = PlaybackRepository.SINGLETON.humanReadable();\n\t}", "public static void loadProperties()\n {\n Properties props = new Properties();\n try {\n props.load( new BufferedInputStream( ClassLoader.getSystemResourceAsStream(\"bench.properties\") ) );\n } catch (IOException ioe)\n {\n logger.log(Level.SEVERE, ioe.getMessage());\n }\n props.putAll(System.getProperties()); //overwrite\n System.getProperties().putAll(props);\n }", "public static void initialize()\n\t{\n\t\t/* Start to listen for file changes */\n\t\ttry\n\t\t{\n\t\t\t// We have to load the internal one initially to figure out where the external data directory is...\n\t\t\tURL resource = PropertyWatcher.class.getClassLoader().getResource(PROPERTIES_FILE);\n\t\t\tif (resource != null)\n\t\t\t{\n\t\t\t\tconfig = new File(resource.toURI());\n\t\t\t\tloadProperties(false);\n\n\t\t\t\t// Then check if there's another version in the external data directory\n\t\t\t\tString path = get(ServerProperty.CONFIG_PATH);\n\t\t\t\tif (!StringUtils.isEmpty(path))\n\t\t\t\t{\n\t\t\t\t\tFile potential = new File(path);\n\t\t\t\t\tif (potential.exists() && potential.isFile())\n\t\t\t\t\t{\n\t\t\t\t\t\t// Use it\n\t\t\t\t\t\tLogger.getLogger(\"\").log(Level.INFO, \"Using external config.properties: \" + potential.getAbsolutePath());\n\t\t\t\t\t\tconfig = potential;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Finally, load it properly. This is either the original file or the external file.\n\t\t\t\tloadProperties(true);\n\n\t\t\t\t// Then watch whichever file exists for changes\n\t\t\t\tFileAlterationObserver observer = new FileAlterationObserver(config.getParentFile());\n\t\t\t\tmonitor = new FileAlterationMonitor(1000L);\n\t\t\t\tobserver.addListener(new FileAlterationListenerAdaptor()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFileChange(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (file.equals(config))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tloadProperties(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tmonitor.addObserver(observer);\n\t\t\t\tmonitor.start();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@Test\r\n public void setRuntimePropertiesFileNameTest() {\r\n try {\r\n runtimeConfigDAOPropertiesFile.setRuntimePropertiesFilename(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n } catch (RuntimeConfigInitialisationException e) {\r\n Assert.fail(\"The file should have been created OK.\");\r\n }\r\n }", "public\n YutilProperties(String argv[])\n {\n super(new Properties());\n setPropertiesDefaults(argv);\n }", "public Config(File confDir, Properties props) throws IOException {\n FileInputStream input = new FileInputStream(new File(confDir, PROPERTIES_FILE));\n Properties p = new Properties();\n p.load(input);\n entries = new Properties(p); // Set the file values as defaults for our properties\n // Now copy in our passed in properties\n for (String key : props.stringPropertyNames()) entries.setProperty(key, props.getProperty(key));\n input.close();\n }", "private void loadProperties(){\n\t\tProperties properties = new Properties();\n\t\ttry{\n\t\t\tlog.info(\"-------------------------------------------------------------------\");\n\t\t\tlog.info(\"Updating config settings\");\n\n\t\t\tproperties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(\"config.properties\"));\n\t\t\tservletContext.setAttribute(\"properties\", properties);\n\t\t\t\n\t\t\tthis.cswURL=(String)properties.get(\"cswURL\");\n\t\t\tthis.proxyHost=(String)properties.get(\"proxyHost\");\n\t\t\tif(!this.proxyHost.equals(\"\") && this.proxyHost != null){\n\t\t\t\tthis.proxyPort=Integer.parseInt((String)properties.get(\"proxyPort\"));\n\t\t\t}\n\t\t\tthis.feedURL=(String)properties.get(\"feedURL\");\n\t\t\tthis.servicePath=(String)properties.get(\"servicePath\");\n\t\t\tthis.dataSetPath=(String)properties.get(\"dataSetPath\");\n\t\t\tthis.opensearchPath=(String)properties.get(\"opensearchPath\");\n\t\t\tthis.downloadUUIDs=(String)properties.get(\"serviceUUIDs\");\t\n\t\t\tthis.transOpt=(String)properties.get(\"transOpt\");\t\n\t\t\t\n\t\t }catch (Exception e){\n\t\t\t log.error(e.toString(), e.fillInStackTrace());\n\t\t\t System.out.println(\"Error: \" + e.getMessage());\n\t\t }\t\n\t }", "void loadProperties(File propertiesFile) throws IOException\n {\n // Load the properties.\n LOGGER.info(\"Loading properties from \\\"{}\\\" file...\", propertiesFile);\n try (InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(propertiesFile), \"UTF-8\"))\n {\n properties.load(inputStreamReader);\n }\n\n // Log all properties except for password.\n StringBuilder propertiesStringBuilder = new StringBuilder();\n for (Object key : properties.keySet())\n {\n String propertyName = key.toString();\n propertiesStringBuilder.append(propertyName).append('=')\n .append(HERD_PASSWORD_PROPERTY.equalsIgnoreCase(propertyName) ? \"***\" : properties.getProperty(propertyName)).append('\\n');\n }\n LOGGER.info(\"Successfully loaded properties:%n{}\", propertiesStringBuilder.toString());\n }", "private PropertiesUtils() {}", "private static void loadConfig()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal Properties props = ManagerServer.loadProperties(ManagerServer.class, \"/resources/conf.properties\");\n\t\t\tasteriskIP = props.getProperty(\"asteriskIP\");\n\t\t\tloginName = props.getProperty(\"userName\");\n\t\t\tloginPwd = props.getProperty(\"password\");\n\t\t\toutboundproxy = props.getProperty(\"outBoundProxy\");\n\t\t\tasteriskPort = Integer.parseInt(props.getProperty(\"asteriskPort\"));\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tLOG.error(\"IO Exception while reading the configuration file.\", ex);\n\t\t}\n\t}", "private synchronized void readProperties()\n {\n \n String workPath = \"webserver\";\n try\n {\n workPath = (String) SageTV.api(\"GetProperty\", new Object[]{\"nielm/webserver/root\",\"webserver\"});\n }\n catch (InvocationTargetException e)\n {\n System.out.println(e);\n }\n \n // check if called within 30 secs (to prevent to much FS access)\n if (fileLastReadTime + 30000 > System.currentTimeMillis())\n {\n return;\n }\n\n // check if file has recently been loaded\n File propsFile=new File(workPath,\"extenders.properties\");\n if (fileLastReadTime >= propsFile.lastModified())\n {\n return;\n }\n\n if (propsFile.canRead())\n {\n BufferedReader in = null;\n contextNames.clear();\n try\n {\n in = new BufferedReader(new FileReader(propsFile));\n String line;\n Pattern p = Pattern.compile(\"([^=]+[^=]*)=(.*)\");\n while (null != (line = in.readLine()))\n {\n line = line.trim();\n if ((line.length() > 0) && (line.charAt(0) != '#'))\n {\n Matcher m =p.matcher(line.trim());\n if (m.matches())\n {\n contextNames.put(m.group(1).trim(), m.group(2).trim());\n }\n else\n {\n System.out.println(\"Invalid line in \"+propsFile+\"\\\"\"+line+\"\\\"\");\n }\n }\n }\n fileLastReadTime=System.currentTimeMillis();\n\n }\n catch (IOException e)\n {\n System.out.println(\"Exception occurred trying to load properties file: \"+propsFile+\"-\" + e);\n }\n finally\n {\n if (in != null)\n {\n try\n {\n in.close();\n }\n catch (IOException e) {}\n }\n }\n } \n }", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\ttry {\n\t\t\tprops = PropertiesLoaderUtils.loadProperties(new ClassPathResource(\"/META-INF/build-info.properties\"));\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Unable to load build.properties\", e);\n\t\t\tprops = new Properties();\n\t\t}\n\t}", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "public void testConstructor_HasParameters_InvalidProperties()\n throws Exception {\n Properties p = new Properties();\n p.put(\"java.util.logging.StreamHandler.level\", INVALID_LEVEL);\n p.put(\"java.util.logging.StreamHandler.filter\", className + \"\");\n p.put(\"java.util.logging.StreamHandler.formatter\", className + \"\");\n p.put(\"java.util.logging.StreamHandler.encoding\", \"XXXX\");\n LogManager.getLogManager().readConfiguration(\n EnvironmentHelper.PropertiesToInputStream(p));\n\n assertEquals(INVALID_LEVEL, LogManager.getLogManager().getProperty(\n \"java.util.logging.StreamHandler.level\"));\n assertEquals(\"XXXX\", LogManager.getLogManager().getProperty(\n \"java.util.logging.StreamHandler.encoding\"));\n StreamHandler h = new StreamHandler(new ByteArrayOutputStream(),\n new MockFormatter2());\n assertSame(Level.INFO, h.getLevel());\n assertTrue(h.getFormatter() instanceof MockFormatter2);\n assertNull(h.getFilter());\n assertNull(h.getEncoding());\n }", "@Test\n public void testGetProperties() throws Exception {\n logger.info(\"testGetProperties: test the basic properties file interface\");\n\n // copy system properties\n logger.info(\"Copy system properties to a file\");\n Properties prop1 = System.getProperties();\n File file1 = createFile(\"createAndReadPropertyFile-1\", prop1);\n\n // read in properties, and compare\n logger.info(\"Read in properties from new file\");\n Properties prop2 = PropertyUtil.getProperties(file1);\n\n // they should match\n assertEquals(prop1, prop2);\n\n Properties prop3 = PropertyUtil.getProperties(INTERPOLATION_PROPERTIES);\n\n assertEquals(\"no\", prop3.getProperty(INTERPOLATION_NO));\n assertEquals(System.getenv(\"HOME\"), prop3.getProperty(INTERPOLATION_ENV));\n assertEquals(LoggerUtil.ROOT_LOGGER, prop3.getProperty(INTERPOLATION_CONST));\n assertEquals(System.getProperty(\"user.home\"), prop3.getProperty(INTERPOLATION_SYS));\n\n Properties prop4 = new Properties();\n prop4.put(INTERPOLATION_NO, \"no\");\n prop4.put(INTERPOLATION_ENV, \"${env:HOME}\");\n prop4.put(INTERPOLATION_CONST, \"${const:org.onap.policy.drools.utils.logging.LoggerUtil.ROOT_LOGGER}\");\n prop4.put(INTERPOLATION_SYS, \"${sys:user.home}\");\n\n PropertyUtil.setSystemProperties(prop4);\n\n assertEquals(\"no\", System.getProperty(INTERPOLATION_NO));\n assertEquals(System.getenv(\"HOME\"), System.getProperty(INTERPOLATION_ENV));\n assertEquals(LoggerUtil.ROOT_LOGGER, System.getProperty(INTERPOLATION_CONST));\n assertEquals(System.getProperty(\"user.home\"), System.getProperty(INTERPOLATION_SYS));\n }", "public static void loadProperties() {\r\n\t\tif (!isLoaded) {\r\n\t\t\tnew BCProperties() ;\r\n\t\t\tisLoaded = true ;\r\n\t\t}\r\n\t}", "public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}" ]
[ "0.78458035", "0.6710335", "0.66606206", "0.6607473", "0.6512257", "0.6395176", "0.63172454", "0.6315147", "0.6244328", "0.62427783", "0.61778325", "0.61511844", "0.6122639", "0.60819995", "0.6070628", "0.60671824", "0.6066898", "0.60551107", "0.60471404", "0.60180336", "0.6014999", "0.60029954", "0.59942895", "0.5988102", "0.5980238", "0.59698385", "0.5968707", "0.5968406", "0.5954137", "0.5947515", "0.593244", "0.59301764", "0.5915912", "0.59126234", "0.58990926", "0.5894873", "0.58792406", "0.58787286", "0.5867347", "0.5853611", "0.5852052", "0.5849241", "0.5837175", "0.5829188", "0.58029336", "0.5777353", "0.57724524", "0.5757969", "0.5750076", "0.5749249", "0.57483464", "0.5740666", "0.5731226", "0.5730235", "0.57122105", "0.5707577", "0.5701111", "0.5683854", "0.5681705", "0.5675068", "0.5673221", "0.5670562", "0.5667788", "0.5666952", "0.56451887", "0.56443924", "0.5640379", "0.56330276", "0.56319416", "0.5631247", "0.56166303", "0.5614639", "0.56121206", "0.5606932", "0.5600293", "0.5598269", "0.55979544", "0.5594138", "0.5591934", "0.5591734", "0.5586843", "0.5563966", "0.55581933", "0.55446297", "0.55362386", "0.5534487", "0.5528895", "0.5522546", "0.552229", "0.55099213", "0.54974794", "0.5484168", "0.5478564", "0.5476336", "0.54744476", "0.5464485", "0.54610825", "0.54592776", "0.5456292", "0.5451745", "0.5444353" ]
0.0
-1
Creates a new ServerProperties instance using values from the provided properties file. Prints an error to the console if problems occur on loading.
public DataInputClientProperties(String propertiesFilename) throws IOException { if (propertiesFilename == null) { initializeProperties(); } else { initializeProperties(propertiesFilename); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServerProperties() {\n try {\n initializeProperties();\n }\n catch (Exception e) {\n System.out.println(\"Error initializing server properties.\");\n }\n }", "public Server(String propertiesFile) throws IOException\n {\n Properties properties = new Properties();\n FileInputStream input = new FileInputStream(propertiesFile);\n properties.load(input);\n port = Integer.parseInt(properties.getProperty(\"port\"));\n socket = new ServerSocket(port);\n System.out.println(\"Server ready for client\");\n while(true)\n {\n new ServerConnection(socket.accept()).start();\n }\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "@Test\n public void testCreateFromProperties_Properties() throws Exception {\n System.out.println(\"createFromProperties\");\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n EngineConfiguration result = EngineConfiguration.createFromProperties(props);\n assertProperties(result);\n }", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "private void initializeProperties(String propertiesFilename) throws IOException {\n this.properties = new Properties();\n\n // Set defaults for 'standard' operation.\n // properties.setProperty(FILENAME_KEY, clientHome + \"/bmo-data.tsv\");\n properties.setProperty(BMO_URI_KEY,\n \"http://www.buildingmanageronline.com/members/mbdev_export.php/download.txt\");\n\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propertiesFilename);\n properties.load(stream);\n System.out.println(\"Loading data input client properties from: \" + propertiesFilename);\n }\n catch (IOException e) {\n System.out.println(propertiesFilename\n + \" not found. Using default data input client properties.\");\n throw e;\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n trimProperties(properties);\n }", "PropertiesTask setProperties( File propertiesFile );", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "void setPropertiesFile(File file);", "private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }", "private void init(String propFilePath) {\n properties = new Properties();\n try {\n properties.load(new FileInputStream(new File(propFilePath)));\n } catch (FileNotFoundException e1) {\n logger.error(\"External properties file not found!\", e1);\n System.exit(1);\n } catch (IOException e2) {\n logger.error(\"Error while reading External properties file!\", e2);\n System.exit(1);\n }\n }", "public void setPropertiesFile(File propertiesFile) {\n this.propertiesFile = propertiesFile;\n }", "public void echoProperties(Server server) {\n String cr = System.getProperty(\"line.separator\"); \n String eq = \" = \";\n String pad = \" \";\n String propertyInfo = \"SensorBase Properties:\" + cr +\n pad + ADMIN_EMAIL_KEY + eq + get(ADMIN_EMAIL_KEY) + cr +\n pad + ADMIN_PASSWORD_KEY + eq + get(ADMIN_PASSWORD_KEY) + cr +\n pad + HOSTNAME_KEY + eq + get(HOSTNAME_KEY) + cr +\n pad + CONTEXT_ROOT_KEY + eq + get(CONTEXT_ROOT_KEY) + cr +\n pad + DB_DIR_KEY + eq + get(DB_DIR_KEY) + cr +\n pad + DB_IMPL_KEY + eq + get(DB_IMPL_KEY) + cr +\n pad + LOGGING_LEVEL_KEY + eq + get(LOGGING_LEVEL_KEY) + cr +\n pad + SMTP_HOST_KEY + eq + get(SMTP_HOST_KEY) + cr +\n pad + PORT_KEY + eq + get(PORT_KEY) + cr +\n pad + TEST_INSTALL_KEY + eq + get(TEST_INSTALL_KEY) + cr + \n pad + XML_DIR_KEY + eq + get(XML_DIR_KEY);\n server.getLogger().info(propertyInfo);\n }", "public void init(Properties properties) throws IOException;", "public static Properties parsePropertiesFile(File propertiesFile) {\n\t\tProperties clientProperties = new Properties();\n\t\tFileInputStream in;\n\t\ttry {\n\t\t\tin = new FileInputStream(propertiesFile);\n\t\t\tclientProperties.load(in);\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn clientProperties;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn clientProperties;\n\t\t}\n\t\treturn clientProperties;\n\t}", "protected Properties loadClientProperties(String filename) throws Exception {\n InputStream is = null;\n try {\n Properties props = new Properties();\n\n // Open the properties file specified by the user.\n File f = new File(filename);\n if (f.exists()) {\n is = new FileInputStream(f);\n } else {\n throw new FileNotFoundException(\"Properties file '\" + filename + \"' not found.\");\n }\n\n // Load the properties.\n props.load(is);\n is.close();\n\n return props;\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "@Test\r\n\t\tpublic static void Properties() \r\n\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tprop = new Properties();\r\n\t\t\t\tfile = new File(\"C:\\\\Users\\\\vardhan\\\\eclipse-workspace\\\\com.makemytrip\\\\prop.properties\");\r\n\t\t\t\tfilereader = new FileReader(file);\r\n\t\t\t\tprop.load(filereader);\r\n\t\t\t\t\r\n\t\t\t }\r\n\t\t\r\n\t\t\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}", "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "void loadProperties(File propertiesFile) throws IOException\n {\n // Load the properties.\n LOGGER.info(\"Loading properties from \\\"{}\\\" file...\", propertiesFile);\n try (InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(propertiesFile), \"UTF-8\"))\n {\n properties.load(inputStreamReader);\n }\n\n // Log all properties except for password.\n StringBuilder propertiesStringBuilder = new StringBuilder();\n for (Object key : properties.keySet())\n {\n String propertyName = key.toString();\n propertiesStringBuilder.append(propertyName).append('=')\n .append(HERD_PASSWORD_PROPERTY.equalsIgnoreCase(propertyName) ? \"***\" : properties.getProperty(propertyName)).append('\\n');\n }\n LOGGER.info(\"Successfully loaded properties:%n{}\", propertiesStringBuilder.toString());\n }", "private void createPropertiesFile(final File configFile) throws IOException {\n if (configFile.createNewFile()) {\n FileWriter writer = new FileWriter(configFile);\n writer.append(\"ch.hslu.vsk.server.port=1337\\n\");\n writer.append(\"ch.hslu.vsk.server.logfile=\");\n writer.flush();\n writer.close();\n }\n }", "private void loadPropertiesFromFile(String propertiesFileName) {\t\t\n\t\tif ( (propertiesFileName != null) && !(propertiesFileName.isEmpty()) ) {\n\t\t\tpropertiesFileName = config_file_name;\n\t \t\ttry {\n\t \t\t\t// FileInputStream lFis = new FileInputStream(config_file_name);\n\t \t\t\t// FileInputStream lFis = getServletContext().getResourceAsStream(config_file_name);\n\t \t\t\tInputStream lFis = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"config.properties\");\n\t \t\t\tif (lFis != null) {\n\t\t \t\t\tProperties lConnectionProps = new Properties();\n\t\t \t\t\tlConnectionProps.load(lFis);\n\t\t \t\t\tlFis.close();\n\t\t \t\t\tlLogger.info(DEBUG_PREFIX + \"Using configuration file \" + config_file_name);\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceNname\") != null) ssosvc_name = lConnectionProps.getProperty(\"SsoServiceNname\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceLabel\") != null) ssosvc_label = lConnectionProps.getProperty(\"SsoServiceLabel\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServicePlan\") != null) ssosvc_plan = lConnectionProps.getProperty(\"SsoServicePlan\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_clientId = lConnectionProps.getProperty(\"SsoServiceCredential_clientId\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_secret = lConnectionProps.getProperty(\"SsoServiceCredential_secret\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_serverSupportedScope = lConnectionProps.getProperty(\"SsoServiceCredential_serverSupportedScope\");\n\t\t\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n\t\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n\t\t\t if (seperators != null) {\n\t\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n\t\t\t\t scopeMatcher.find();\n\t\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n\t\t\t\t lLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n\t\t\t }\n\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_issuerIdentifier = lConnectionProps.getProperty(\"SsoServiceCredential_issuerIdentifier\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_tokenEndpointUrl = lConnectionProps.getProperty(\"SsoServiceCredential_tokenEndpointUrl\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_authorizationEndpointUrl = lConnectionProps.getProperty(\"SsoServiceCredential_authorizationEndpointUrl\");\n\t\n\t\t \t\t\tlLogger.info(DEBUG_PREFIX + \"Using config for SSO Service with name \" + ssosvc_name);\n\t \t\t\t} else {\n\t \t\t\t\tlLogger.severe(DEBUG_PREFIX + \"Configuration file not found! Using default settings.\");\n\t \t\t\t}\n\n\t \t\t} catch (FileNotFoundException e) {\n\t \t\t\tlLogger.severe(DEBUG_PREFIX + \"Configuration file = \" + config_file_name + \" not found! Using default settings.\");\n\t \t\t\te.printStackTrace();\n\t \t\t} catch (IOException e) {\n\t \t\t\tlLogger.severe(\"SF-DEBUG: Configuration file = \" + config_file_name + \" not readable! Using default settings.\");\n\t \t\t\te.printStackTrace();\n\t \t\t}\n\t \t} else {\n\t \t\tlLogger.info(DEBUG_PREFIX + \"Configuration file = \" + config_file_name + \" not found! Using default settings.\");\n\t \t}\n\t}", "public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }", "private static synchronized void setProperties(\n final String strPropertiesFilename) {\n if (msbPropertiesLoaded) {\n Verbose.warning(\"Properties already loaded; ignoring request\");\n\n return;\n }\n\n File oFile = new File(strPropertiesFilename);\n\n if (!oFile.exists()) {\n // Try to get it from jar file\n ClassLoader classLoader = Thread.currentThread()\n .getContextClassLoader();\n final InputStream input;\n\n if (classLoader == null) {\n classLoader = Class.class.getClassLoader();\n }\n input = classLoader\n .getResourceAsStream('/' + strPropertiesFilename);\n PropertyDef.setProperties(input, null);\n } else {\n PropertyDef.setProperties(new File(strPropertiesFilename), null,\n false);\n }\n if (strPropertiesFilename == DEFAULT_PROPERTIES_FILENAME) {\n oFile = new File(CUSTOMER_PROPERTIES_FILENAME);\n if (oFile.exists() && oFile.isFile()) {\n PropertyDef.addProperties(oFile);\n }\n }\n AdaptiveReplicationTool.msbPropertiesLoaded = true;\n }", "public static void init(String propfile) throws Exception\r\n\t{\r\n\t\tinit(propfile, \"Properties\", new String[0]);\r\n\t}", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "public PropertiesUtil() {\n\t\t// Read properties file.\n\n\t\tproperties = new Properties();\n\t\ttry {\n\t\t\tproperties.load(PropertiesUtil.class.getClassLoader().getResourceAsStream(\"variables.properties\"));\n\t\t\tlog.info(\"variables.properties file loaded successfully\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"variables.properties file not found: \", e);\n\t\t}\n\t}", "private static void checkServerProperties() throws IOException {\r\n\r\n Properties serverProperties = new Properties();\r\n FileInputStream input = new FileInputStream(SERVER_PROPERTIES_PATH);\r\n serverProperties.load(input);\r\n port = Integer.valueOf(serverProperties.getProperty(\"server.port\"));\r\n String adminLogin = serverProperties.getProperty(\"admin.login\");\r\n String adminPassword = serverProperties.getProperty(\"admin.password\");\r\n\r\n User admin = MongoDB.get(User.class, adminLogin);\r\n if (admin == null) {\r\n admin = new User(adminLogin, adminPassword, \"Administrator\",\r\n \"[email protected]\", false, false);\r\n MongoDB.store(admin);\r\n System.out.println(\"Created default admin user.\");\r\n }\r\n\r\n if (!admin.checkPassword(adminPassword)) {\r\n MongoDB.delete(User.class, adminLogin);\r\n admin = new User(adminLogin, adminPassword, \"Administrator\",\r\n \"[email protected]\", false, false);\r\n MongoDB.store(admin);\r\n System.out.println(\"Assigned a new admin password.\");\r\n }\r\n }", "private void loadProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Loading Properties from {}\", path.toString());\n try {\n FileInputStream fis = new FileInputStream(getSamplePropertiesPath().toFile());\n Properties properties = new Properties();\n properties.load(fis);\n\n String privateKey = properties.getProperty(PRIVATE_KEY);\n this.credentials = Credentials.create(privateKey);\n this.contract1Address = properties.getProperty(CONTRACT1_ADDRESS);\n this.contract2Address = properties.getProperty(CONTRACT2_ADDRESS);\n this.contract3Address = properties.getProperty(CONTRACT3_ADDRESS);\n this.contract4Address = properties.getProperty(CONTRACT4_ADDRESS);\n this.contract5Address = properties.getProperty(CONTRACT5_ADDRESS);\n this.contract6Address = properties.getProperty(CONTRACT6_ADDRESS);\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "public static Properties getProperties(String filename)\r\n/* 13: */ {\r\n/* 14:26 */ Properties properties = new Properties();\r\n/* 15: */ try\r\n/* 16: */ {\r\n/* 17:29 */ properties.load(new FileInputStream(System.getProperty(\"user.dir\") + \"/properties/\" + filename));\r\n/* 18: */ }\r\n/* 19: */ catch (IOException ex)\r\n/* 20: */ {\r\n/* 21:31 */ logger.error(\"Can't load properties file: \" + filename, ex);\r\n/* 22: */ }\r\n/* 23:33 */ return properties;\r\n/* 24: */ }", "public FileServicePropertiesProperties() {\n }", "public final Properties init() throws FileNotFoundException, IOException{\n /*\n Your properties file must be in the deployed .war file in WEB-INF/classes/tokens. It is there automatically\n if you have it in Source Packages/java/tokens when you build. That is how this will read it in without defining a root location\n https://stackoverflow.com/questions/2395737/java-relative-path-of-a-file-in-a-java-web-application\n */\n String fileLoc =TinyTokenManager.class.getResource(Constant.PROPERTIES_FILE_NAME).toString();\n fileLoc = fileLoc.replace(\"file:\", \"\");\n setFileLocation(fileLoc);\n InputStream input = new FileInputStream(propFileLocation);\n props.load(input);\n input.close();\n currentAccessToken = props.getProperty(\"access_token\");\n currentRefreshToken = props.getProperty(\"refresh_token\");\n currentS3AccessID = props.getProperty(\"s3_access_id\");\n currentS3Secret = props.getProperty(\"s3_secret\");\n currentS3BucketName = props.getProperty(\"s3_bucket_name\");\n currentS3Region = Region.US_WEST_2;\n apiSetting = props.getProperty(\"open_api_cors\");\n return props;\n }", "public static Properties loadProperties(final String filename) throws IllegalArgumentException {\n final File file = new File(filename);\n final Properties properties = new Properties();\n try {\n properties.load(new FileInputStream(file));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(\"File not found: \" + file, ex);\n } catch (IOException ex) {\n throw new IllegalArgumentException(\"Unable to load properties: \" + file, ex);\n }\n return properties;\n }", "private static Properties loadProperties() {\n Properties properties;\n try (InputStream in = FHIRServerProperties.class.getClassLoader().getResourceAsStream(HAPI_PROPERTIES)) {\n properties = new Properties();\n properties.load(in);\n } catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties\", e);\n }\n\n Properties overrideProps = loadOverrideProperties();\n if (overrideProps != null) {\n properties.putAll(overrideProps);\n }\n return properties;\n }", "public DetectionProperties() throws Exception {\n super(DetectionProperties.class.getResourceAsStream(PROPERTIES_FILE_NAME));\n }", "public PropertiesPlus(File propertiesFile) throws IOException\n\t{\n\t\tsuper();\n\t\tpropertyFile = propertiesFile; \n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tdateFormatGMT_MS.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tload(new FileReader(propertiesFile));\n\t}", "public void setupProp() {\r\n\t\tprop = new Properties();\r\n\t\tInputStream in = getClass().getResourceAsStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(in);\r\n\t\t\tFileInputStream fin = new FileInputStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(fin);\r\n\t\t\tdblogic = (PatronDBLogic) ois.readObject();\r\n\t\t\tois.close();\r\n\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public FamilyTreeServer(Properties props) {\n\t\tlogger.debug(\"creating from properties [\" + props + \"]\");\n\t\tConfigurationSource source = new ConfigurationSource() {\n\t\t\t@Override\n\t\t\tpublic Properties properties() {\n\t\t\t\treturn props;\n\t\t\t}\n\t\t};\n\t\tcreateSession(source);\n\t}", "@SneakyThrows\n public ApplicationProperties(final String propertiesFilePath) {\n this.properties = new Properties();\n this.properties.load(new FileInputStream(propertiesFilePath));\n }", "private ConfigProperties parsePropertiesFile(final String propertiesFile) {\n properties = ConfigFactory.getInstance().getConfigPropertiesFromAbsolutePath(propertiesFile);\n return properties;\n }", "public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STANDARD_PROPERTY_FILE;\r\n\r\n\t\tif (System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE) != null\r\n\t\t\t\t&& System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE)\r\n\t\t\t\t\t\t.length() != 0) {\r\n\t\t\tfile = System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE);\r\n\t\t}\r\n\r\n\t\t// load property file\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.load(ClassLoader.getSystemResourceAsStream(file));\r\n\t\t\tSystem.setProperties(props);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t}\r\n\r\n\t}", "private void loadPropertyFile(InputStream stream) throws IOException{\n\t\tproperties = new Properties();\n\t\tproperties.load(stream);\n\t}", "public static void loadProperties() {\n properties = new Properties();\n try {\n File f = new File(\"system.properties\");\n if (!(f.exists())) {\n OutputStream out = new FileOutputStream(f);\n }\n InputStream is = new FileInputStream(f);\n properties.load(is);\n lastDir = getLastDir();\n if (lastDir == null) {\n lastDir = \"~\";\n setLastDir(lastDir);\n }\n properties.setProperty(\"lastdir\", lastDir);\n\n // Try loading properties from the file (if found)\n properties.load(is);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void storePropsFile() {\n try {\n FileOutputStream fos = new FileOutputStream(propertyFile);\n props.store(fos, null);\n fos.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "public static Properties loadProperties(String file) throws Exception {\n Properties props = new Properties();\n props.load(new FileInputStream(file));\n\n return props;\n }", "void configure(Properties properties);", "public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public void setPropertiesFile(org.openejb.config.sys.PropertiesFile propertiesFile) {\n this._propertiesFile = propertiesFile;\n }", "public void SetPropertiesGenerateServer(java.lang.String s) {\r\n java.lang.String thred = ThredProperties();\r\n Properties prop = new Properties();\r\n\r\n try (FileOutputStream out = new FileOutputStream(\"./config.properties\")) {\r\n\r\n switch (s) {\r\n case \"SimpleMazeGenerator\": {\r\n System.out.println(\"ggg\");\r\n prop.setProperty(\"algorithm\", solve);\r\n prop.setProperty(\"generate\", \"SimpleMazeGenerator\");\r\n generate=\"SimpleMazeGenerator\";\r\n prop.setProperty(\"threadNum\", thred);\r\n prop.store(out, null);\r\n break;\r\n }\r\n case \"MyMazeGenerator\": {\r\n prop.setProperty(\"algorithm\", solve);\r\n prop.setProperty(\"generate\", \"MyMazeGenerator\");\r\n generate=\"MyMazeGenerator\";\r\n prop.setProperty(\"threadNum\", thred);\r\n prop.store(out, null);\r\n break;\r\n }\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void loadProperties(){\n\t\tProperties properties = new Properties();\n\t\ttry{\n\t\t\tlog.info(\"-------------------------------------------------------------------\");\n\t\t\tlog.info(\"Updating config settings\");\n\n\t\t\tproperties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(\"config.properties\"));\n\t\t\tservletContext.setAttribute(\"properties\", properties);\n\t\t\t\n\t\t\tthis.cswURL=(String)properties.get(\"cswURL\");\n\t\t\tthis.proxyHost=(String)properties.get(\"proxyHost\");\n\t\t\tif(!this.proxyHost.equals(\"\") && this.proxyHost != null){\n\t\t\t\tthis.proxyPort=Integer.parseInt((String)properties.get(\"proxyPort\"));\n\t\t\t}\n\t\t\tthis.feedURL=(String)properties.get(\"feedURL\");\n\t\t\tthis.servicePath=(String)properties.get(\"servicePath\");\n\t\t\tthis.dataSetPath=(String)properties.get(\"dataSetPath\");\n\t\t\tthis.opensearchPath=(String)properties.get(\"opensearchPath\");\n\t\t\tthis.downloadUUIDs=(String)properties.get(\"serviceUUIDs\");\t\n\t\t\tthis.transOpt=(String)properties.get(\"transOpt\");\t\n\t\t\t\n\t\t }catch (Exception e){\n\t\t\t log.error(e.toString(), e.fillInStackTrace());\n\t\t\t System.out.println(\"Error: \" + e.getMessage());\n\t\t }\t\n\t }", "public TestProperties() {\n\t\tthis.testProperties = new Properties();\n\t}", "public\n YutilProperties()\n {\n super(new Properties());\n }", "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}", "public void loadProperties() throws IOException\n\t{\n\t\tFile src = new File(\"D://Selenium Stuff//Selenium Workspace//OpenCartL2_28112017//ObjectRepo.properties\");\n\t\tFileInputStream fis = new FileInputStream(src);\n\t\tpro = new Properties();\n\t\tpro.load(fis);\n\t}", "private Properties loadPropertiesFile(String file) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(file);\n\t\t\tif (fis != null) {\n\t\t\t\tProperties props = new Properties();\n\t\t\t\tprops.load(fis);\n\t\t\t\treturn props;\n\t\t\t}\n\t\t\tSystem.err.println(\"Cannot load \" + file\n\t\t\t\t\t+ \" , file input stream object is null\");\n\t\t} catch (java.io.IOException ioe) {\n\t\t\tSystem.err.println(\"Cannot load \" + file + \", error reading file\");\n\t\t}\n\t\treturn null;\n\t}", "public HistogramConfiguration loadProperties(String propertyFileName)\n {\n HistogramConfiguration histConfig = HistogramConfiguration.getInstance();\n\n try(FileInputStream inputStream = new FileInputStream(propertyFileName))\n {\n properties.load(inputStream);\n\n histConfig.setShouldIgnoreWhiteSpaces(loadShouldIgnoreWhiteSpace());\n histConfig.setIgnoreCharacters(loadIgnoredCharactersProperties());\n\n }catch (IOException e)\n {\n e.printStackTrace();\n }\n\n return histConfig;\n }", "public Config(File confDir, Properties props) throws IOException {\n FileInputStream input = new FileInputStream(new File(confDir, PROPERTIES_FILE));\n Properties p = new Properties();\n p.load(input);\n entries = new Properties(p); // Set the file values as defaults for our properties\n // Now copy in our passed in properties\n for (String key : props.stringPropertyNames()) entries.setProperty(key, props.getProperty(key));\n input.close();\n }", "private Properties loadProperties(String fileName){\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinput = new FileInputStream(fileName);\r\n\t\t\tprop.load(input);\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prop;\t \r\n\t}", "public static Properties loadProperties(String filePath)\n {\n \tProperties listProperties = new Properties();\n\t\t//System.out.println(filePath);\n\n\t\tFileInputStream file = null;\n\t\ttry \n\t\t{\n\t\t\tfile = new FileInputStream(filePath);\n\t\t\t\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\t listProperties.load(file);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listProperties;\n }", "public Properties loadProps(String propFile) {\n Properties props = new Properties();\n BufferedReader f;\n try {\n f = new BufferedReader(new FileReader(propFile));\n } catch (FileNotFoundException e) {\n return null;\n }\n try {\n props.load(f);\n } catch (IOException e) {\n System.err.println(\"IO EXception in loadProps in EvalModels class\");\n }\n System.out.println(props.toString());\n return props;\n }", "public void setProperties(java.util.Map<String,String> properties) {\n this.properties = properties;\n }", "public void registerProperty(File propertiesFile, String key, String value) {\n\t\tSystem.out.println(\"enter method registerProperty(\" + \"File propertiesFile, String key, String value)\");\n\t\tPropertiesConfiguration propertiesConfiguration = null;\n\t\ttry {\n\t\t\tpropertiesConfiguration = new PropertiesConfiguration(propertiesFile);\n\t\t\tpropertiesConfiguration.setProperty(key, value);\n\t\t\tpropertiesConfiguration.save();\n\n\t\t} catch (ConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadProperties(){\n try {\n input = new FileInputStream(fileName);\n properties.load(input);\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO LOAD GAME ---\");\n e.printStackTrace();\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE INTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }", "private void loadProperties() {\n\t\t\n\t\tString fldr = env.getProperty(\"response.folder\");\n\t\tthis.repo.setRootFolder( new File(fldr));;\n\t\t\n\t\tint nthConfigItem = 1;\n\t\twhile(true) {\n\t\t\tString seq = (\"\"+nthConfigItem++).trim();\n\t\t\t\n\t\t\tString xpathPropName = \"request.\" + seq + \".xpath\";\n\t\t\tString responseTextFilePropName = \"request.\" + seq + \".response.file\";\n\t\t\tString xpath = env.getProperty(xpathPropName);\n\t\t\tString responseTextFileName = env.getProperty(responseTextFilePropName);\n\t\t\tif (xpath!=null && !\"\".equals(xpath.trim())\n\t\t\t\t&& responseTextFileName!=null & !\"\".equals(responseTextFileName.trim())\t) {\n\t\t\t\t\n\t\t\t\trepo.addFile(xpath, responseTextFileName);\n\t\t\t\tController.logAlways(\"Loading config item [\" + seq + \"] xpath: [\" + rpad(xpath, 60) + \"] data file: [\" + rpad(responseTextFileName,25) + \"]\" );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tController.logAlways(\"End of littleMock initialization. No more properties from application.properties will be loaded because either [\" + xpathPropName + \"] or [\" + responseTextFilePropName + \"] was not found in application.properties.\");\n\t\t\t\t//parameters in application.properties must be\n\t\t\t\t//in sequential order, starting at 1.\n\t\t\t\t//When we discover the first missing one, stop looking for more.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\thumanReadableConfig = PlaybackRepository.SINGLETON.humanReadable();\n\t}", "public void loadPropertyFile(String filename) {\n try (InputStream is = new FileInputStream(filename)) {\n properties.load(is);\n } catch (IOException x) {\n throw new IllegalArgumentException(x);\n }\n }", "@PostConstruct\n\tpublic void loadProperties() {\n\t\tproperties.put(PropertyKey.TRANSLATION_FILE_STORE, \"C:\\\\development\\\\projects\\\\mega-translator\\\\store\");\n\t}", "private void loadProperties() {\n\t\tInputStream propsFile;\n\t\tProperties tempProp = new Properties();\n\n\t\ttry {\n\t\t\t//propsFile = new FileInputStream(\"plugins\\\\balloonplugin\\\\BalloonSegmentation.properties\");\n\t\t\tpropsFile = getClass().getResourceAsStream(\"/BalloonSegmentation.properties\");\n\t\t\ttempProp.load(propsFile);\n\t\t\tpropsFile.close();\n\n\t\t\t// load properties\n\t\t\tinit_channel = Integer.parseInt(tempProp.getProperty(\"init_channel\"));\t\t\t\t// initial channel selected for segmenting the cell architecture 1 - red, 2 - green, 3 - blue\n\t\t\tinit_max_pixel = Integer.parseInt(tempProp.getProperty(\"init_max_pixel\"));\t\t\t// initial max pixel intensity used for finding the doundaries of the colony of cells\n\t\t\tinit_HL = Integer.parseInt(tempProp.getProperty(\"init_HL\"));\t\t\t\t\t\t// initial H*L factor used finding seeds in the population\n\t\t\tinit_min_I = Integer.parseInt(tempProp.getProperty(\"init_min_I\"));\t\t\t\t\t// initial pixel intensity when balloon algorithm starts\n\t\t\tinit_max_I = Integer.parseInt(tempProp.getProperty(\"init_max_I\"));\t\t\t\t\t// final pixel intensity when balloon algorithm stops\n\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tIJ.error(\"I/O Exception: cannot read .properties file\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tpublic static CfgSingletonfactory getpropertiesfromFile() {\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private synchronized void readProperties()\n {\n \n String workPath = \"webserver\";\n try\n {\n workPath = (String) SageTV.api(\"GetProperty\", new Object[]{\"nielm/webserver/root\",\"webserver\"});\n }\n catch (InvocationTargetException e)\n {\n System.out.println(e);\n }\n \n // check if called within 30 secs (to prevent to much FS access)\n if (fileLastReadTime + 30000 > System.currentTimeMillis())\n {\n return;\n }\n\n // check if file has recently been loaded\n File propsFile=new File(workPath,\"extenders.properties\");\n if (fileLastReadTime >= propsFile.lastModified())\n {\n return;\n }\n\n if (propsFile.canRead())\n {\n BufferedReader in = null;\n contextNames.clear();\n try\n {\n in = new BufferedReader(new FileReader(propsFile));\n String line;\n Pattern p = Pattern.compile(\"([^=]+[^=]*)=(.*)\");\n while (null != (line = in.readLine()))\n {\n line = line.trim();\n if ((line.length() > 0) && (line.charAt(0) != '#'))\n {\n Matcher m =p.matcher(line.trim());\n if (m.matches())\n {\n contextNames.put(m.group(1).trim(), m.group(2).trim());\n }\n else\n {\n System.out.println(\"Invalid line in \"+propsFile+\"\\\"\"+line+\"\\\"\");\n }\n }\n }\n fileLastReadTime=System.currentTimeMillis();\n\n }\n catch (IOException e)\n {\n System.out.println(\"Exception occurred trying to load properties file: \"+propsFile+\"-\" + e);\n }\n finally\n {\n if (in != null)\n {\n try\n {\n in.close();\n }\n catch (IOException e) {}\n }\n }\n } \n }", "private void initializeProperties () throws Exception {\n String userHome = System.getProperty(\"user.home\");\n String userDir = System.getProperty(\"user.dir\");\n String hackyHome = userHome + \"/.hackystat\";\n String sensorBaseHome = hackyHome + \"/sensorbase\"; \n String propFile = userHome + \"/.hackystat/sensorbase/sensorbase.properties\";\n this.properties = new Properties();\n // Set defaults\n properties.setProperty(ADMIN_EMAIL_KEY, \"[email protected]\");\n properties.setProperty(ADMIN_PASSWORD_KEY, \"[email protected]\");\n properties.setProperty(CONTEXT_ROOT_KEY, \"sensorbase\");\n properties.setProperty(DB_DIR_KEY, sensorBaseHome + \"/db\");\n properties.setProperty(DB_IMPL_KEY, \"org.hackystat.sensorbase.db.derby.DerbyImplementation\");\n properties.setProperty(HOSTNAME_KEY, \"localhost\");\n properties.setProperty(LOGGING_LEVEL_KEY, \"INFO\");\n properties.setProperty(SMTP_HOST_KEY, \"mail.hawaii.edu\");\n properties.setProperty(PORT_KEY, \"9876\");\n properties.setProperty(XML_DIR_KEY, userDir + \"/xml\");\n properties.setProperty(TEST_INSTALL_KEY, \"false\");\n properties.setProperty(TEST_DOMAIN_KEY, \"hackystat.org\");\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propFile);\n properties.load(stream);\n System.out.println(\"Loading SensorBase properties from: \" + propFile);\n }\n catch (IOException e) {\n System.out.println(propFile + \" not found. Using default sensorbase properties.\");\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n // Now add to System properties. Since the Mailer class expects to find this stuff on the \n // System Properties, we will add everything to it. In general, however, clients should not\n // use the System Properties to get at these values, since that precludes running several\n // SensorBases in a single JVM. And just is generally bogus. \n Properties systemProperties = System.getProperties();\n systemProperties.putAll(properties);\n System.setProperties(systemProperties);\n }", "public static Properties load(String propsFile)\n {\n \tProperties props = new Properties();\n FileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(propsFile));\n\t\t\tprops.load(fis); \n\t\t fis.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n return props;\n }", "public Config(Properties props) {\n entries = (Properties)props.clone();\n }", "public static void init() throws Exception\r\n\t{\r\n\t\tinit(PROPERTY_FILE, \"Properties\", new String[0]);\r\n\t}", "public static void loadProperties(Properties p, String fileName)throws IOException {\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n URL f = classLoader.getResource(fileName);\n FileInputStream fr = new FileInputStream(new File(fileName));\n p.load(fr);\n fr.close();\n }", "public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}", "File getPropertiesFile();", "@BeforeSuite\n\tpublic void propertiesFileReader(){\n\t\tif(prop == null){\t\t\t\n\t\t\tprop = new Properties();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"qa\")){ prop.load(new\n\t\t\t\t * FileInputStream(qaProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"stage\")){ prop.load(new\n\t\t\t\t * FileInputStream(stagProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"prod\")){ prop.load(new\n\t\t\t\t * FileInputStream(prodProperty)); }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"qa\")) \n\t\t\t\t\tFileUtils.copyFile(new File(qaProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"stage\"))\n\t\t\t\t\tFileUtils.copyFile(new File(stagProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"prod\"))\n\t\t\t\t\tFileUtils.copyFile(new File(prodProperty), new File(defaultProperty));\n\t\t\t\t\n\t\t\t\tprop.load(new FileInputStream(defaultProperty));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"user + pass [\"+prop.getProperty(\"username\")+\"===\"+prop.getProperty(\"password\"));\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void init()\n {\n try\n {\n userPasswordsProperties = new Properties();\n userPasswordsProperties.load(new FileInputStream(userPasswordsPropertiesFileName));\n log.info(\"Successfully initialized. UsersPasswords property file is: \" + userPasswordsPropertiesFileName);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"UserNamesPropertyFile name: \" + userPasswordsPropertiesFileName + \" not valid. Error: \" + e);\n }\n \n }", "public PSBeanProperties()\n {\n loadProperties();\n }", "private AuditYamlConfigurationLoader(Properties properties)\n {\n this.properties = new Properties(properties);\n }", "public static void readProperties(String propFilename){\n\t\tString propertiesFilename = propFilename;\n\t\tProperties properties = new Properties();\n\n\t\tFileInputStream in;\n\t\ttry {\n\t\t\tin = new FileInputStream(propertiesFilename);\n\t\t\tproperties.load(in);\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading properties \"+propertiesFilename);\n\t\t\tSystem.exit(1);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tString path=\"Not set\";\n\t\tint popSize=0;\n\t\tint features=0;\n\t\tint maxGenerations=0;\n\t\tboolean log=false;\n\t\tboolean debug=false;\n\t\tboolean printbest=false;\n\t\tboolean cwd=false;\n\t\tboolean arrcache=false;\n\t\tdouble addSubRangeH;\n\t\tdouble divMultRangeH;\n\t\tdouble randomThicknessRange;\n\t\tdouble randomVelocityRange;\n\n\t\tdouble addSubRangeVS;\n\t\tdouble divMultRangeVS;\n\n\t\tint zThreshold=0;\n\t\tboolean useThreshold = true;\n\n\tif(properties.containsKey(\"path\")){\n\t\tpath = ((String)properties.get(\"path\"));\n\t\tif(properties.containsKey(\"cwd\")){\n\t\t\tcwd = Boolean.parseBoolean((String)properties.get(\"cwd\"));\n\t\t}\n\t\tc.path=path;\n\t\tc.setPaths(cwd);\n\t}else{\n\t\tSystem.out.println(\"Path : \"+path);\n\t\tSystem.exit(1);\n\t}if(properties.containsKey(\"populationSize\")){\n\t\tpopSize = Integer.parseInt((String)properties.get(\"populationSize\"));\n\t\tc.populationSize =popSize;\n\t}if(properties.containsKey(\"printBest\")){\n\t\tprintbest = Boolean.parseBoolean((String)properties.get(\"printBest\"));\n\t\tc.printBest=printbest;\n\t}if(properties.containsKey(\"maxGenerations\")){\n\t\tmaxGenerations = Integer.parseInt((String)properties.get(\"maxGenerations\"));\n\t\tc.maxGenerations=maxGenerations;\n\t}if(properties.containsKey(\"log\")){\n\t\tlog = Boolean.parseBoolean((String)properties.get(\"log\"));\n\t\tc.log=log;\n\t}if(properties.containsKey(\"debug\")){\n\t\tdebug = Boolean.parseBoolean((String)properties.get(\"debug\"));\n\t\tc.debug=debug;\n\t}if(properties.containsKey(\"features\")){\n\t\tfeatures = Integer.parseInt((String)properties.get(\"features\"));\n\t\tc.features=features;\n\t}if(properties.containsKey(\"addSubRangeH\")){\n\t\taddSubRangeH = Double.parseDouble((String)properties.get(\"addSubRangeH\"));\n\t\tc.addSubRangeH=addSubRangeH;\n\t}if(properties.containsKey(\"addSubRangeVS\")){\n\t\taddSubRangeVS = Double.parseDouble((String)properties.get(\"addSubRangeVS\"));\n\t\tc.addSubRangeVS=addSubRangeVS;\n\t}if(properties.containsKey(\"divMultRangeH\")){\n\t\tdivMultRangeH = Double.parseDouble((String)properties.get(\"divMultRangeH\"));\n\t\tc.divMultRangeH=divMultRangeH;\n\t}if(properties.containsKey(\"divMultRangeVS\")){\n\t\tdivMultRangeVS = Double.parseDouble((String)properties.get(\"divMultRangeVS\"));\n\t\tc.divMultRangeVS=divMultRangeVS;\n\t}if(properties.containsKey(\"randomThicknessRange\")){\n\t\trandomThicknessRange = Double.parseDouble((String)properties.get(\"randomThicknessRange\"));\n\t\tc.randomThicknessRange=randomThicknessRange;\n\t}if(properties.containsKey(\"randomVelocityRange\")){\n\t\trandomVelocityRange = Double.parseDouble((String)properties.get(\"randomVelocityRange\"));\n\t\tc.randomVelocityRange=randomVelocityRange;\n\t}if(properties.containsKey(\"zThreshold\")){\n\t\tzThreshold = Integer.parseInt((String)properties.get(\"zThreshold\"));\n\t\tc.zThreshold=zThreshold;\n\t}if(properties.containsKey(\"useThreshold\")){\n\t\tuseThreshold = Boolean.parseBoolean((String)properties.get(\"useThreshold\"));\n\t\tc.useThreshold=useThreshold;\n\t}\n\n\tSystem.out.println(\" Debug? \"+debug + \" | Log? \"+ log + \" | printBest? \"+ printbest);\n\tSystem.out.println(\"Pop: \"+c.populationSize+\" | Max Gens: \"+ maxGenerations+ \"\\nPath: \"+c.path);\n\tSystem.out.println(\"randomThicknessRange :\"+c.randomThicknessRange+\" randomVelocityRange :\"+c.randomVelocityRange);\n\tSystem.out.println(\"AddSubRange H :\"+c.addSubRangeH+\" VS :\"+c.addSubRangeVS);\n\tSystem.out.println(\"divMultRange H :\"+c.divMultRangeH+\" VS :\"+c.divMultRangeVS);\n\tSystem.out.println(\"Threshold ? \"+c.useThreshold+\" : \"+c.zThreshold);\n\t}", "private PropertyUtil(){\n\t\ttry{\n\t\t\tloadURL();\n\t\t\tRuntime.getRuntime().addShutdownHook(new UtilShutdownHook());\n\t\t}catch(IOException ioe){\n\t\t\tLOGGER.error(\"Unable to load Property File\\n\"+ioe);\n\t\t}\n\t\tLOGGER.debug(\"INSTANTIATED\");\n\t}", "public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }", "public ZKInProcessServer(Properties properties) throws IOException,\n ConfigException {\n createDirs(properties.getProperty(\"dataDir\"), properties\n .getProperty(\"dataLogDir\"), Integer.parseInt(properties\n .getProperty(\"serverID\")));\n config.parseProperties(properties);\n\n this.standalone = false;\n }", "public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.close();\r\n\t\t\t}catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}", "private void initializeProperties() throws IOException {\n String userHome = org.wattdepot.util.logger.WattDepotUserHome.getHomeString();\n String wattDepotHome = userHome + \"/.wattdepot\";\n String clientHome = wattDepotHome + \"/client\";\n String propFile = clientHome + \"/datainput.properties\";\n initializeProperties(propFile);\n }", "public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }", "public static Properties loadProperties(String filePath) throws MnoConfigurationException {\n\t\tProperties properties = new Properties();\n\t\tInputStream input = getInputStreamFromClassPathOrFile(filePath);\n\t\ttry {\n\t\t\tproperties.load(input);\n\t\t} catch (IOException e) {\n\t\t\tthrow new MnoConfigurationException(\"Could not load properties file: \" + filePath, e);\n\t\t}\n\t\treturn properties;\n\t}", "public void setProperties(Map<String, String> properties) {\n this.properties = properties;\n }", "protected Properties newTestProperties() throws IOException\n {\n Properties props = new Properties();\n storeTestConf(props); \n return props;\n }", "public static void loadProperties() {\r\n\t\tif (!isLoaded) {\r\n\t\t\tnew BCProperties() ;\r\n\t\t\tisLoaded = true ;\r\n\t\t}\r\n\t}", "private void loadProperties() {\n try (InputStream in = getClass().getClassLoader().getResourceAsStream(PATH_TO_PROPERTIES)) {\n this.prs.load(in);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }", "private static Properties getProperties(final String filename) throws IOException, FileNotFoundException {\r\n \r\n final Properties result = new Properties();\r\n final InputStream propertiesStream = getInputStream(filename);\r\n result.load(propertiesStream);\r\n return result;\r\n }", "public final void loadPropertiesFromFile(final String fileName)\n {\n\n Properties tempProp = PropertyLoader.loadProperties(fileName);\n fProp.putAll(tempProp);\n\n }", "void load() {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(propertyFile);\n\t\t\tfinal Properties newProperties = new Properties();\n\t\t\tnewProperties.load(fis);\n\t\t\ttimeLastRead = propertyFile.lastModified();\n\t\t\tproperties = newProperties;\n\t\t\tfis.close();\n\t\t} catch (final Exception e) {\n\t\t\tlogger.info(\"Property file \" + propertyFile + \" \" + e.getMessage());\n\t\t}\n\t}" ]
[ "0.72961396", "0.7147821", "0.69970226", "0.6635874", "0.655911", "0.6475181", "0.6356653", "0.6344048", "0.63307184", "0.63183314", "0.6265846", "0.62601113", "0.6250333", "0.6202124", "0.6148249", "0.613988", "0.61344206", "0.61116755", "0.60614675", "0.60420257", "0.60174507", "0.60080856", "0.5987092", "0.5962963", "0.5956623", "0.5955376", "0.59331584", "0.5928806", "0.59079903", "0.59062904", "0.58457065", "0.5842686", "0.58267945", "0.5820962", "0.58097255", "0.5804018", "0.5798801", "0.57901263", "0.57852036", "0.578165", "0.57707775", "0.57695246", "0.57612336", "0.5760576", "0.574911", "0.5740853", "0.57365227", "0.57296646", "0.5726085", "0.5709062", "0.5693813", "0.56930286", "0.5690005", "0.5688361", "0.5681139", "0.56809866", "0.5663321", "0.56490874", "0.564786", "0.5646208", "0.56377393", "0.56333536", "0.5618513", "0.5615122", "0.56116635", "0.55889803", "0.55889344", "0.55854845", "0.5584684", "0.5560276", "0.55593544", "0.5548589", "0.55464745", "0.5534154", "0.55289006", "0.5520508", "0.55110526", "0.550928", "0.55044156", "0.5500286", "0.54995394", "0.54819345", "0.54774576", "0.5474352", "0.5471702", "0.5460709", "0.54567736", "0.54487675", "0.5443466", "0.5443396", "0.543835", "0.5438215", "0.5433785", "0.54309666", "0.54251146", "0.5421026", "0.5410968", "0.54047585", "0.5404078", "0.5398123" ]
0.5948466
26
Reads in the properties in ~/.wattdepot/client/datainput.properties, and provides default values for all properties not mentioned in this file.
private void initializeProperties() throws IOException { String userHome = org.wattdepot.util.logger.WattDepotUserHome.getHomeString(); String wattDepotHome = userHome + "/.wattdepot"; String clientHome = wattDepotHome + "/client"; String propFile = clientHome + "/datainput.properties"; initializeProperties(propFile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataInputClientProperties() throws IOException {\n this(null);\n }", "private void initializeProperties(String propertiesFilename) throws IOException {\n this.properties = new Properties();\n\n // Set defaults for 'standard' operation.\n // properties.setProperty(FILENAME_KEY, clientHome + \"/bmo-data.tsv\");\n properties.setProperty(BMO_URI_KEY,\n \"http://www.buildingmanageronline.com/members/mbdev_export.php/download.txt\");\n\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propertiesFilename);\n properties.load(stream);\n System.out.println(\"Loading data input client properties from: \" + propertiesFilename);\n }\n catch (IOException e) {\n System.out.println(propertiesFilename\n + \" not found. Using default data input client properties.\");\n throw e;\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n trimProperties(properties);\n }", "@BeforeSuite\n\tpublic void propertiesFileReader(){\n\t\tif(prop == null){\t\t\t\n\t\t\tprop = new Properties();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"qa\")){ prop.load(new\n\t\t\t\t * FileInputStream(qaProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"stage\")){ prop.load(new\n\t\t\t\t * FileInputStream(stagProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"prod\")){ prop.load(new\n\t\t\t\t * FileInputStream(prodProperty)); }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"qa\")) \n\t\t\t\t\tFileUtils.copyFile(new File(qaProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"stage\"))\n\t\t\t\t\tFileUtils.copyFile(new File(stagProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"prod\"))\n\t\t\t\t\tFileUtils.copyFile(new File(prodProperty), new File(defaultProperty));\n\t\t\t\t\n\t\t\t\tprop.load(new FileInputStream(defaultProperty));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"user + pass [\"+prop.getProperty(\"username\")+\"===\"+prop.getProperty(\"password\"));\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public\n void setPropertiesDefaults(InputStream in)\n {\n if (in == null)\n return;\n\n try {\n defaults.load(in);\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }", "public DataInputClientProperties(String propertiesFilename) throws IOException {\n if (propertiesFilename == null) {\n initializeProperties();\n }\n else {\n initializeProperties(propertiesFilename);\n }\n }", "static Map<String, Object> getDefaultData() throws IOException {\r\n\r\n Map<String, Object> defaultData = new TreeMap<>();\r\n Properties defaultValues = new Properties();\r\n FileInputStream input = new FileInputStream(DEFAULT_VALUES_PATH);\r\n defaultValues.load(input);\r\n for (Entry<Object, Object> entry : defaultValues.entrySet()) {\r\n defaultData.put((String) entry.getKey(), (String) entry.getValue());\r\n }\r\n\r\n Equipment equipment = MongoDB.get(Equipment.class);\r\n defaultData.put(\"equipment\", equipment);\r\n return defaultData;\r\n }", "public\n YutilProperties(InputStream in)\n {\n super(new Properties());\n setPropertiesDefaults(in);\n }", "public DefaultProperties() {\n\t\t// Festlegung der Werte für Admin-Zugang\n\t\tthis.setProperty(\"admin.username\", \"admin\");\n\t\tthis.setProperty(\"admin.password\", \"password\");\n\t\tthis.setProperty(\"management.port\", \"8443\");\n\n\t\t// Festlegung der Werte für CouchDB-Verbindung\n\t\tthis.setProperty(\"couchdb.adress\", \"http://localhost\");\n\t\tthis.setProperty(\"couchdb.port\", \"5984\");\n\t\tthis.setProperty(\"couchdb.databaseName\", \"profiles\");\n\n\t\t// Festlegung der Werte für Zeitvergleiche\n\t\tthis.setProperty(\"server.minTimeDifference\", \"5\");\n\t\tthis.setProperty(\"server.monthsBeforeDeletion\", \"18\");\n\t}", "private void getPropValues() {\n Properties prop = new Properties();\n \n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n prop.load(inputStream);\n } catch (IOException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (inputStream == null) {\n try {\n throw new FileNotFoundException(\"ERROR: property file '\" + propFileName + \"' not found in the classpath\");\n } catch (FileNotFoundException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // get property values\n this.defaultDirectory = prop.getProperty(\"defaultDirectory\");\n this.topicsFile = this.defaultDirectory + prop.getProperty(\"topics\");\n this.scripturesFile = this.defaultDirectory + prop.getProperty(\"scriptures\");\n this.defaultJournalXML = this.defaultDirectory + prop.getProperty(\"defaultJournalXML\");\n this.defaultJournalTxt = this.defaultDirectory + prop.getProperty(\"defaultJournalTxt\");\n }", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "public void getData() {\n try {\n // Load the Kettle properties file...\n //\n Properties properties = EnvUtil.readProperties( getKettlePropertiesFilename() );\n\n // These are the standard Kettle variables...\n //\n KettleVariablesList variablesList = KettleVariablesList.getInstance();\n\n // Add the standard variables to the properties if they are not in there already\n //\n for ( String key : variablesList.getDescriptionMap().keySet() ) {\n if ( Utils.isEmpty( (String) properties.get( key ) ) ) {\n String defaultValue = variablesList.getDefaultValueMap().get( key );\n properties.put( key, Const.NVL( defaultValue, \"\" ) );\n }\n }\n\n // Obtain and sort the list of keys...\n //\n List<String> keys = new ArrayList<String>();\n Enumeration<Object> keysEnum = properties.keys();\n while ( keysEnum.hasMoreElements() ) {\n keys.add( (String) keysEnum.nextElement() );\n }\n Collections.sort( keys );\n\n // Populate the grid...\n //\n for ( int i = 0; i < keys.size(); i++ ) {\n String key = keys.get( i );\n String value = properties.getProperty( key, \"\" );\n String description = Const.NVL( variablesList.getDescriptionMap().get( key ), \"\" );\n\n TableItem item = new TableItem( wFields.table, SWT.NONE );\n item.setBackground( 3, GUIResource.getInstance().getColorLightGray() );\n\n int pos = 1;\n item.setText( pos++, key );\n item.setText( pos++, value );\n item.setText( pos++, description );\n }\n\n wFields.removeEmptyRows();\n wFields.setRowNums();\n wFields.optWidth( true );\n\n //saves the properties keys at the moment this method was called\n previousKettlePropertiesKeys = new HashSet<>();\n previousKettlePropertiesKeys.addAll( Arrays.asList( properties.keySet().toArray( new String[ 0 ] ) ) );\n\n } catch ( Exception e ) {\n new ErrorDialog( shell,\n BaseMessages.getString( PKG, \"KettlePropertiesFileDialog.Exception.ErrorLoadingData.Title\" ),\n BaseMessages.getString( PKG, \"KettlePropertiesFileDialog.Exception.ErrorLoadingData.Message\" ), e );\n }\n }", "public static Properties getDefaultProperties() {\r\n return getProperties(true);\r\n }", "public static Properties getPropertiesDefault() throws IOException {\n\t\treturn getProperties(\"/properties/configuration.properties\");\n\t\t\n\t}", "public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public\n void setPropertiesDefaults(String argv[])\n {\n if (argv == null)\n return;\n\n for (int i = 0; i < argv.length; i++)\n {\n try {\n defaults.load(new StringBufferInputStream(argv[i]));\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }\n }", "private void initializeQueryPropertiesNew() {\n synchronized (defaultQueryProperties) {\n defaultQueryProperties.clear();\n try {\n final InferenceParameterDescriptions desc = DefaultInferenceParameterDescriptions.loadInferenceParameterDescriptions(\n getCyc(), 10000);\n final InferenceParameters defaults = desc.getDefaultInferenceParameters();\n final CycList allQueryProperties = getConverse().converseList(makeSublStmt(\n \"ALL-QUERY-PROPERTIES\"));\n for (final Object property : allQueryProperties) {\n if (property instanceof CycSymbolImpl && defaults.containsKey(\n property.toString())) {\n final Object value = defaults.get(property.toString());\n defaultQueryProperties.put(property.toString(), value);\n }\n }\n } catch (CycConnectionException | com.cyc.base.exception.CycApiException ex) {\n LOGGER.error(ex.getMessage(), ex);\n }\n }\n queryPropertiesInitialized = true;\n }", "private void setupDefaultAsPerProperties()\n {\n /// Do the minimum of what App.init() would do to allow to run.\n Gui.mainFrame = new MainFrame();\n App.p = new Properties();\n App.loadConfig();\n System.out.println(App.getConfigString());\n Gui.progressBar = Gui.mainFrame.getProgressBar(); //must be set or get Nullptr\n\n // configure the embedded DB in .jDiskMark\n System.setProperty(\"derby.system.home\", App.APP_CACHE_DIR);\n\n // code from startBenchmark\n //4. create data dir reference\n App.dataDir = new File(App.locationDir.getAbsolutePath()+File.separator+App.DATADIRNAME);\n\n //5. remove existing test data if exist\n if (App.dataDir.exists()) {\n if (App.dataDir.delete()) {\n App.msg(\"removed existing data dir\");\n } else {\n App.msg(\"unable to remove existing data dir\");\n }\n }\n else\n {\n App.dataDir.mkdirs(); // create data dir if not already present\n }\n }", "public void initData() throws IOException {\n\t\textent.loadConfig(new File(extentReportFile));\n\t\tchromedriverPath = driverData.getPropertyValue(\"chromeDriverPath\");\n\t\tfirefoxdriverPath = driverData.getPropertyValue(\"geckoDriverPath\");\n\t\tchromedriverKey = driverData.getPropertyValue(\"chromeDriverKey\");\n\t\tfirefoxdriverKey = driverData.getPropertyValue(\"geckoDriverKey\");\n\t\tapplicationUrl = testData.getPropertyValue(\"applicationURL\");\n\t\tapplicationPassword = testData.getPropertyValue(\"applicationPassword\");\n\t\tscreenShotPath = testData.getPropertyValue(\"screenshotPath\");\n\t\tdateFormat = testData.getPropertyValue(\"dateFormat\");\n\t}", "@Override\n public void readFields(DataInput input) throws IOException {\n setPartitionKey(input.readUTF());\n setRowKey(input.readUTF());\n setTimestamp(new Date(input.readLong()));\n // Read the rest of the properties.\n int numProperties = input.readInt();\n HashMap<String, EntityProperty> properties = new HashMap<String, EntityProperty>();\n for (int i = 0; i < numProperties; i++) {\n properties.put(input.readUTF(), new EntityProperty(input.readUTF()));\n }\n setProperties(properties);\n }", "private void GetRequiredProperties() {\r\n\r\n\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\t\r\n try {\r\n \r\n File file = new File(fileToRead);\r\n \r\n if (file.exists()) {\r\n logger.info(\"Config file exists\");\r\n } else {\r\n logger.error(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n }\r\n \r\n prop.load(new FileInputStream(file));\r\n\r\n } catch (Exception e) {\r\n\r\n logger.error(\"Exception :: GetRequiredProperties :: \" + e.getMessage(), e);\r\n\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: \" + e.getMessage());\r\n }\r\n\r\n\t sifUrl = prop.getProperty(\"MDM_SIF_URL\");\r\n\t orsId = prop.getProperty(\"MDM_ORS_ID\");\r\n\t username = prop.getProperty(\"MDM_USER_NAME\");\r\n\t password = prop.getProperty(\"MDM_PASSWORD\");\r\n\t \r\n\t logger.info(\"SIF URL ::\" + sifUrl);\r\n\t logger.info(\"ORS ID ::\" + orsId );\r\n\t logger.info(\"User Id ::\" + username);\r\n\t logger.info(\"Password ::\" + password);\r\n\t \r\n\t\r\n\t}", "public void loadDefaultValues() {\r\n\t}", "public\n void setPropertiesDefaults(String args, boolean scanout)\n {\n if (args == null)\n return;\n\n if (scanout)\n {\n StringBuffer sb = new StringBuffer(args.length() + 32); // length of string + a little\n try {\n defaults.load(new StringBufferInputStream(YutilProperties.scanOutProperties(args, sb).toString()));\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }\n else\n {\n try {\n defaults.load(new StringBufferInputStream(args));\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }\n\n try {\n defaults.load(new StringBufferInputStream(args));\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }", "public void parseDefaults() throws FileNotFoundException,\n\t\t\tIOException {\n\t\t// System.out.println(\"in parse\\t\"+szDefaultFile);\n\t\tString szLine;\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tString szError = \"\";\n\t\t\tbr = new BufferedReader(new FileReader(szDefaultFile));\n\t\t\twhile ((szLine = br.readLine()) != null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(szLine, \"\\t\");\n\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\tString sztype = st.nextToken().trim();\n\n\t\t\t\t\tString szvalue = \"\";\n\t\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\t\tszvalue = st.nextToken().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!szvalue.equals(\"\")) {\n\t\t\t\t\t\tif ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Use_static_input_to_build_model\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Use_transcription_factor-gene_interaction_data_to_build\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Use_transcription_factor_gene_interaction_data_to_build\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"true\")) {\n\t\t\t\t\t\t\t\tbstaticsearchDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\t\t\t\tbstaticsearchDEF = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tszError += \"Warning: \" + szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an unrecognized \" + \"value for \"\n\t\t\t\t\t\t\t\t\t\t+ sztype + \" \"\n\t\t\t\t\t\t\t\t\t\t+ \"(expecting true or false)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Static_Input_Data_File\")\n\t\t\t\t\t\t\t\t|| sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"TF_gene_Interactions_File\")\n\t\t\t\t\t\t\t\t|| sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"TF-gene_Interactions_File\")) {\n\t\t\t\t\t\t\tszStaticFileDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Data_File\")\n\t\t\t\t\t\t\t\t|| sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Expression_Data_File\")) {\n\t\t\t\t\t\t\tszDataFileDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Convergence_Likelihood_%\")) {\n\t\t\t\t\t\t\tdCONVERGENCEDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Standard_Deviation\")) {\n\t\t\t\t\t\t\tdMINSTDDEVALDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Saved_Model_File\")) {\n\t\t\t\t\t\t\tszInitFileDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Spot_IDs_included_in_the_data_file\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Spot_IDs_included_in_the_the_data_file\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Spot_IDs_in_the_data_file\"))) {\n\t\t\t\t\t\t\tbspotcheckDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Normalize_Data\"))\n\t\t\t\t\t\t\t\t|| (sztype.equalsIgnoreCase(\"Transform_Data\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Transform_Data[Log transform data,Linear transform data,Add 0]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Normalize_Data[Log normalize data,Normalize data,No normalization/add 0]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnnormalizeDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((nnormalizeDEF < 0) || (nnormalizeDEF > 2)) {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Normalize_Data\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Log normalize data\")) {\n\t\t\t\t\t\t\t\t\tnnormalizeDEF = 0;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Normalize data\")) {\n\t\t\t\t\t\t\t\t\tnnormalizeDEF = 1;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"No normalization/add 0\")) {\n\t\t\t\t\t\t\t\t\tnnormalizeDEF = 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Normalize_Data\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Change_should_be_based_on[Maximum-Minimum,Difference From 0]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Change_should_be_based_on\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Maximum-Minimum\")) {\n\t\t\t\t\t\t\t\tbmaxminDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Difference From 0\")) {\n\t\t\t\t\t\t\t\tbmaxminDEF = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tszError += szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value of \"\n\t\t\t\t\t\t\t\t\t\t+ \"Change_should_be_based_on[Maximum-Minimum,Difference From 0]\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Gene_Annotation_Source\")) {\n\t\t\t\t\t\t\t/*Boolean bProteAll=false;\n\t\t\t\t\t\t\t * try { ndbDEF = Integer.parseInt(szvalue); if\n\t\t\t\t\t\t\t * ((ndbDEF < 0)|| (ndbDEF >= organisms.length)) {\n\t\t\t\t\t\t\t * ndbDEF = 0; } } catch(NumberFormatException ex) {\n\t\t\t\t\t\t\t * boolean bfound = false; int nsource = 0; while\n\t\t\t\t\t\t\t * ((nsource < organisms.length)&&(!bfound)) { if\n\t\t\t\t\t\t\t * (organisms[nsource].equalsIgnoreCase(szvalue)) {\n\t\t\t\t\t\t\t * bfound = true; ndbDEF = nsource; } else {\n\t\t\t\t\t\t\t * nsource++; } }\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * if (!bfound) { szError += \"Warning: \"+szvalue\n\t\t\t\t\t\t\t * +\" is an unrecognized \"+\n\t\t\t\t\t\t\t * \"type for Gene Annotation Source\\n\"; } }\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Allow_Path_Merges\")) {\n\t\t\t\t\t\t\tballowmergeDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"TF-gene_Interaction_Source\")) {\n\t\t\t\t\t\t\tint numitems = staticsourceArray.length;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnstaticsourceDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((nstaticsourceDEF < 0)\n\t\t\t\t\t\t\t\t\t\t|| (nstaticsourceDEF >= numitems)) {\n\t\t\t\t\t\t\t\t\tnstaticsourceDEF = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tboolean bfound = false;\n\t\t\t\t\t\t\t\tint nsource = 0;\n\t\t\t\t\t\t\t\twhile ((nsource < numitems) && (!bfound)) {\n\t\t\t\t\t\t\t\t\tif (((String) staticsourceArray[nsource])\n\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(szvalue)) {\n\t\t\t\t\t\t\t\t\t\tbfound = true;\n\t\t\t\t\t\t\t\t\t\tnstaticsourceDEF = nsource;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnsource++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (!bfound) {\n\t\t\t\t\t\t\t\t\tszError += \"Warning: \"\n\t\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t\t+ \" is an unrecognized \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"type for TF-gene_Interaction_Source\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Cross_Reference_Source\")) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * int numitems = defaultxrefs.length; try {\n\t\t\t\t\t\t\t * nxrefDEF = Integer.parseInt(szvalue); if\n\t\t\t\t\t\t\t * ((nxrefDEF < 0)|| (nxrefDEF >= numitems)) {\n\t\t\t\t\t\t\t * nxrefDEF = 0; } } catch(NumberFormatException ex)\n\t\t\t\t\t\t\t * { boolean bfouparseDefaultsnd = false; int nsource = 0; while\n\t\t\t\t\t\t\t * ((nsource < numitems)&&(!bfound)) { if (((String)\n\t\t\t\t\t\t\t * defaultxrefs[nsource]).equalsIgnoreCase(szvalue))\n\t\t\t\t\t\t\t * { bfound = true; nxrefDEF = nsource; } else {\n\t\t\t\t\t\t\t * nsource++; } }\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * if (!bfound) { szError += \"Warning: \"+szvalue\n\t\t\t\t\t\t\t * +\" is an unrecognized \"+\n\t\t\t\t\t\t\t * \"type for a Cross_Reference_Source\"; } }\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Gene_Annotation_File\")) {\n\t\t\t\t\t\t\tszGeneAnnotationFileDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Cross_Reference_File\")) {\n\t\t\t\t\t\t\tszCrossRefFileDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_Files(comma delimited list)\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_Files\"))) {\n\t\t\t\t\t\t\tvRepeatFilesDEF = new Vector();\n\t\t\t\t\t\t\tStringTokenizer stRepeatList = new StringTokenizer(\n\t\t\t\t\t\t\t\t\tszvalue, \",\");\n\t\t\t\t\t\t\twhile (stRepeatList.hasMoreTokens()) {\n\t\t\t\t\t\t\t\tvRepeatFilesDEF.add(stRepeatList.nextToken());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_is_from\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_is_from[Different time periods,The same time period]\"))) {\n\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Different time periods\")) {\n\t\t\t\t\t\t\t\tballtimeDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"The same time period\")) {\n\t\t\t\t\t\t\t\tballtimeDEF = false;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Repeat Data is from it must be either \"\n\t\t\t\t\t\t\t\t\t\t+ \"'Different time periods' or 'The same time period'\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Y-axis_Scale_Factor\")) {\n\t\t\t\t\t\t\tdYaxisDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Scale_Node_Areas_By_The_Factor\")) {\n\t\t\t\t\t\t\tdnodekDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_Scale_Factor\")) {\n\t\t\t\t\t\t\tdXaxisDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"X-axis_scale\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_scale_should_be\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_scale[Uniform,Based on Real Time]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_scale_should_be[Uniform,Based on Real Time]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Uniform\")) {\n\t\t\t\t\t\t\t\tbrealXaxisDEF = false;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Based on Real Time\")) {\n\t\t\t\t\t\t\t\tbrealXaxisDEF = true;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"X-axis_scale it must be either 'Uniform'\"\n\t\t\t\t\t\t\t\t\t\t+ \"or 'Based on Real Time'.\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Key_Input_X_p-val_10^-X\")) {\n\t\t\t\t\t\t\tdKeyInputXDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Key_Input_Significance_Based_On[\"\n\t\t\t\t\t\t\t\t\t\t+ \"Path Significance Conditional on Split,Path Significance Overall,Split Significance]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Key_Input_Significance_Based_On[\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"Split Significance,Path Significance Conditional on Split,Path Significance Overall]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnKeyInputTypeDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((nKeyInputTypeDEF < 0)\n\t\t\t\t\t\t\t\t\t\t|| (nKeyInputTypeDEF > 2)) {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Key Input Significance Based On\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// so code maps to input order\n\t\t\t\t\t\t\t\t\tif (nKeyInputTypeDEF == 0)\n\t\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 1;\n\t\t\t\t\t\t\t\t\telse if (nKeyInputTypeDEF == 1)\n\t\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 2;\n\t\t\t\t\t\t\t\t\telse if (nKeyInputTypeDEF == 2)\n\t\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 0;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Split Significance\")) {\n\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 0;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Path Significance Conditional on Split\")) {\n\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 1;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Path Significance Overall\")) {\n\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Key_Input_Significance_Based_On\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Maximum_number_of_paths_out_of_split\")) {\n\t\t\t\t\t\t\tnumchildDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Split_Seed\"))\n\t\t\t\t\t\t\t\t|| (sztype.equalsIgnoreCase(\"Random_Seed\"))) {\n\t\t\t\t\t\t\tnSEEDDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Penalized_likelihood_node_penalty\")) {\n\t\t\t\t\t\t\tdNODEPENALTYDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Model_selection_framework\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Model_selection_framework[Penalized Likelihood,Train-Test]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tint ntempval;\n\t\t\t\t\t\t\t\tntempval = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((ntempval < 0) || (ntempval > 1)) {\n\t\t\t\t\t\t\t\t\tbPENALIZEDDEF = (ninitsearchDEF == 0);\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Model_selection_framework\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Penalized Likelihood\")) {\n\t\t\t\t\t\t\t\t\tbPENALIZEDDEF = true;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Train-Test\")) {\n\t\t\t\t\t\t\t\t\tbPENALIZEDDEF = false;\n\t\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"Model_selection_framework \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"it must be either \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"'Use As Is', 'Start Search From', or 'Do Not Use'\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delay_path_improvement\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delay_split_score_%\"))) {\n\t\t\t\t\t\t\tdDELAYPATHDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDELAYPATHDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Merge_path_score_%\")) {\n\t\t\t\t\t\t\tdDMERGEPATHDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDMERGEPATHDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Merge_path_difference_threshold\")) {\n\t\t\t\t\t\t\tdDMERGEPATHDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDMERGEPATHDIFFDEF > 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be <= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delay_split_difference_threshold\")) {\n\t\t\t\t\t\t\tdDELAYPATHDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDELAYPATHDIFFDEF > 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be <= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delete_path_difference_threshold\")) {\n\t\t\t\t\t\t\tdPRUNEPATHDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dPRUNEPATHDIFFDEF > 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be <= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Main_search_difference_threshold\")) {\n\t\t\t\t\t\t\tdMinScoreDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dMinScoreDIFFDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Prune_path_improvement\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delete_path_score_%\"))) {\n\t\t\t\t\t\t\tdPRUNEPATHDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dPRUNEPATHDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_score_improvement\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Main_search_score_%\"))) {\n\t\t\t\t\t\t\tdMinScoreDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dMinScoreDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Saved_Model\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Saved_Model[Use As Is/Start Search From/Do Not Use]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tninitsearchDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((ninitsearchDEF < 0)\n\t\t\t\t\t\t\t\t\t\t|| (ninitsearchDEF > 2)) {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Saved_Model\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Use As Is\")) {\n\t\t\t\t\t\t\t\t\tninitsearchDEF = 0;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Start Search From\")) {\n\t\t\t\t\t\t\t\t\tninitsearchDEF = 1;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Do Not Use\")) {\n\t\t\t\t\t\t\t\t\tninitsearchDEF = 2;\n\t\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"Saved_Model \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"it must be either \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"'Use As Is', 'Start Search From', or 'Do Not Use'\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Filter_Gene_If_It_Has_No_Static_Input_Data\")) {\n\t\t\t\t\t\t\tbfilterstaticDEF = (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Maximum_Number_of_Missing_Values\")) {\n\t\t\t\t\t\t\tnMaxMissingDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Absolute_Log_Ratio_Expression\")) {\n\t\t\t\t\t\t\tdMinExpressionDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Correlation_between_Repeats\")) {\n\t\t\t\t\t\t\tdMinCorrelationRepeatsDEF = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Pre-filtered_Gene_File\")) {\n\t\t\t\t\t\t\tszPrefilteredDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Include_Biological_Process\")) {\n\t\t\t\t\t\t\tbpontoDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Include_Molecular_Function\")) {\n\t\t\t\t\t\t\tbfontoDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Include_Cellular_Process\")) {\n\t\t\t\t\t\t\tbcontoDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Only_include_annotations_with_these_evidence_codes\")) {\n\t\t\t\t\t\t\tszevidenceDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Only_include_annotations_with_these_taxon_IDs\")) {\n\t\t\t\t\t\t\tsztaxonDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Category_ID_File\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Category_ID_Mapping_File\"))) {\n\t\t\t\t\t\t\tszcategoryIDDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"GO_Minimum_number_of_genes\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_number_of_genes\"))) {\n\t\t\t\t\t\t\tnMinGoGenesDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Minimum_GO_level\")) {\n\t\t\t\t\t\t\tnMinGOLevelDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Split_Percent\")) {\n\t\t\t\t\t\t\tdpercentDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Number_of_samples_for_randomized_multiple_hypothesis_correction\")) {\n\t\t\t\t\t\t\tnSamplesMultipleDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Multiple_hypothesis_correction_method_enrichment[Bonferroni,Randomization]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Multiple_hypothesis_correction_method[Bonferroni,Randomization]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Bonferroni\")) {\n\t\t\t\t\t\t\t\tbrandomgoDEF = false;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Randomization\")) {\n\t\t\t\t\t\t\t\tbrandomgoDEF = true;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Correction_Method it must be either 'Bonferroni'\"\n\t\t\t\t\t\t\t\t\t\t+ \"or 'Randomization'.\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"miRNA-gene_Interaction_Source\")) {\n\t\t\t\t\t\t\tmiRNAInteractionDataFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"miRNA_Expression_Data_File\")) {\n\t\t\t\t\t\t\tmiRNAExpressionDataFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Regulator_Types_Used_For_Activity_Scoring\")) {\n\t\t\t\t\t\t\tif(szvalue.equalsIgnoreCase(\"None\")){\n\t\t\t\t\t\t\t\tcheckStatusTF = false;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = false;\n\t\t\t\t\t\t\t} else if(szvalue.equalsIgnoreCase(\"TF\")){\n\t\t\t\t\t\t\t\tcheckStatusTF = true;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"miRNA\")) {\n\t\t\t\t\t\t\t\tcheckStatusTF = false;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"Both\")) {\n\t\t\t\t\t\t\t\tcheckStatusTF = true;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = true;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")){\n\t\t\t\t\t\t\t\tszError = \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t+ \"Regulator_Types_Used_For_Activity_Scoring it must be either 'None', 'TF'\"\n\t\t\t\t\t\t\t\t\t+ \", 'miRNA' or 'Both'.\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Normalize_miRNA_Data[Log normalize data,Normalize data,No normalization/add 0]\")) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Log normalize data\")) {\n\t\t\t\t\t\t\t\tmiRNATakeLog = true;\n\t\t\t\t\t\t\t\tmiRNAAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"Normalize data\")) {\n\t\t\t\t\t\t\t\tmiRNATakeLog = false;\n\t\t\t\t\t\t\t\tmiRNAAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"No normalization/add 0\")) {\n\t\t\t\t\t\t\t\tmiRNATakeLog = false;\n\t\t\t\t\t\t\t\tmiRNAAddZero = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\tszvalue+ \" is an invalid argument for Normalize_miRNA_Data\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_miRNA_Data_Files(comma delimited list)\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_miRNA_Data_Files\"))) {\n\t\t\t\t\t\t\tmiRNARepeatFilesDEF = new Vector();\n\t\t\t\t\t\t\tStringTokenizer stRepeatList = new StringTokenizer(\n\t\t\t\t\t\t\t\t\tszvalue, \",\");\n\t\t\t\t\t\t\twhile (stRepeatList.hasMoreTokens()) {\n\t\t\t\t\t\t\t\tmiRNARepeatFilesDEF.add(stRepeatList.nextToken());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Repeat_miRNA_Data_is_from\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_miRNA_Data_is_from[Different time periods,The same time period]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Different time periods\")) {\n\t\t\t\t\t\t\t\tmiRNAalltimeDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"The same time period\")) {\n\t\t\t\t\t\t\t\tmiRNAalltimeDEF = false;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Repeat miRNA Data is from it must be either \"\n\t\t\t\t\t\t\t\t\t\t+ \"'Different time periods' or 'The same time period'\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Filter_miRNA_With_No_Expression_Data_From_Regulators\")) {\n\t\t\t\t\t\t\tfiltermiRNAExp = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Expression_Scaling_Weight\")) {\n\t\t\t\t\t\t\tmiRNAWeight = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Minimum_TF_Expression_After_Scaling\")) {\n\t\t\t\t\t\t\ttfWeight = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Regulator_Score_File\")) {\n\t\t\t\t\t\t\tregScoreFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"DECOD_Executable_Path\")) {\n\t\t\t\t\t\t\tdecodPath = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Gene_To_Fasta_Format_file\")) {\n\t\t\t\t\t\t\tfastaFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Active_TF_influence\")) {\n\t\t\t\t\t\t\tdProbBindingFunctional = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(szvalue);\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"Setting active TF influence to \"\n\t\t\t\t\t\t\t\t\t\t\t+ dProbBindingFunctional);\n // parseDefault for proteomics panel \n } else if (sztype.equalsIgnoreCase(\"Proteomics_File\")){\n djProteFile=szvalue;\n // parseDefault for relative proteomics weight\n } else if (sztype.equalsIgnoreCase(\"Proteomics_Relative_Weight\")){\n pweight=szvalue;\n } else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Prote_Data_Files(comma delimited list)\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Prote_Data_Files\"))) {\n\t\t\t\t\t\t\tProteRepeatFilesDEF = new Vector();\n\t\t\t\t\t\t\tStringTokenizer stRepeatList = new StringTokenizer(\n\t\t\t\t\t\t\t\t\tszvalue, \",\");\n\t\t\t\t\t\t\twhile (stRepeatList.hasMoreTokens()) {\n\t\t\t\t\t\t\t\tProteRepeatFilesDEF.add(stRepeatList.nextToken());\n\t\t\t\t\t\t\t}\n } else if ((sztype.equalsIgnoreCase(\"Repeat_Prote_Data_is_from\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Prote_Data_is_from[Different time periods,The same time period]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Different time periods\")) {\n\t\t\t\t\t\t\t\tProtealltimeDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"The same time period\")) {\n\t\t\t\t\t\t\t\tProtealltimeDEF = false;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Repeat Prote Data is from it must be either \"\n\t\t\t\t\t\t\t\t\t\t+ \"'Different time periods' or 'The same time period'\\n\";\n\t\t\t\t\t\t\t}\n } else if (sztype.equalsIgnoreCase(\"Normalize_Prote_Data[Log normalize data,Normalize data,No normalization/add 0]\")) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Log normalize data\")) {\n\t\t\t\t\t\t\t\tproteTakeLog = true;\n\t\t\t\t\t\t\t\tproteAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"Normalize data\")) {\n\t\t\t\t\t\t\t\tproteTakeLog = false;\n\t\t\t\t\t\t\t\tproteAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"No normalization/add 0\")) {\n\t\t\t\t\t\t\t\tproteTakeLog = false;\n\t\t\t\t\t\t\t\tproteAddZero = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\tszvalue+ \" is an invalid argument for Normalize_Prote_Data\");\n\t\t\t\t\t\t\t}\n } else if (sztype.equalsIgnoreCase(\"Use Proteomics[No,TF,All]\")){\n if (szvalue.equalsIgnoreCase(\"No\")){\n bProteTF=false;\n bProteAll=false;\n } else if (szvalue.equalsIgnoreCase(\"TF\")){\n bProteTF=true;\n bProteAll=false;\n } else if (szvalue.equalsIgnoreCase(\"All\")){\n bProteAll=true;\n bProteTF=false;\n } else{\n throw new IllegalArgumentException(\n szvalue+\" is not valid\"\n );\n }\n \n } else if (sztype.equalsIgnoreCase(\"PPI File\")){\n djPPIFile=szvalue;\n \n } else if (sztype.equalsIgnoreCase(\"Epigenomic_File\")){\n // parseDefault for epigenomics panel\n djMethyFile=szvalue;\n } else if (sztype.equalsIgnoreCase(\"GTF File\")){\n djMethyGTF=szvalue;\n\t\t\t\t\t\t} else if ((sztype.charAt(0) != '#')) {\n\t\t\t\t\t\t\tszError += \"WARNING: '\" + sztype\n\t\t\t\t\t\t\t\t\t+ \"' is an unrecognized variable.\\n\";\n\t\t\t\t\t\t} \n \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tif (!szError.equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException(szError);\n\t\t\t}\n\t\t} catch (FileNotFoundException ex) {\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFileInputStream fis=new FileInputStream(\"F:\\\\WORKSPACE\\\\OOPS\\\\testdata.properties\");\n\t\t\n\t\tProperties pro=new Properties();\n\t\t\n\t\tpro.load(fis);\n\t\t\n\t\tString Name=pro.getProperty(\"name\");\n\t\t\t\tSystem.out.println(Name);\n\t\t\t\tSystem.out.println(pro.getProperty(\"Name\"));\n\t\t\t\tSystem.out.println(pro.getProperty(\"At.Post\"));\n\t\t\t\tSystem.out.println(pro.getProperty(\"Ta\"));\n\t\t\t\tSystem.out.println(pro.getProperty(\"Dist\"));\n\t\t\t\tSystem.out.println(pro.getProperty(\"Mobile-number\"));\n\t\t\t\tSystem.out.println(pro.getProperty(\"collage\"));\n\t\t\t\tSystem.out.println(pro.getProperty(\"Bike-number\"));\n\t\t\t\t\n\n\t}", "public static Properties getDefaultProperties() {\n Properties json = new Properties();\n json.put(REROUTE_PROPERTY, \"true\");\n json.put(AUTO_CLEAN_PATH_PROPERTY, \"true\");\n json.put(UPLOAD_DIRECTORY_PROP, \"webroot/images/\");\n json.put(UPLOAD_RELATIVE_PATH_PROP, \"images/\");\n return json;\n }", "public final Properties getDefaultProperties() {\n \t\treturn properties;\n \t}", "public List<DataLocation> getInputDataLocations(){\n\treturn defaultDataLocations();\n }", "Properties defaultProperties();", "public static void main(String[] args) throws IOException {\n\t\tFileReader fr = new FileReader(\"./resources/data.properties\");\n\t\tProperties properties = new Properties();\n\t\tproperties.load(fr);\n\t\t\n\t\tString usernameData = properties.getProperty(\"username\");\n\t\tSystem.out.println(usernameData);\n\t}", "private void initData(List<JTextField> fields) {\n Properties config = Utils.loadPropertiesFile(System.getProperty(\"user.dir\") + \"\\\\\" + CONF_FILE_NAME, this.getClass().getClassLoader().getResourceAsStream(CONF_FILE_NAME));\n \n List<String> props = Arrays.asList(\"fromDbDriver\", \"toDbDriver\", \"fromDbUrl\", \"toDbUrl\", \"fromDbUsername\", \"toDbUsername\", \"fromDbPassword\", \"toDbPassword\", \"criteria\");\n \n logger.info(\"Init data from configruation\");\n for (int i = 0; i < fields.size(); i++) {\n String key = props.get(i);\n String value = config.getProperty(key);\n logger.info(\"{} is {} \", key, value);\n fields.get(i).setText(value);\n }\n \n IS_OPEN_LOG_FILE = Utils.parseString2Boolean(config.getProperty(\"openLogFile\"), false);\n DELAY_TIME = Utils.parseString2Long(config.getProperty(\"delayTime\"), PER_SECOND);\n IS_DELETE_ORIGINAL_DATA = Utils.parseString2Boolean(config.getProperty(\"deleteOriginalData\"), true);\n ABORT_WHEN_ABNORMAL_INSERT = Utils.parseString2Boolean(config.getProperty(\"abort\"), false);\n }", "private void readData() {\n // set the values from the stored data\n // initially these are not set, so we need to query for \"containsKey\"...\n if (isTrue(Variable.MAXTRACKS_ENABLED)) {\n jsMaxTracks.setEnabled(true);\n jcbMaxTracks.setSelected(true);\n } else {\n jsMaxTracks.setEnabled(false);\n jcbMaxTracks.setSelected(false);\n }\n if (data.containsKey(Variable.MAXTRACKS)) {\n jsMaxTracks.setValue((Integer) data.get(Variable.MAXTRACKS));\n }\n if (isTrue(Variable.MAXSIZE_ENABLED)) {\n jsMaxSize.setEnabled(true);\n jcbMaxSize.setSelected(true);\n } else {\n jsMaxSize.setEnabled(false);\n jcbMaxSize.setSelected(false);\n }\n if (data.containsKey(Variable.MAXSIZE)) {\n jsMaxSize.setValue((Integer) data.get(Variable.MAXSIZE));\n }\n if (isTrue(Variable.MAXLENGTH_ENABLED)) {\n jsMaxLength.setEnabled(true);\n jcbMaxLength.setSelected(true);\n } else {\n jsMaxLength.setEnabled(false);\n jcbMaxLength.setSelected(false);\n }\n if (data.containsKey(Variable.MAXLENGTH)) {\n jsMaxLength.setValue((Integer) data.get(Variable.MAXLENGTH));\n }\n if (isTrue(Variable.ONE_MEDIA_ENABLED)) {\n jcbMedia.setEnabled(true);\n jcbOneMedia.setSelected(true);\n jcbConvertMedia.setEnabled(true);\n } else {\n jcbMedia.setEnabled(false);\n jcbOneMedia.setSelected(false);\n jcbConvertMedia.setEnabled(false);\n }\n // Check if pacpl can be used, do it every time the dialog starts as the\n // user might have installed it by now\n boolean bPACPLAvailable = UtilPrepareParty.checkPACPL((String) data\n .get(Variable.CONVERT_COMMAND));\n if (!bPACPLAvailable) {\n // disable media conversion if pacpl is not found\n jcbConvertMedia.setEnabled(false);\n }\n // don't set Convert to on from data if PACPL became unavailable\n if (isTrue(Variable.CONVERT_MEDIA) && bPACPLAvailable) {\n jcbConvertMedia.setSelected(true);\n } else {\n jcbConvertMedia.setSelected(false);\n }\n if (data.containsKey(Variable.ONE_MEDIA)) {\n jcbMedia.setSelectedItem(data.get(Variable.ONE_MEDIA));\n } else {\n // default to MP3 initially\n jcbMedia.setSelectedItem(\"mp3\");\n }\n if (data.containsKey(Variable.RATING_LEVEL)) {\n jsRatingLevel.setValue((Integer) data.get(Variable.RATING_LEVEL));\n }\n if (isTrue(Variable.NORMALIZE_FILENAME)) {\n jcbNormalizeFilename.setSelected(true);\n } else {\n jcbNormalizeFilename.setSelected(false);\n }\n }", "public static void main (String[] args) throws IOException{\n\t\tProperties p = new Properties();\r\n\t\tp.load(new FileInputStream(\"./input.properties\"));\r\n\t\t\r\n\t\tString first_car = p.getProperty(\"first_car\");\r\n\t\tString friends_name = p.getProperty(\"frends_name\");\r\n\t\tString favorite_color = p.getProperty(\"favorite_color\");\r\n\t\tSystem.out.println(\"You are driving your \" + favorite_color + \" \" + first_car + \" with your friend \" + friends_name);\r\n\t\t\r\n\t}", "public void setCreationDefaultValues()\n {\n this.setDescription(this.getPropertyID()); // Warning: will be lower-case\n this.setDataType(\"\"); // defaults to \"String\"\n this.setValue(\"\"); // clear value\n //super.setRuntimeDefaultValues();\n }", "public SortedMap<String,String> getDefaultProps(DatabaseLayout db){\n this.db = db;\n if (props == null){\n props = new TreeMap<String,String>();\n //props.put(\"command:\", \"perl hts/scripts/Training.pl hts/scripts/Config.pm\");\n }\n return props;\n }", "@Override\n protected void setInitialValues() {\n overrideProperty.set(false);\n typeProperty.set(\"0800\");\n }", "private void processPropDefaultValues() {\n getMethodsWithAnnotation(component, PropDefault.class).forEach(method -> {\n PropDefault propValidator = method.getAnnotation(PropDefault.class);\n\n String exposedMethodName = exposeExistingJavaMethodToJs(method);\n String propertyName = propValidator.value();\n optionsBuilder.addStatement(\"options.addJavaPropDefaultValue(p.$L, $S)\",\n exposedMethodName,\n propertyName);\n });\n }", "private static Properties loadOverrideProperties() {\n String confFile = System.getProperty(HAPI_PROPERTIES);\n if(confFile != null) {\n try {\n Properties props = new Properties();\n props.load(new FileInputStream(confFile));\n return props;\n }\n catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties file: \" + confFile, e);\n }\n }\n\n return null;\n }", "void addProperties(Map<String, Object> propertiesListInput) {\n for (Map.Entry<String, Object> e : propertiesListInput.entrySet()) {\n if (properties.getProperty(e.getKey()) == null) {\n properties.addProperty(e.getKey(), e.getValue());\n }\n }\n }", "public static void main(String[] args)throws Throwable {\n FileLib flib = new FileLib();\n flib.readPropertyData(\"./data/config.properties\", \"browser\");\n // System.out.println(value); \n\t}", "private Properties loadDefaultProperties() {\n Properties pref = new Properties();\n try {\n String path = \"resources/bundle.properties\";\n InputStream stream = PreferenceInitializer.class.getClassLoader().getResourceAsStream(path);\n pref.load(stream);\n } catch (IOException e) {\n ExceptionHandler.logAndNotifyUser(\"The default preferences for AgileReview could not be initialized.\"\n + \"Please try restarting Eclipse and consider to write a bug report.\", e, Activator.PLUGIN_ID);\n return null;\n }\n return pref;\n }", "private void setDefaultValues() {\n nameInput.setText(\"\");\n frontTrackInput.setText(String.valueOf(RaceCar.getDefaultTrack()));\n cornerWeightFLInput.setText(String.valueOf(RaceCar.DEFAULT_CORNER_WEIGHT_FL()));\n cornerWeightRLInput.setText(String.valueOf(RaceCar.DEFAULT_CORNER_WEIGHT_RL()));\n rearTrackInput.setText(String.valueOf(RaceCar.getDefaultTrack()));\n cornerWeightRRInput.setText(String.valueOf(RaceCar.DEFAULT_CORNER_WEIGHT_RR()));\n cornerWeightFRInput.setText(String.valueOf(RaceCar.DEFAULT_CORNER_WEIGHT_FR()));\n cogInput.setText(String.valueOf(RaceCar.getDefaultCogheight()));\n frontRollDistInput.setText(String.valueOf(RaceCar.getDefaultFrontrolldist()));\n wheelBaseInput.setText(String.valueOf(RaceCar.getDefaultWheelbase()));\n }", "protected void readProperties() {\n\t\tproperties = new HashMap<>();\n\t\tproperties.put(MQTT_PROP_CLIENT_ID, id);\n\t\tproperties.put(MQTT_PROP_BROKER_URL, brokerUrl);\n\t\tproperties.put(MQTT_PROP_KEEP_ALIVE, 30);\n\t\tproperties.put(MQTT_PROP_CONNECTION_TIMEOUT, 30);\n\t\tproperties.put(MQTT_PROP_CLEAN_SESSION, true);\n\t\tproperties.put(MQTT_PROP_USERNAME, user);\n\t\tproperties.put(MQTT_PROP_PASSWORD, password.toCharArray());\n\t\tproperties.put(MQTT_PROP_MQTT_VERSION, MqttConnectOptions.MQTT_VERSION_3_1_1);\n\t}", "private void initializeProperties () throws Exception {\n String userHome = System.getProperty(\"user.home\");\n String userDir = System.getProperty(\"user.dir\");\n String hackyHome = userHome + \"/.hackystat\";\n String sensorBaseHome = hackyHome + \"/sensorbase\"; \n String propFile = userHome + \"/.hackystat/sensorbase/sensorbase.properties\";\n this.properties = new Properties();\n // Set defaults\n properties.setProperty(ADMIN_EMAIL_KEY, \"[email protected]\");\n properties.setProperty(ADMIN_PASSWORD_KEY, \"[email protected]\");\n properties.setProperty(CONTEXT_ROOT_KEY, \"sensorbase\");\n properties.setProperty(DB_DIR_KEY, sensorBaseHome + \"/db\");\n properties.setProperty(DB_IMPL_KEY, \"org.hackystat.sensorbase.db.derby.DerbyImplementation\");\n properties.setProperty(HOSTNAME_KEY, \"localhost\");\n properties.setProperty(LOGGING_LEVEL_KEY, \"INFO\");\n properties.setProperty(SMTP_HOST_KEY, \"mail.hawaii.edu\");\n properties.setProperty(PORT_KEY, \"9876\");\n properties.setProperty(XML_DIR_KEY, userDir + \"/xml\");\n properties.setProperty(TEST_INSTALL_KEY, \"false\");\n properties.setProperty(TEST_DOMAIN_KEY, \"hackystat.org\");\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propFile);\n properties.load(stream);\n System.out.println(\"Loading SensorBase properties from: \" + propFile);\n }\n catch (IOException e) {\n System.out.println(propFile + \" not found. Using default sensorbase properties.\");\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n // Now add to System properties. Since the Mailer class expects to find this stuff on the \n // System Properties, we will add everything to it. In general, however, clients should not\n // use the System Properties to get at these values, since that precludes running several\n // SensorBases in a single JVM. And just is generally bogus. \n Properties systemProperties = System.getProperties();\n systemProperties.putAll(properties);\n System.setProperties(systemProperties);\n }", "@Override\r\n public void initValues() {\r\n try {\r\n crackedPasswords = Files.readAllLines(Paths.get(DefectivePasswordValidatorConstants.PASSWORD_FILE_PATH),\r\n StandardCharsets.UTF_8);\r\n } catch (IOException e) {\r\n log.error(\"Exception occured while reading and initializing values from \"\r\n + DefectivePasswordValidatorConstants.PASSWORD_FILE_NAME, e);\r\n }\r\n }", "@Override\n public void initializeData() throws STException {\n\n // Load the current values and populate the UI controls with the values.\n final IUserPreferenceSvc userPrefSvc = ServiceMgr.getUserPrefSvc() ;\n\n this.useProxy = userPrefSvc.getBoolean( ConfigKey.USE_PROXY, false ) ;\n this.proxyHost = userPrefSvc.getUserPref( ConfigKey.PROXY_HOST, null ) ;\n this.proxyPort = userPrefSvc.getInt( ConfigKey.PROXY_PORT, 80 ) ;\n this.useAuth = userPrefSvc.getBoolean( ConfigKey.USE_AUTH, false ) ;\n this.userName = userPrefSvc.getUserPref( ConfigKey.PROXY_USER, \"\" ) ;\n this.password = userPrefSvc.getUserPref( ConfigKey.PROXY_PWD, \"\" ) ;\n\n super.useProxyCB.setSelected( this.useProxy ) ;\n super.proxyHostTF.setText( this.proxyHost ) ;\n super.proxyPortTF.setText( String.valueOf( this.proxyPort ) ) ;\n super.useProxyAuthCB.setSelected( this.useAuth ) ;\n super.userIdTF.setText( this.userName ) ;\n super.passwordTF.setText( this.password ) ;\n\n // Now attach input verifiers with the UI elements.\n super.proxyHostTF.setInputVerifier( new StringValidator ( super.proxyHostTF ) ) ;\n super.proxyPortTF.setInputVerifier( new IntegerValidator( super.proxyPortTF ) ) ;\n super.userIdTF.setInputVerifier( new StringValidator ( super.userIdTF ) ) ;\n super.passwordTF.setInputVerifier( new StringValidator ( super.passwordTF ) ) ;\n }", "public void readProperties() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n propertyParserXML.readPropertyDefinition(configData.getPropertyList());\r\n propertyParserXML.processPropertyDependency();\r\n }\r\n Log.info(\"info.progress_control.load_property_description\");\r\n }", "private void getParameters() {\r\n\t\ttry {\r\n\t\t\tp_encoding = \"ISO-8859-1\";\r\n\t\t\tp_page_encoding = \"utf-8\";\r\n\t\t\tp_labels_data_file = \"resources/units/labels.txt\";\r\n\t\t\tp_multiplier_data_file = \"resources/units/muldata.txt\";\r\n\t\t\tp_category_data_file = \"resources/units/catdata.txt\";\r\n\t\t\tp_unit_data_file = \"resources/units/unitdata.txt\";\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treadDataFile(0, p_multiplier_data_file); //read data from external text file\r\n\t\treadDataFile(1, p_category_data_file); //read data from external text file\r\n\t\treadDataFile(2, p_unit_data_file); //read data from external text file\r\n\t\treadDataFile(3, p_labels_data_file); //read data from external text file\r\n\t}", "public void configurableDataInput() {\n }", "protected void clearData()\r\n {\r\n System.getProperties().put(\"https.proxyHost\", \"\");\r\n System.getProperties().put(\"https.proxyPort\", \"\");\r\n System.getProperties().put(\"http.proxyHost\", \"\");\r\n System.getProperties().put(\"http.proxyPort\", \"\");\r\n proxyScheme = null;\r\n proxyName = null;\r\n proxyPswd = null;\r\n proxyRealm = null;\r\n proxyPort = null;\r\n proxyHost = null;\r\n been_here = false;\r\n success = false;\r\n message = null;\r\n }", "public ReadPolicyStatDefaultSetting() {\n\t\tsuper();\n\t}", "@Override final protected Object[] getInputDefaults() { return this.InputDefaults; }", "@Test public void testGetPropertiesDefaultBehavior() {\r\n Properties baseProperties = new Properties();\r\n Properties developmentModeProperties = new Properties();\r\n\r\n GaeAwarePropertySource source = new GaeAwarePropertySource();\r\n source.setProductionModeProperties(baseProperties);\r\n source.setDevelopmentModeProperties(developmentModeProperties);\r\n\r\n // local testing will always be non-production).\r\n assertSame(developmentModeProperties, source.getProperties());\r\n }", "private void loadProperties() {\n driver = JiveGlobals.getXMLProperty(\"database.defaultProvider.driver\");\n serverURL = JiveGlobals.getXMLProperty(\"database.defaultProvider.serverURL\");\n username = JiveGlobals.getXMLProperty(\"database.defaultProvider.username\");\n password = JiveGlobals.getXMLProperty(\"database.defaultProvider.password\");\n String minCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.minConnections\");\n String maxCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.maxConnections\");\n String conTimeout = JiveGlobals.getXMLProperty(\"database.defaultProvider.connectionTimeout\");\n // See if we should use Unicode under MySQL\n mysqlUseUnicode = Boolean.valueOf(JiveGlobals.getXMLProperty(\"database.mysql.useUnicode\")).booleanValue();\n try {\n if (minCons != null) {\n minConnections = Integer.parseInt(minCons);\n }\n if (maxCons != null) {\n maxConnections = Integer.parseInt(maxCons);\n }\n if (conTimeout != null) {\n connectionTimeout = Double.parseDouble(conTimeout);\n }\n }\n catch (Exception e) {\n Log.error(\"Error: could not parse default pool properties. \" +\n \"Make sure the values exist and are correct.\", e);\n }\n }", "public void setDefaultData()\n\t\t{\n\t\t\t\n\t\t\t//Creating demo/default ADMIN:\n\t\t\t\n\t\t\tUser testAdmin = new User(\"ADMIN\", \"YAGYESH\", \"123\", 123, Long.parseLong(\"7976648278\"));\n\t\t\tdata.userMap.put(testAdmin.getUserId(), testAdmin);\n\t\t\t\n\t\t\t//Creating demo/default CUSTOMER:\n\t\t\tUser tempCustomer = new User(\"CUSTOMER\", \"JOHN\", \"124\", 124, Long.parseLong(\"9462346459\"));\n\t\t\tdata.userMap.put(tempCustomer.getUserId(), tempCustomer);\n\t\t\t\n\t\t\t//Creating Airports:\n\t\t\tAirport airport1 = new Airport(\"Mumbai Chattrapathi Shivaji International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"MUMBAI\", \"BOM\");\n\t\t\t\n\t\t\tAirport airport2 = new Airport(\"Bangalore Bengaluru International Airport \",\n\t\t\t\t\t\t\t\t\t\t\t\"Bangalore\", \"BLR\");\n\t\t\t\n\t\t\tAirport airport3 = new Airport(\"New Delhi Indira Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"New Delhi \", \"DEL\");\n\n\t\t\tAirport airport4 = new Airport(\"Hyderabad Rajiv Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"Hyderabad\", \"HYD\");\n\n\t\t\tdata.airportMap.put(airport1.getAirportCode(), airport1);\n\t\t\tdata.airportMap.put(airport2.getAirportCode(), airport2);\n\t\t\tdata.airportMap.put(airport3.getAirportCode(), airport3);\n\t\t\tdata.airportMap.put(airport4.getAirportCode(), airport4);\n\t\t\t\n\t\t\t//Creating DateTime Objects:\n\t\t\t\n\t\t\tDate dateTime1 = null;\n\t\t\tDate dateTime2 = null;\n\t\t\tDate dateTime3 = null;\n\t\t\tDate dateTime4 = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdateTime1 = dateFormat.parse(\"12-01-2020 05:12:00\");\n\t\t\t\tdateTime2 = dateFormat.parse(\"02-02-2020 23:45:00\");\n\t\t\t\tdateTime3 = dateFormat.parse(\"12-01-2020 07:12:00\");\n\t\t\t\tdateTime4 = dateFormat.parse(\"03-02-2020 01:45:00\");\n\t\t\t}\n\t\t\tcatch (ParseException e) \n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Creating Schedules:\n\t\t\tSchedule schedule1 = new Schedule(airport1, airport2, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule2 = new Schedule(airport2, airport3, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule3 = new Schedule(airport4, airport1, dateTime4, dateTime2, dateFormat);\n\t\t\tSchedule schedule4 = new Schedule(airport3, airport4, dateTime4, dateTime2, dateFormat);\n\t\t\t\n\t\t\t//Creating Flights:\n\t\t\tFlight flight1 = new Flight(\"AB3456\", \"INDIGO\", \"A330\", 293);\n\t\t\tFlight flight2 = new Flight(\"BO6789\", \"JET AIRWAYS\", \"777\", 440);\n\t\t\tdata.flightMap.put(flight1.getFlightNumber(), flight1);\n\t\t\tdata.flightMap.put(flight2.getFlightNumber(), flight2);\n\t\t\t\n\t\t\t//Creating Scheduled Flights:\n\t\t\tScheduledFlight scheduledFlight1 = new ScheduledFlight(flight1, 293, schedule1);\n\t\t\tScheduledFlight scheduledFlight2 = new ScheduledFlight(flight2, 440, schedule2);\n\t\t\tScheduledFlight scheduledFlight3 = new ScheduledFlight(flight1, 293, schedule3);\n\t\t\tScheduledFlight scheduledFlight4 = new ScheduledFlight(flight2, 440, schedule4);\n\t\t\t\n\t\t\t//Creating List of Scheduled Flights:\n\t\t\tdata.listScheduledFlights.add(scheduledFlight1);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight2);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight3);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight4);\n\n\t\t}", "public InputReader() throws FileNotFoundException, TransformerConfigurationException {\n this.csvlocation = System.getProperty(Static.SYSYEM_PROPERTY_FILE);\n this.templatelocation = System.getProperty(Static.SYSTEM_PROPERTY_TEMPLATE_FILE);\n init();\n }", "@Override\n\tpublic void applyProperties() throws Exception {\n\t\tsuper.setDefaultsIfMissing();\n\n\t\t// Apply own properties\n\t\tthis.inputdelimiter = this.getProperties().getProperty(\n\t\t\t\tPROPERTYKEY_DELIMITER_INPUT,\n\t\t\t\tthis.getPropertyDefaultValues()\n\t\t\t\t\t\t.get(PROPERTYKEY_DELIMITER_INPUT));\n\t\tthis.edgeDesignator = this.getProperties().getProperty(\n\t\t\t\tPROPERTYKEY_EDGEDESIGNATOR,\n\t\t\t\tthis.getPropertyDefaultValues()\n\t\t\t\t\t\t.get(PROPERTYKEY_EDGEDESIGNATOR));\n\n\t\t// Apply parent object's properties (just the name variable actually)\n\t\tsuper.applyProperties();\n\t}", "private void validateProperties() throws BuildException {\r\n if (this.port == null || this.port.length() == 0) {\r\n throw new BuildException(\"Attribute 'port' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.userName == null || this.userName.length() == 0) {\r\n throw new BuildException(\"Attribute 'userName' must be set.\");\r\n }\r\n if (this.password == null || this.password.length() == 0) {\r\n throw new BuildException(\"Attribute 'password' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.p4ExecutablePath == null || this.p4ExecutablePath.length() == 0) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' must be set.\");\r\n }\r\n File p4Executable = new File(this.p4ExecutablePath);\r\n if (!p4Executable.exists()) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' \" + this.p4ExecutablePath +\r\n \" does not appear to point to an actual file.\");\r\n }\r\n \r\n // If default* is specified, then all should be specified. \r\n if (((this.defaultHackystatAccount != null) || \r\n (this.defaultHackystatPassword != null) ||\r\n (this.defaultHackystatSensorbase != null)) &&\r\n ((this.defaultHackystatAccount == null) || \r\n (this.defaultHackystatPassword == null) ||\r\n (this.defaultHackystatSensorbase == null))) {\r\n throw new BuildException (\"If one of default Hackystat account, password, or sensorbase \" +\r\n \"is specified, then all must be specified.\");\r\n }\r\n \r\n // Check to make sure that defaultHackystatAccount looks like a real email address.\r\n if (!ValidateEmailSyntax.isValid(this.defaultHackystatAccount)) {\r\n throw new BuildException(\"Attribute 'defaultHackystatAccount' \" + this.defaultHackystatAccount\r\n + \" does not appear to be a valid email address.\");\r\n }\r\n \r\n // If fromDate and toDate not set, we extract commit information for the previous day.\r\n if (this.fromDateString == null && this.toDateString == null) {\r\n Day previousDay = Day.getInstance().inc(-1);\r\n this.fromDate = new Date(previousDay.getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(previousDay.getLastTickOfTheDay());\r\n }\r\n else {\r\n try {\r\n if (this.hasSetToAndFromDates()) {\r\n this.fromDate = new Date(Day.getInstance(this.dateFormat.parse(this.fromDateString))\r\n .getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(Day.getInstance(this.dateFormat.parse(this.toDateString))\r\n .getLastTickOfTheDay());\r\n }\r\n else {\r\n throw new BuildException(\r\n \"Attributes 'fromDate' and 'toDate' must either be both set or both not set.\");\r\n }\r\n }\r\n catch (ParseException ex) {\r\n throw new BuildException(\"Unable to parse 'fromDate' or 'toDate'.\", ex);\r\n }\r\n\r\n if (this.fromDate.compareTo(this.toDate) > 0) {\r\n throw new BuildException(\"Attribute 'fromDate' must be a date before 'toDate'.\");\r\n }\r\n }\r\n }", "protected void setConfigsFromInput(ExternalMailInput input) throws Exception\n {\n // Instantiate some attributes\n konakartAPI = input.getKonakartAPI();\n context = input.getContext();\n if (context != null)\n {\n storeOwner = (String) context.get(\"storeOwner\");\n storeOwnerEmailAddr = (String) context.get(\"storeOwnerEmailAddr\");\n storeName = (String) context.get(\"storeName\");\n storeId = (String) context.get(\"storeId\");\n imageBaseUrl = (String) context.get(\"imageBaseUrl\");\n templateBase = (String) context.get(\"templateBase\");\n displayPricesWithTax = ((Boolean) context.get(\"displayPricesWithTax\")).booleanValue();\n customerName = (String) context.get(\"customerName\");\n appCustomer = (Customer) context.get(\"customer\");\n adminCustomer = (AdminCustomer) context.get(\"cust\");\n }\n if (customerName == null && adminCustomer != null)\n {\n customerName = getFormattedCustomerName(adminCustomer);\n }\n if (input.getEmailTemplate() != null)\n {\n emailSubject = input.getEmailTemplate().getSubject();\n emailBody = input.getEmailTemplate().getBody();\n }\n emailAddr = input.getEmailAddr();\n if (input.getAppOptions() != null)\n {\n countryCode = input.getAppOptions().getCountryCode();\n templateName = input.getAppOptions().getTemplateName();\n }\n if (input.getAdminOptions() != null)\n {\n countryCode = input.getAdminOptions().getCountryCode();\n templateName = input.getAdminOptions().getTemplateName();\n }\n if (input.getAdminEmailData() != null)\n {\n emailAddr = input.getAdminEmailData().getToAddress();\n emailSubject = input.getAdminEmailData().getSubject();\n emailBody = input.getAdminEmailData().getMessage();\n // Some mail providers don't accept an empty message\n if (emailBody == null || emailBody.length() == 0)\n {\n emailBody = \" \";\n }\n doBlindCopy = input.getAdminEmailData().isSendBlindCopies();\n }\n\n // Override values from config variables\n if (input.getAppOptions() != null)\n {\n /*\n * Mail sent from Application\n */\n if (input.getAppOptions().getFromAddress() != null)\n {\n setFromAddressStr(input.getAppOptions().getFromAddress());\n } else if (input.getAppOptions().getReplyToAddress() != null)\n {\n setReplyToAddressStr(input.getAppOptions().getReplyToAddress());\n } else if (input.getAppOptions().getBccEmails() != null\n && input.getAppOptions().getBccEmails().length() > 0)\n {\n bccEmailsStrArray = input.getAppOptions().getBccEmails().split(\";\");\n }\n\n if (input.getAppOptions().getContentType() == KKConstants.EMAIL_AS_HTML)\n {\n contentType = \"text/html\";\n } else if (input.getAppOptions().getContentType() == KKConstants.EMAIL_AS_PLAIN_TEXT)\n {\n contentType = \"text/plain\";\n } else\n {\n log.warn(\"Unrecognised Email ContentType: \"\n + input.getAppOptions().getContentType());\n contentType = \"text/html\";\n }\n\n fullAttachmentFilename = input.getAppOptions().getFullAttachmentFilename();\n friendlyAttachmentName = input.getAppOptions().getFriendlyAttachmentName();\n deleteAttachmentAfterSend = input.getAppOptions().isDeleteAttachmentAfterSend();\n } else if (input.getAdminEmailData() != null)\n {\n /*\n * Mail sent using admin API call sendEmail\n */\n if (input.getAdminEmailData().getFromAddress() != null)\n {\n setFromAddressStr(input.getAdminEmailData().getFromAddress());\n } else if (input.getAdminEmailData().getReplyToAddress() != null)\n {\n setReplyToAddressStr(input.getAdminEmailData().getReplyToAddress());\n } else if (input.getAdminEmailData().getBccEmails() != null\n && input.getAdminEmailData().getBccEmails().length() > 0)\n {\n bccEmailsStrArray = input.getAdminEmailData().getBccEmails().split(\";\");\n }\n\n if (input.getAdminEmailData().getContentType() == KKConstants.EMAIL_AS_HTML)\n {\n contentType = \"text/html\";\n } else if (input.getAdminEmailData()\n .getContentType() == KKConstants.EMAIL_AS_PLAIN_TEXT)\n {\n contentType = \"text/plain\";\n } else\n {\n log.warn(\"Unrecognised Email ContentType: \"\n + input.getAdminEmailData().getContentType());\n contentType = \"text/html\";\n }\n\n if (input.getAdminEmailData().getSynchronousity() == KKConstants.EMAIL_ASYNCHRONOUS)\n {\n isAsync = true;\n } else if (input.getAdminEmailData()\n .getSynchronousity() == KKConstants.EMAIL_SYNCHRONOUS)\n {\n isAsync = false;\n }\n } else if (input.getAdminOptions() != null)\n {\n /*\n * Mail sent from Admin App\n */\n if (input.getAdminOptions().getFromAddress() != null)\n {\n setFromAddressStr(input.getAdminOptions().getFromAddress());\n } else if (input.getAdminOptions().getReplyToAddress() != null)\n {\n setReplyToAddressStr(input.getAdminOptions().getReplyToAddress());\n } else if (input.getAdminOptions().getBccEmails() != null\n && input.getAdminOptions().getBccEmails().length() > 0)\n {\n bccEmailsStrArray = input.getAdminOptions().getBccEmails().split(\";\");\n }\n\n if (input.getAdminOptions().getContentType() == KKConstants.EMAIL_AS_HTML)\n {\n contentType = \"text/html\";\n } else if (input.getAdminOptions().getContentType() == KKConstants.EMAIL_AS_PLAIN_TEXT)\n {\n contentType = \"text/plain\";\n } else\n {\n log.warn(\"Unrecognised Email ContentType: \"\n + input.getAdminOptions().getContentType());\n contentType = \"text/html\";\n }\n\n if (input.getAdminOptions().getSynchronousity() == KKConstants.EMAIL_ASYNCHRONOUS)\n {\n isAsync = true;\n } else if (input.getAdminOptions().getSynchronousity() == KKConstants.EMAIL_SYNCHRONOUS)\n {\n isAsync = false;\n }\n\n fullAttachmentFilename = input.getAdminOptions().getFullAttachmentFilename();\n friendlyAttachmentName = input.getAdminOptions().getFriendlyAttachmentName();\n deleteAttachmentAfterSend = input.getAdminOptions().isDeleteAttachmentAfterSend();\n }\n\n /*\n * Get specific data depending on type of mail being sent\n */\n if (input.getType() == ExternalMailInput.MAIL_FROM_APP)\n {\n\n if (input.getKonakartAPI().equals(sendTemplateEmailToCustomer1))\n {\n message = (String) context.get(\"message\");\n\n } else if (input.getKonakartAPI().equals(sendOrderConfirmationEmail1))\n {\n appOrder = (Order) context.get(\"order\");\n vendorOrders = (Order[]) context.get(\"vendorOrders\");\n } else if (input.getKonakartAPI().equals(sendStockReorderEmail))\n {\n productName = (String) context.get(\"productName\");\n productQuantity = ((Integer) context.get(\"productQuantity\")).intValue();\n productId = ((Integer) context.get(\"productId\")).intValue();\n sku = (String) context.get(\"sku\");\n } else if (input.getKonakartAPI().equals(sendWelcomeEmail1))\n {\n\n } else if (input.getKonakartAPI().equals(sendNewPassword1))\n {\n doBlindCopy = false;\n newPassword = (String) context.get(\"newPassword\");\n expiryMins = ((Integer) context.get(\"expiryMins\")).intValue();\n } else\n {\n throw new KKException(\"Unknwown KonaKart API - \" + input.getKonakartAPI());\n }\n\n } else if (input.getType() == ExternalMailInput.MAIL_FROM_ADMIN)\n {\n // Special case that doesn't use a Velocity Context\n if (input.getKonakartAPI().equals(sendEmail))\n {\n\n } else if (input.getKonakartAPI().equals(resetCustomerPassword))\n {\n doBlindCopy = false;\n newPassword = (String) context.get(\"newPassword\");\n expiryMins = ((Integer) context.get(\"expiryMins\")).intValue();\n } else if (input.getKonakartAPI().equals(sendStatusChangeEmailForState))\n {\n adminOrder = (AdminOrder) context.get(\"order\");\n } else if (input.getKonakartAPI().equals(sendTemplateEmail))\n {\n } else\n {\n throw new KKException(\"Unknwown KonaKart Admin API - \" + input.getKonakartAPI());\n }\n }\n }", "protected void initVars() {\n prefFile = \"./server.ini\";\n mimeFile = \"./mime.ini\";\n }", "private void loadDefaultValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n e.getKey().setText(Pref.getDefault(this, e.getValue()));\n }\n }", "public\n void setPropertiesDefaults(YutilProperties argprops)\n {\n if (argprops == null)\n return;\n\n // Copy all key/val pairs\n for (Enumeration ep = argprops.propertyNames(); ep.hasMoreElements(); )\n {\n String key = (String)ep.nextElement();\n String val = key + \"=\" + argprops.getProperty(key);\n setPropertiesDefaults(val, false);\n }\n }", "public void init()\n {\n try\n {\n userPasswordsProperties = new Properties();\n userPasswordsProperties.load(new FileInputStream(userPasswordsPropertiesFileName));\n log.info(\"Successfully initialized. UsersPasswords property file is: \" + userPasswordsPropertiesFileName);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"UserNamesPropertyFile name: \" + userPasswordsPropertiesFileName + \" not valid. Error: \" + e);\n }\n \n }", "private void init (Properties props) throws FileNotFoundException {\n\t\t\n\t\tport = Integer.parseInt (props.getProperty (AposNtrip.PROP_PORT));\n\t\tString userName = props.getProperty (AposNtrip.PROP_USERNAME);\n\t\tString password = props.getProperty (AposNtrip.PROP_PASSWORD);\n\t\tString mountPoint = props.getProperty (AposNtrip.PROP_MOUNTPOINT);\n\t\t\n\t\tbyte[] encodedPassword = ( userName + \":\" + password ).getBytes();\n\t Base64 encoder = new Base64 ();\n\t basicAuthentication = encoder.encode( encodedPassword );\n\t\n\t expectedRequest = \"GET /\" + mountPoint + \" HTTP/1.0\";\n\t expectedUserAgent = \"User-Agent: .*\";\n\t expectedAuthorisation = \"Authorization: Basic \" + (new String (basicAuthentication));\n\t expectedLocation = props.getProperty (PROP_EXPECTED_LOCATION);\n\t \n\t System.out.println (\"AposNtripCasterMock: expectedRequest=\" + expectedRequest);\n\t System.out.println (\"AposNtripCasterMock: expectedUserAgent=\" + expectedUserAgent);\n\t System.out.println (\"AposNtripCasterMock: expectedAuthorisation=\" + expectedAuthorisation);\n\t \n\t String fileName = props.getProperty (PROP_INPUT_DATA_FILE);\n\t\tURL url = Thread.currentThread ().getContextClassLoader ().getResource (fileName);\n\t\t\n\t\tif (url == null)\n\t\t\tthrow new FileNotFoundException (fileName);\n\t\t\n\t\tinputDataFile = new File (url.getFile ());\n\t}", "public\n void setProperties(InputStream in)\n {\n if (in == null)\n return;\n\n try {\n load(in);\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }", "public void testReadCustomPropertiesFromFiles() throws Throwable\n {\n final AllDataFilesTester.TestTask task = new AllDataFilesTester.TestTask()\n {\n public void runTest(final File file) throws FileNotFoundException,\n IOException, NoPropertySetStreamException,\n MarkUnsupportedException,\n UnexpectedPropertySetTypeException\n {\n /* Read a test document <em>doc</em> into a POI filesystem. */\n final POIFSFileSystem poifs = new POIFSFileSystem(new FileInputStream(file));\n final DirectoryEntry dir = poifs.getRoot();\n DocumentEntry dsiEntry = null;\n try\n {\n dsiEntry = (DocumentEntry) dir.getEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME);\n }\n catch (FileNotFoundException ex)\n {\n /*\n * A missing document summary information stream is not an error\n * and therefore silently ignored here.\n */\n }\n\n /*\n * If there is a document summry information stream, read it from\n * the POI filesystem, else create a new one.\n */\n DocumentSummaryInformation dsi;\n if (dsiEntry != null)\n {\n final DocumentInputStream dis = new DocumentInputStream(dsiEntry);\n final PropertySet ps = new PropertySet(dis);\n dsi = new DocumentSummaryInformation(ps);\n }\n else\n dsi = PropertySetFactory.newDocumentSummaryInformation();\n final CustomProperties cps = dsi.getCustomProperties();\n \n if (cps == null)\n /* The document does not have custom properties. */\n return;\n\n for (final Iterator i = cps.entrySet().iterator(); i.hasNext();)\n {\n final Map.Entry e = (Entry) i.next();\n final CustomProperty cp = (CustomProperty) e.getValue();\n cp.getName();\n cp.getValue();\n }\n }\n };\n\n final String dataDirName = System.getProperty(\"HPSF.testdata.path\");\n final File dataDir = new File(dataDirName);\n final File[] docs = dataDir.listFiles(new FileFilter()\n {\n public boolean accept(final File file)\n {\n return file.isFile() && file.getName().startsWith(\"Test\");\n }\n });\n\n for (int i = 0; i < docs.length; i++)\n {\n task.runTest(docs[i]);\n }\n }", "public void init() {\n this.properties = loadProperties(\"/project3.properties\");\n }", "@BeforeTest\n\t\tpublic void propCalling() throws IOException\n\t\t{\n\t\t\t\n\t\t\tIntializingProperties();\n\t\t}", "private void getData() {\r\n Properties config = new Properties();\r\n\tFileInputStream input = null;\r\n\ttry {\r\n input = new FileInputStream(\"src/signupsigninserver/config/connection.properties\");\r\n config.load(input);\r\n port=Integer.parseInt(config.getProperty(\"port\"));\r\n maxThreads=Integer.parseInt(config.getProperty(\"max_threads\"));\r\n \r\n } catch (FileNotFoundException ex) {\r\n LOGGER.info(\"No encuentra archivo\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ILogicImplementation.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (input != null)\r\n\t\ttry {\r\n input.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ILogicImplementation.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n\t}\r\n }", "private void restoreProperties() {\n restoreModeAndItemValue();\n restoreStringValue(Variable.DEST_PATH);\n restoreBooleanValue(Variable.MAXTRACKS_ENABLED);\n restoreIntValue(Variable.MAXTRACKS);\n restoreBooleanValue(Variable.MAXSIZE_ENABLED);\n restoreIntValue(Variable.MAXSIZE);\n restoreBooleanValue(Variable.MAXLENGTH_ENABLED);\n restoreIntValue(Variable.MAXLENGTH);\n restoreBooleanValue(Variable.ONE_MEDIA_ENABLED);\n restoreStringValue(Variable.ONE_MEDIA);\n restoreBooleanValue(Variable.CONVERT_MEDIA);\n restoreStringValue(Variable.CONVERT_COMMAND);\n if (StringUtils.isBlank((String) data.get(Variable.CONVERT_COMMAND))) {\n data.put(Variable.CONVERT_COMMAND, \"pacpl\"); // use default value if none set\n // yet\n }\n restoreBooleanValue(Variable.NORMALIZE_FILENAME);\n restoreIntValue(Variable.RATING_LEVEL);\n }", "public static void basefn() throws IOException {\r\n\t\t//Below line creates an object of Properties called 'prop'\r\n\t\tprop = new Properties(); \r\n\t\t\r\n\t\t//Below line creates an object of FileInputStream called 'fi'. Give the path of the properties file which you have created\r\n\t\tFileInputStream fi = new FileInputStream(\"D:\\\\Java\\\\workspace\\\\Buffalocart\\\\src\\\\test\\\\resources\\\\config.properties\");\r\n\t\t\r\n\t\t//Below line of code will load the property file\r\n\t\tprop.load(fi);\t\t\t\t\r\n\t}", "public static String readProperties_TD(String data) throws Exception{\n\n\t\treturn SetObjectProperties.appConfig.getPropertyValue(data);\n\t}", "protected void setProperties(final UIComponent component) {\n\t\tsuper.setProperties(component); //set the default properties\n\t\tsetFileValue(component, UIInputFile.DIRECTORY_VAR, getDirectory()); //set the directory\n\t\tsetStringValue(component, UIInputFile.FILENAME_VAR, getFilename()); //set the filename\n\t}", "public Properties getProps(String input) {\r\n\t\tInputStream fstream = null;\r\n\t\ttry {\r\n\t\t\tprops = new Properties();\r\n\t\t\tfstream = Thread.currentThread().getContextClassLoader().getResourceAsStream(input);\r\n\t\t\tprops.load(fstream);\r\n\t\t\t\r\n\t\t\tfstream.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tprops = null;\r\n\t\t} \r\n\t\t\r\n\t\treturn props;\r\n\t}", "@Override\n public void loadDefaultConfig() {\n currentConfigFileName = defaultConfigFileName;\n mesoCfgXML = (SCANConfigMesoXML) readDefaultConfig();\n createAttributeMap(getAttributes());\n }", "private static void getProjectProperties(final ProjectProperties props, final boolean packageNameSet, \n final boolean baseClassSet) \n throws IOException\n {\n final BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String outString = String.format(\"Enter Project Name (%s): \", props.getProjectName());\n OUT_STREAM.print(outString);\n String inputString = input.readLine();\n if (inputString != null && !inputString.isEmpty())\n {\n props.setProjectName(inputString);\n }\n\n /*\n * TODO: TH-389 use when sdk is functional for previous api versions\n outString = String.format(\"Enter API Version (%s): \", props.getApiVersion());\n OUT_STREAM.print(outString);\n inputString = input.readLine();\n if (!Strings.isNullOrEmpty(inputString))\n {\n props.setApiVersion(inputString); \n }\n */\n\n outString = String.format(\"Enter Description (%s): \", props.getDescription());\n OUT_STREAM.print(outString);\n inputString = input.readLine();\n if (!Strings.isNullOrEmpty(inputString))\n {\n props.setDescription(inputString);\n }\n\n if (!packageNameSet)\n {\n outString = String.format(\"Enter Package Name (%s): \", props.getPackageName());\n OUT_STREAM.print(outString);\n inputString = input.readLine();\n if (!Strings.isNullOrEmpty(inputString))\n {\n props.setPackageName(inputString);\n }\n }\n \n //only ask for type if the type of project is a physical link.\n if (props.getProjectType().equals(ProjectType.PROJECT_PHYLINK) && !baseClassSet)\n {\n promptPhysicalLinkTypeEnum(input, props);\n }\n \n outString = String.format(\"Enter Vendor (%s): \", props.getVendor());\n OUT_STREAM.print(outString);\n inputString = input.readLine();\n if (!Strings.isNullOrEmpty(inputString))\n {\n props.setVendor(inputString);\n }\n }", "public void clearProperties(){\n\t\tcbDataType.setSelectedIndex(DT_INDEX_NONE);\n\t\tchkVisible.setValue(false);\n\t\tchkEnabled.setValue(false);\n\t\tchkLocked.setValue(false);\n\t\tchkRequired.setValue(false);\n\t\ttxtDefaultValue.setText(null);\n\t\ttxtHelpText.setText(null);\n\t\ttxtText.setText(null);\n\t\ttxtBinding.setText(null);\n\t\ttxtDescTemplate.setText(null);\n\t\ttxtCalculation.setText(null);\n\t\ttxtFormKey.setText(null);\n\t}", "public static void ReadConfig() throws IOException\r\n {\r\n ReadConfiguration read= new ReadConfiguration(\"settings/FabulousIngest.properties\");\r\n \t \r\n fedoraStub =read.getvalue(\"fedoraStub\");\r\n \t username = read.getvalue(\"fedoraUsername\");\r\n \t password =read.getvalue(\"fedoraPassword\");\r\n \t pidNamespace =read.getvalue(\"pidNamespace\");\r\n \t contentAltID=read.getvalue(\"contentAltID\");\r\n \t \r\n \t \r\n \t ingestFolderActive =read.getvalue(\"ingestFolderActive\");\r\n \t ingestFolderInActive =read.getvalue(\"ingestFolderInActive\");\r\n \t\r\n logFileNameInitial=read.getvalue(\"logFileNameInitial\");\r\n \r\n DataStreamID=read.getvalue(\"DataStreamID\");\r\n \t DataStreamLabel=read.getvalue(\"DataStreamLabel\");\r\n \r\n \r\n \r\n }", "public static void main(String[] args) {\n\t\treadPropertiesFile();\n\t\twritePropertiesFile();\n\t\treadPropertiesFile();\n\n\t}", "public static void main(String args[]) throws IOException {\n\t\tProperties property = new Properties();\n\n\t\tOutputStream out = null;\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.println(\"Enter your id:\");\n\t\tint id = Integer.parseInt(br.readLine());\n\n\t\tSystem.out.println(\"Enter your Name:\");\n\t\tString name = br.readLine();\n\n\t\tSystem.out.println(\"Enter your Salary:\");\n\t\tint salary = Integer.parseInt(br.readLine());\n\n\t\ttry {\n\n\t\t\tStringWriter output = new StringWriter();\n\t\t\tout = new FileOutputStream(\"data.properties\");\n\t\t\t/**\n\t\t\t * Properties of property file is set\n\t\t\t */\n\t\t\tproperty.setProperty(\"Id\", String.valueOf(id));\n\t\t\tproperty.setProperty(\"Name\", name);\n\t\t\tproperty.setProperty(\"Salary\", String.valueOf(salary));\n\n\t\t\t/**\n\t\t\t * store the properties list in an output writer\n\t\t\t */\n\t\t\tproperty.store(output, \"Hii \" + name + \" Here are the properties\");\n\n\t\t\t/**\n\t\t\t * store the properties list in a file named data.properties\n\t\t\t */\n\t\t\tproperty.store(out, \"Hello \" + name + \" Here are the properties\");\n\n\t\t\tSystem.out.println(output.toString());\n\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "public static void loadProperties()\n {\n Properties props = new Properties();\n try {\n props.load( new BufferedInputStream( ClassLoader.getSystemResourceAsStream(\"bench.properties\") ) );\n } catch (IOException ioe)\n {\n logger.log(Level.SEVERE, ioe.getMessage());\n }\n props.putAll(System.getProperties()); //overwrite\n System.getProperties().putAll(props);\n }", "public\n YutilProperties(String argv[])\n {\n super(new Properties());\n setPropertiesDefaults(argv);\n }", "private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }", "@Override\n public void configureInputJobProperties(TableDesc tableDesc, Map<String, String> jobProperties) {\n Properties tableProperties = tableDesc.getProperties();\n\n transferProperty(tableProperties, jobProperties, Keys.TABLE_NAME, true);\n transferProperty(tableProperties, jobProperties, Keys.ACCOUNT_URI, true);\n transferProperty(tableProperties, jobProperties, Keys.STORAGE_KEY, true);\n transferProperty(tableProperties, jobProperties, Keys.PARTITIONER_CLASS, false);\n transferProperty(tableProperties, jobProperties, Keys.REQUIRE_FIELD_EXISTS, false);\n }", "public static void main(String... args) {\n // lookup a file sspecified in the properties file\n String propertyName = \"PPI_INTACT_FILE\";\n String filePath = FrameworkPropertyService.INSTANCE.getStringProperty(propertyName);\n edu.jhu.fcriscu1.als.graphdb.util.AsyncLoggingService.logInfo(\"Property: \" +propertyName +\" value: \"+filePath);\n // look up a resource file\n propertyName = \"TEST_PROACT_ADVERSE_EVENT_FILE\";\n FrameworkPropertyService.INSTANCE.getOptionalResourcePath(propertyName)\n .ifPresent(path -> System.out.println(\"Resource path = \" +path.toString()));\n // look up bad property - should get error message\n propertyName = \"XXXXXXXXXX\";\n String badValue = FrameworkPropertyService.INSTANCE.getStringProperty(propertyName);\n }", "@Parameterized.Parameters(name = \"{0}_{1}\")\n public static Collection inputs()\n {\n getEnvironmentVariables();\n return inputsCommon();\n }", "@Override\n public Properties getDefaultPropertyValues(String tenantDomain) throws IdentityGovernanceException {\n String enablePasswordExpiry = PasswordPolicyConstants.FALSE;\n String passwordExpiryInDays =\n String.valueOf(PasswordPolicyConstants.CONNECTOR_CONFIG_PASSWORD_EXPIRY_IN_DAYS_DEFAULT_VALUE);\n\n String enablePasswordExpiryProperty = IdentityUtil.getProperty(\n PasswordPolicyConstants.CONNECTOR_CONFIG_ENABLE_PASSWORD_EXPIRY);\n String passwordExpiryInDaysProperty = IdentityUtil.getProperty(\n PasswordPolicyConstants.CONNECTOR_CONFIG_PASSWORD_EXPIRY_IN_DAYS);\n\n if (StringUtils.isNotBlank(enablePasswordExpiryProperty)) {\n enablePasswordExpiry = enablePasswordExpiryProperty;\n }\n if (StringUtils.isNotBlank(passwordExpiryInDaysProperty)) {\n passwordExpiryInDays = passwordExpiryInDaysProperty;\n }\n Map<String, String> defaultProperties = new HashMap<>();\n defaultProperties.put(PasswordPolicyConstants.CONNECTOR_CONFIG_ENABLE_PASSWORD_EXPIRY, enablePasswordExpiry);\n defaultProperties.put(PasswordPolicyConstants.CONNECTOR_CONFIG_PASSWORD_EXPIRY_IN_DAYS, passwordExpiryInDays);\n\n Properties properties = new Properties();\n properties.putAll(defaultProperties);\n return properties;\n }", "public void getPropValues() throws IOException {\r\n try {\r\n Properties prop = new Properties();\r\n String path = System.getProperty(\"user.dir\") +\"\\\\src\\\\es\\\\udc\\\\redes\\\\webserver\\\\resources\\\\\";\r\n\t String filename = \"config.properties\";\r\n inputStream = new FileInputStream(path+filename);\r\n if (inputStream != null) {\r\n prop.load(inputStream);\r\n } else {\r\n\t\tthrow new FileNotFoundException(\"property file '\"+path + filename + \"' not found\");\r\n }\r\n\t // get the property value and set in attributes\r\n\t this.PORT = prop.getProperty(\"PORT\");\r\n this.DIRECTORY_INDEX = prop.getProperty(\"DIRECTORY_INDEX\");\r\n this.DIRECTORY = System.getProperty(\"user.dir\")+ prop.getProperty(\"DIRECTORY\");\r\n this.ALLOW = prop.getProperty(\"ALLOW\");\r\n this.HOSTNAME = prop.getProperty(\"HOSTNAME\");\r\n System.out.println();\r\n } catch (Exception e) {\r\n\t\tSystem.out.println(\"Exception: \" + e);\r\n\t} finally {\r\n\t\tinputStream.close();\r\n\t}\r\n }", "private static boolean fetchDefaultData() {\n if (!Data.DEBUG) return false;\n System.err.println(\"We cannot fetch from any online sources, so default weather data has been injected.\");\n sky = Util.rand(\"partly sunny\", \"mostly cloudy\", \"rainy\", \"mostly sunny\");\n windDir = Util.rand(\"north\", \"south\", \"east\", \"west\");\n windSpeed = Util.rand(0, 5, 10, 15);\n temp = Util.rand(40, 50, 60, 70, 80);\n sunriseHour = 6.5;\n sunsetHour = 20.0;\n return true;\n }", "protected Properties loadData() {\n/* 362 */ Properties mapData = new Properties();\n/* */ try {\n/* 364 */ mapData.load(WorldMapView.class.getResourceAsStream(\"worldmap-small.properties\"));\n/* 365 */ } catch (IOException e) {\n/* 366 */ e.printStackTrace();\n/* */ } \n/* */ \n/* 369 */ return mapData;\n/* */ }", "public static void read_paramenters() {\n\t\ttry {\n\t\t // TODO CA: check that this work on Windows!\n String home = System.getProperty(\"user.home\");\n File parametersFile = new File(home + \"/\" + parametersFilename);\n\t\t\tScanner sc = new Scanner(parametersFile);\n\t\t\twhile (sc.hasNext()) {\n\t\t\t\tinitialize_parameters(sc.nextLine());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Error: File \" + parametersFilename + \" not found!\");\n\t\t\tSystem.out.println(\"Make sure that file \" + parametersFilename + \" is in the correct format!\");\n\t\t\tSystem.out.println(\"The format of the file is:\");\n\t\t\tSystem.out.println(\"host ap-dev.cs.ucy.ac.cy\");\n\t\t\tSystem.out.println(\"port 43\");\n\t\t\tSystem.out.println(\"cache res/\");\n\t\t\tSystem.out.println(\"access_token <api_key> \" +\n \"[The API key has be generated based on your google account through the anyplace architect]\");\n\t\t\t// TODO CA: when this error is shown, prompt, with Y or N to initialize that file with defaults\n // if yes, then read parameters again\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "private void loadProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Loading Properties from {}\", path.toString());\n try {\n FileInputStream fis = new FileInputStream(getSamplePropertiesPath().toFile());\n Properties properties = new Properties();\n properties.load(fis);\n\n String privateKey = properties.getProperty(PRIVATE_KEY);\n this.credentials = Credentials.create(privateKey);\n this.contract1Address = properties.getProperty(CONTRACT1_ADDRESS);\n this.contract2Address = properties.getProperty(CONTRACT2_ADDRESS);\n this.contract3Address = properties.getProperty(CONTRACT3_ADDRESS);\n this.contract4Address = properties.getProperty(CONTRACT4_ADDRESS);\n this.contract5Address = properties.getProperty(CONTRACT5_ADDRESS);\n this.contract6Address = properties.getProperty(CONTRACT6_ADDRESS);\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "public void setUpTestdata() {\n\t\tsetDefaultUserName(Config.getProperty(\"defaultUserName\"));\r\n\t\tsetDefaultPassword(Config.getProperty(\"defaultPassword\"));\r\n\t\tsetTestsiteurl(Config.getProperty(\"testsiteurl\"));\r\n\t\tsetChromeDriverPath(Config.getProperty(\"chromeDriverPath\"));\r\n\t\tsetGeckoDriverPath(Config.getProperty(\"geckoDriverPath\"));\r\n\t\tsetIeDriverPath(Config.getProperty(\"ieDriverPath\"));\r\n\t}", "@Override\n\tpublic void loadProperties() {\n\t\tPropertySet mPropertySet = PropertySet.getInstance();\n\t\tdouble kp = mPropertySet.getDoubleValue(\"angleKp\", 0.05);\n\t\tdouble ki = mPropertySet.getDoubleValue(\"angleKi\", 0.0);\n\t\tdouble kd = mPropertySet.getDoubleValue(\"angleKd\", 0.0001);\n\t\tdouble maxTurnOutput = mPropertySet.getDoubleValue(\"turnPIDMaxMotorOutput\", Constants.kDefaultTurnPIDMaxMotorOutput);\n\t\tmAngleTolerance = mPropertySet.getDoubleValue(\"angleTolerance\", Constants.kDefaultAngleTolerance);\n\t\tsuper.setPID(kp, ki, kd);\n\t\tsuper.setOutputRange(-maxTurnOutput, maxTurnOutput);\n\t}", "public void initDefaultValues() {\n }", "private void setDefaultValues()\r\n\t{\r\n\t\tif (m_receiverAddress == null || m_receiverAddress.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_receiverAddress = \"[email protected]\";\r\n\t\t}\r\n\r\n\t\tif (m_replyAddress == null || m_replyAddress.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_replyAddress = \"no return\";\r\n\t\t}\r\n\r\n\t\tif (m_senderName == null || m_senderName.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_senderName = \"Unknown Sender\";\r\n\t\t}\r\n\r\n\t\tif (m_subject == null || m_subject.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_subject = \"AN.ON support request\";\r\n\t\t}\r\n\r\n\t\tif (m_bodyText == null || m_bodyText.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_bodyText = \"message is empty\";\r\n\t\t}\r\n\r\n\t}", "private void initializeTestProperties(InputStream is)\n throws IOException, MissingRequiredTestPropertyException\n {\n testProperties.load(is);\n \n // TODO This method should perform validation, i.e. make sure that properties\n // that are required for Java are set when they should be set, etc. We\n // should fail as soon as we have a test.properties file that doesn't make sense\n // (at load time) rather than waiting until we try to load a property that is broken\n setLanguage(getRequiredStringProperty(BUILD_LANGUAGE));\n setPerformCodeCoverage(getOptionalBooleanProperty(PERFORM_CODE_COVERAGE, false));\n setMaxDrainOutputInBytes(getOptionalIntegerProperty(MAX_DRAIN_OUTPUT_IN_BYTES, DEFAULT_MAX_DRAIN_OUTPUT_IN_BYTES));\n setJavaSourceVersion(getOptionalStringProperty(SOURCE_VERSION, DEFAULT_JAVA_SOURCE_VERSION));\n setTestRunnerInTestfileDir(getOptionalBooleanProperty(RUN_IN_TESTFILES_DIR, false));\n setLdLibraryPath(getOptionalStringProperty(LD_LIBRARY_PATH));\n setVmArgs(getOptionalStringProperty(VM_ARGS));\n \n setMakeCommand(getOptionalStringProperty(MAKE_COMMAND, DEFAULT_MAKE_COMMAND));\n setMakefileName(getOptionalStringProperty(MAKE_FILENAME));\n setStudentMakefileName(getOptionalStringProperty(STUDENT_MAKE_FILENAME));\n\n // XXX For legacy reasons, the test.properties file used to support:\n // test.timeout.testProcess\n // This was the timeout for the entire process from back when we tried to run\n // each test case in a separate thread.\n // Now instead we just use:\n // test.timeout.testCase\n // So we're going to ignore test.timeout.testProcess because it's almost certainly\n // going to be too long.\n\n // If no individual test timeout is specified, then use the default.\n // Note that we ignore test.timeout.testProcess since we're not timing out\n // the entire process anymore.\n setTestTimeoutInSeconds(getOptionalIntegerProperty(TEST_TIMEOUT, DEFAULT_PROCESS_TIMEOUT));\n }", "public void setDefaultProperties(ResourceProperties defaultProperties) {\n this.defaultProperties = defaultProperties;\n update();\n }", "@Override\n\tpublic void loadDefaults(String version, SystemConfig config, SystemContext systemContext, RtwsProperties properties) \n\t\t\t\t\t\t\t\t\t\tthrows MarshalException, DefaultConfigurationException {\n\t\ttry{\n\t\t\tthis.properties = properties; //initialize properties\n\t\t\tthis.outDir = config.getOutputConfDir() + confDir;\n\t\t\tSystemBuilderUtil.mkdir(this.outDir); //create directory\n\t\t\tthis.templateDir = RtwsConfig.getInstance().getString(\"sysbuilder.template.dir\");\n\t\t\t\n\t\t\tString templatePipeline = RtwsConfig.getInstance().getString(\"sysbuilder.datasink.pipeline.template\");\n\t\t\t\n\t\t\tfactoryDefinition = serializer.createObject(templatePipeline, FactoryDefinition.class);\n\t\t\t\n\t\t\t//load ingest api json information\n\t\t\tingestApiDatasinks();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tlogger.error(e.toString(), e);\n\t\t\te.printStackTrace();\n\t\t\tthrow new DefaultConfigurationException(e.toString(), e);\n\t\t}\n\t\t\n\t}", "private void getInitialValues() {\n mEditTextJobText.setText(SharedPrefStatic.mJobTextStr);\n mEditTextSkill.setText(SharedPrefStatic.mJobSkillStr);\n mEditTextLocation.setText(SharedPrefStatic.mJobLocationStr);\n mEditTextAge.setText(SharedPrefStatic.mJobAgeStr);\n }" ]
[ "0.6648778", "0.62728775", "0.62035036", "0.60601765", "0.58829826", "0.57344496", "0.5720057", "0.5679119", "0.56457144", "0.56318384", "0.5491274", "0.5482069", "0.5469866", "0.54547524", "0.5444127", "0.53912157", "0.5386535", "0.53601927", "0.5359342", "0.5323346", "0.53158027", "0.52880645", "0.5284729", "0.5245763", "0.52370924", "0.52291155", "0.5224509", "0.5222182", "0.52127707", "0.52100074", "0.5196782", "0.51807535", "0.51642555", "0.5154455", "0.5136567", "0.51315165", "0.51265746", "0.5124904", "0.51190925", "0.511892", "0.51130766", "0.51122695", "0.5109906", "0.5101054", "0.50985354", "0.5092516", "0.5075594", "0.5068282", "0.5049351", "0.5035381", "0.50349677", "0.5031644", "0.5025838", "0.501683", "0.5013618", "0.5008213", "0.50066364", "0.500281", "0.4998193", "0.49898782", "0.49853015", "0.49803138", "0.49788642", "0.49747434", "0.4972832", "0.4966439", "0.4955096", "0.49483624", "0.4940283", "0.49328563", "0.49307686", "0.4919162", "0.4912732", "0.49122965", "0.49119526", "0.4910542", "0.49103245", "0.48995844", "0.4895521", "0.4895503", "0.4890832", "0.48905262", "0.4887944", "0.48824802", "0.4880548", "0.48789513", "0.4870299", "0.48685288", "0.48577335", "0.48505995", "0.48382732", "0.4836286", "0.48336712", "0.4832764", "0.48320702", "0.48240265", "0.48141938", "0.48081037", "0.4805095", "0.47879982" ]
0.69278693
0
Reads in the properties the provided file, and provides default values for some properties not mentioned in this file.
private void initializeProperties(String propertiesFilename) throws IOException { this.properties = new Properties(); // Set defaults for 'standard' operation. // properties.setProperty(FILENAME_KEY, clientHome + "/bmo-data.tsv"); properties.setProperty(BMO_URI_KEY, "http://www.buildingmanageronline.com/members/mbdev_export.php/download.txt"); FileInputStream stream = null; try { stream = new FileInputStream(propertiesFilename); properties.load(stream); System.out.println("Loading data input client properties from: " + propertiesFilename); } catch (IOException e) { System.out.println(propertiesFilename + " not found. Using default data input client properties."); throw e; } finally { if (stream != null) { stream.close(); } } trimProperties(properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getPropValues() {\n Properties prop = new Properties();\n \n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n prop.load(inputStream);\n } catch (IOException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (inputStream == null) {\n try {\n throw new FileNotFoundException(\"ERROR: property file '\" + propFileName + \"' not found in the classpath\");\n } catch (FileNotFoundException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // get property values\n this.defaultDirectory = prop.getProperty(\"defaultDirectory\");\n this.topicsFile = this.defaultDirectory + prop.getProperty(\"topics\");\n this.scripturesFile = this.defaultDirectory + prop.getProperty(\"scriptures\");\n this.defaultJournalXML = this.defaultDirectory + prop.getProperty(\"defaultJournalXML\");\n this.defaultJournalTxt = this.defaultDirectory + prop.getProperty(\"defaultJournalTxt\");\n }", "public static Properties loadOrCreateProperties(String filename, Properties defaultProperties) {\n\n Properties properties = new Properties();\n try {\n properties.load(new FileInputStream(filename));\n } catch (Exception loadException) {\n try {\n FileOutputStream out = new FileOutputStream(filename);\n if (defaultProperties != null) {\n defaultProperties.store(out, null);\n }\n out.close();\n properties.load(new FileInputStream(filename));\n } catch (Exception writeException) {\n // Do nothing\n return null;\n }\n }\n return properties;\n }", "public\n void setPropertiesDefaults(InputStream in)\n {\n if (in == null)\n return;\n\n try {\n defaults.load(in);\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }", "protected void readProperties() throws RepositoryException {\n try {\n log.debug(\"Reading meta file: \" + this.metaFile);\n this.properties = new HashMap();\n BufferedReader reader = new BufferedReader(new FileReader(this.metaFile));\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n String name;\n String typeName;\n String value;\n try {\n name = line.substring(0, line.indexOf(\"<\")).trim();\n typeName = line.substring(line.indexOf(\"<\")+1, line.indexOf(\">\")).trim();\n value = line.substring(line.indexOf(\":\")+1).trim();\n } catch (StringIndexOutOfBoundsException e) {\n throw new RepositoryException(\"Error while parsing meta file: \" + this.metaFile \n + \" at line \" + line);\n }\n Property property = new DefaultProperty(name, PropertyType.getType(typeName), this);\n property.setValueFromString(value);\n this.properties.put(name, property);\n }\n reader.close();\n } catch (IOException e) {\n throw new RepositoryException(\"Error while reading meta file: \" + metaFile + \": \" \n + e.getMessage());\n }\n }", "public static Properties getPropertiesDefault() throws IOException {\n\t\treturn getProperties(\"/properties/configuration.properties\");\n\t\t\n\t}", "public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}", "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "@BeforeSuite\n\tpublic void propertiesFileReader(){\n\t\tif(prop == null){\t\t\t\n\t\t\tprop = new Properties();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"qa\")){ prop.load(new\n\t\t\t\t * FileInputStream(qaProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"stage\")){ prop.load(new\n\t\t\t\t * FileInputStream(stagProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"prod\")){ prop.load(new\n\t\t\t\t * FileInputStream(prodProperty)); }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"qa\")) \n\t\t\t\t\tFileUtils.copyFile(new File(qaProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"stage\"))\n\t\t\t\t\tFileUtils.copyFile(new File(stagProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"prod\"))\n\t\t\t\t\tFileUtils.copyFile(new File(prodProperty), new File(defaultProperty));\n\t\t\t\t\n\t\t\t\tprop.load(new FileInputStream(defaultProperty));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"user + pass [\"+prop.getProperty(\"username\")+\"===\"+prop.getProperty(\"password\"));\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "private static Properties loadOverrideProperties() {\n String confFile = System.getProperty(HAPI_PROPERTIES);\n if(confFile != null) {\n try {\n Properties props = new Properties();\n props.load(new FileInputStream(confFile));\n return props;\n }\n catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties file: \" + confFile, e);\n }\n }\n\n return null;\n }", "public static Properties getDefaultProperties() {\r\n return getProperties(true);\r\n }", "public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STANDARD_PROPERTY_FILE;\r\n\r\n\t\tif (System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE) != null\r\n\t\t\t\t&& System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE)\r\n\t\t\t\t\t\t.length() != 0) {\r\n\t\t\tfile = System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE);\r\n\t\t}\r\n\r\n\t\t// load property file\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.load(ClassLoader.getSystemResourceAsStream(file));\r\n\t\t\tSystem.setProperties(props);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t}\r\n\r\n\t}", "private Properties loadPropertiesFile(String file) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(file);\n\t\t\tif (fis != null) {\n\t\t\t\tProperties props = new Properties();\n\t\t\t\tprops.load(fis);\n\t\t\t\treturn props;\n\t\t\t}\n\t\t\tSystem.err.println(\"Cannot load \" + file\n\t\t\t\t\t+ \" , file input stream object is null\");\n\t\t} catch (java.io.IOException ioe) {\n\t\t\tSystem.err.println(\"Cannot load \" + file + \", error reading file\");\n\t\t}\n\t\treturn null;\n\t}", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "private Properties loadDefaultProperties() {\n Properties pref = new Properties();\n try {\n String path = \"resources/bundle.properties\";\n InputStream stream = PreferenceInitializer.class.getClassLoader().getResourceAsStream(path);\n pref.load(stream);\n } catch (IOException e) {\n ExceptionHandler.logAndNotifyUser(\"The default preferences for AgileReview could not be initialized.\"\n + \"Please try restarting Eclipse and consider to write a bug report.\", e, Activator.PLUGIN_ID);\n return null;\n }\n return pref;\n }", "Properties defaultProperties();", "public final Properties readPropertiesFromFile(final String fileName)\n {\n\n if (!StringUtils.isEmpty(fileName))\n {\n return PropertyLoader.loadProperties(fileName);\n } else\n {\n return null;\n } // end if..else\n\n }", "@Override\n public Map<String, String> readProperty(String fileName) {\n Map<String, String> result = new HashMap<>();\n Properties prop = new Properties();\n InputStream input;\n try {\n input = FullPropertyReader.class.getClassLoader().getResourceAsStream(fileName);\n prop.load(input);\n Set<String> strings = prop.stringPropertyNames();\n for (String string : strings) {\n result.put(string, prop.getProperty(string));\n }\n } catch (IOException e) {\n throw new PropertyReaderException(\"Trouble in FullPropertyReader\", e);\n }\n return result;\n }", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "private static void readCitProperties(String fileName) {\n/* */ try {\n/* 91 */ ResourceLocation e = new ResourceLocation(fileName);\n/* 92 */ InputStream in = Config.getResourceStream(e);\n/* */ \n/* 94 */ if (in == null) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 99 */ Config.dbg(\"CustomItems: Loading \" + fileName);\n/* 100 */ Properties props = new Properties();\n/* 101 */ props.load(in);\n/* 102 */ in.close();\n/* 103 */ useGlint = Config.parseBoolean(props.getProperty(\"useGlint\"), true);\n/* */ }\n/* 105 */ catch (FileNotFoundException var4) {\n/* */ \n/* */ return;\n/* */ }\n/* 109 */ catch (IOException var5) {\n/* */ \n/* 111 */ var5.printStackTrace();\n/* */ } \n/* */ }", "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}", "protected static Properties loadFileAsProperty(File file) throws FileNotFoundException, IOException {\r\n\t\tProperties result = new Properties();\r\n\t\tresult.load(new FileReader(file));\r\n\t\treturn result;\r\n\t}", "public ReadProperties(String filename) {\n\n\t\ttry {\n\t\t\tInputStream in = new FileInputStream(filename);\n\n\t\t\tprop = new Properties();\n\n\t\t\tprop.load(in);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void load(File file)\n throws FileNotFoundException, IOException, MissingRequiredTestPropertyException \n {\n\t initializeTestProperties(new BufferedInputStream(new FileInputStream(file)));\n\t}", "private void GetRequiredProperties() {\r\n\r\n\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\t\r\n try {\r\n \r\n File file = new File(fileToRead);\r\n \r\n if (file.exists()) {\r\n logger.info(\"Config file exists\");\r\n } else {\r\n logger.error(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n }\r\n \r\n prop.load(new FileInputStream(file));\r\n\r\n } catch (Exception e) {\r\n\r\n logger.error(\"Exception :: GetRequiredProperties :: \" + e.getMessage(), e);\r\n\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: \" + e.getMessage());\r\n }\r\n\r\n\t sifUrl = prop.getProperty(\"MDM_SIF_URL\");\r\n\t orsId = prop.getProperty(\"MDM_ORS_ID\");\r\n\t username = prop.getProperty(\"MDM_USER_NAME\");\r\n\t password = prop.getProperty(\"MDM_PASSWORD\");\r\n\t \r\n\t logger.info(\"SIF URL ::\" + sifUrl);\r\n\t logger.info(\"ORS ID ::\" + orsId );\r\n\t logger.info(\"User Id ::\" + username);\r\n\t logger.info(\"Password ::\" + password);\r\n\t \r\n\t\r\n\t}", "private ConfigProperties parsePropertiesFile(final String propertiesFile) {\n properties = ConfigFactory.getInstance().getConfigPropertiesFromAbsolutePath(propertiesFile);\n return properties;\n }", "public static void loadPropertyFile() throws IOException {\n\t\tPropertyFileReader.property = new Properties();\n\t\tPropertyFileReader.targetPlatform = System.getProperty(\"targetPlatform\");\n\t\tPropertyFileReader.targetDevice = System.getProperty(\"targetDevice\");\n\n\t\t// Load the property file based on platform and device\n\n\t\tif (PropertyFileReader.targetPlatform.equalsIgnoreCase(\"android\")) {\n\t\t\tfinal File file = new File(String.valueOf(System.getProperty(\"user.dir\"))\n\t\t\t\t\t+ \"\\\\src\\\\main\\\\resources\\\\testdata\\\\\" + PropertyFileReader.targetPlatform + \"\\\\\"\n\t\t\t\t\t+ PropertyFileReader.targetDevice + \"\\\\capabilities.properties\");\n\t\t\tPropertyFileReader.filereader = new FileReader(file);\n\t\t\tPropertyFileReader.property.load(PropertyFileReader.filereader);\n\t\t}\n\n\t\tif (PropertyFileReader.targetPlatform.equalsIgnoreCase(\"iOS\")) {\n\t\t\t// To do in case of iOS\n\t\t}\n\t}", "public static void loadProperties() {\n properties = new Properties();\n try {\n File f = new File(\"system.properties\");\n if (!(f.exists())) {\n OutputStream out = new FileOutputStream(f);\n }\n InputStream is = new FileInputStream(f);\n properties.load(is);\n lastDir = getLastDir();\n if (lastDir == null) {\n lastDir = \"~\";\n setLastDir(lastDir);\n }\n properties.setProperty(\"lastdir\", lastDir);\n\n // Try loading properties from the file (if found)\n properties.load(is);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public\n void setPropertiesDefaults(String argv[])\n {\n if (argv == null)\n return;\n\n for (int i = 0; i < argv.length; i++)\n {\n try {\n defaults.load(new StringBufferInputStream(argv[i]));\n }\n catch (IOException excp) {\n System.out.println(excp);\n }\n }\n }", "private static Properties loadProperties() throws SystemException {\r\n final Properties result;\r\n try {\r\n result = getProperties(PROPERTIES_DEFAULT_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n throw new SystemException(\"properties not found.\", e);\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Default properties: \" + result);\r\n }\r\n Properties specific;\r\n try {\r\n specific = getProperties(PROPERTIES_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n specific = new Properties();\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on loading specific properties.\", e);\r\n }\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Specific properties: \" + specific);\r\n }\r\n result.putAll(specific);\r\n \r\n // Load constant properties\r\n Properties constant = new Properties();\r\n try {\r\n constant = getProperties(PROPERTIES_CONSTANT_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n if (LOGGER.isWarnEnabled()) {\r\n LOGGER.warn(\"Error on loading contant properties.\");\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on loading contant properties.\", e);\r\n }\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Constant properties: \" + constant);\r\n }\r\n result.putAll(constant);\r\n \r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Merged properties: \" + result);\r\n }\r\n // set Properties as System-Variables\r\n for (final Object o : result.keySet()) {\r\n final String key = (String) o;\r\n String value = result.getProperty(key);\r\n value = replaceEnvVariables(value);\r\n System.setProperty(key, value);\r\n }\r\n return result;\r\n }", "void setPropertiesFile(File file);", "public static synchronized void refreshProperties(File file) {\n var prop = new Properties();\n FileInputStream input;\n try {\n input = new FileInputStream(file);\n prop.load(input);\n input.close();\n } catch (IOException e) {\n throw new PropertyReadException(e.getMessage(), e);\n }\n\n prop.forEach((key, value) -> checkSystemPropertyAndFillIfNecessary(valueOf(key),\n nonNull(value) ? valueOf(value) : EMPTY));\n arePropertiesRead = true;\n }", "public final Properties getDefaultProperties() {\n \t\treturn properties;\n \t}", "private void readProperties() {\n // reading config files\n if (driver == null) {\n try {\n fis = new FileInputStream(userDir + \"\\\\src\\\\main\\\\resources\\\\properties\\\\Config.properties\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n config.load(fis);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "void loadProperties(File propertiesFile) throws IOException\n {\n // Load the properties.\n LOGGER.info(\"Loading properties from \\\"{}\\\" file...\", propertiesFile);\n try (InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(propertiesFile), \"UTF-8\"))\n {\n properties.load(inputStreamReader);\n }\n\n // Log all properties except for password.\n StringBuilder propertiesStringBuilder = new StringBuilder();\n for (Object key : properties.keySet())\n {\n String propertyName = key.toString();\n propertiesStringBuilder.append(propertyName).append('=')\n .append(HERD_PASSWORD_PROPERTY.equalsIgnoreCase(propertyName) ? \"***\" : properties.getProperty(propertyName)).append('\\n');\n }\n LOGGER.info(\"Successfully loaded properties:%n{}\", propertiesStringBuilder.toString());\n }", "public void readProperties() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n propertyParserXML.readPropertyDefinition(configData.getPropertyList());\r\n propertyParserXML.processPropertyDependency();\r\n }\r\n Log.info(\"info.progress_control.load_property_description\");\r\n }", "public void parseDefaults() throws FileNotFoundException,\n\t\t\tIOException {\n\t\t// System.out.println(\"in parse\\t\"+szDefaultFile);\n\t\tString szLine;\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tString szError = \"\";\n\t\t\tbr = new BufferedReader(new FileReader(szDefaultFile));\n\t\t\twhile ((szLine = br.readLine()) != null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(szLine, \"\\t\");\n\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\tString sztype = st.nextToken().trim();\n\n\t\t\t\t\tString szvalue = \"\";\n\t\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\t\tszvalue = st.nextToken().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!szvalue.equals(\"\")) {\n\t\t\t\t\t\tif ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Use_static_input_to_build_model\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Use_transcription_factor-gene_interaction_data_to_build\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Use_transcription_factor_gene_interaction_data_to_build\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"true\")) {\n\t\t\t\t\t\t\t\tbstaticsearchDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\t\t\t\tbstaticsearchDEF = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tszError += \"Warning: \" + szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an unrecognized \" + \"value for \"\n\t\t\t\t\t\t\t\t\t\t+ sztype + \" \"\n\t\t\t\t\t\t\t\t\t\t+ \"(expecting true or false)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Static_Input_Data_File\")\n\t\t\t\t\t\t\t\t|| sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"TF_gene_Interactions_File\")\n\t\t\t\t\t\t\t\t|| sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"TF-gene_Interactions_File\")) {\n\t\t\t\t\t\t\tszStaticFileDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Data_File\")\n\t\t\t\t\t\t\t\t|| sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Expression_Data_File\")) {\n\t\t\t\t\t\t\tszDataFileDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Convergence_Likelihood_%\")) {\n\t\t\t\t\t\t\tdCONVERGENCEDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Standard_Deviation\")) {\n\t\t\t\t\t\t\tdMINSTDDEVALDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Saved_Model_File\")) {\n\t\t\t\t\t\t\tszInitFileDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Spot_IDs_included_in_the_data_file\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Spot_IDs_included_in_the_the_data_file\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Spot_IDs_in_the_data_file\"))) {\n\t\t\t\t\t\t\tbspotcheckDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Normalize_Data\"))\n\t\t\t\t\t\t\t\t|| (sztype.equalsIgnoreCase(\"Transform_Data\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Transform_Data[Log transform data,Linear transform data,Add 0]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Normalize_Data[Log normalize data,Normalize data,No normalization/add 0]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnnormalizeDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((nnormalizeDEF < 0) || (nnormalizeDEF > 2)) {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Normalize_Data\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Log normalize data\")) {\n\t\t\t\t\t\t\t\t\tnnormalizeDEF = 0;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Normalize data\")) {\n\t\t\t\t\t\t\t\t\tnnormalizeDEF = 1;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"No normalization/add 0\")) {\n\t\t\t\t\t\t\t\t\tnnormalizeDEF = 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Normalize_Data\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Change_should_be_based_on[Maximum-Minimum,Difference From 0]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Change_should_be_based_on\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Maximum-Minimum\")) {\n\t\t\t\t\t\t\t\tbmaxminDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Difference From 0\")) {\n\t\t\t\t\t\t\t\tbmaxminDEF = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tszError += szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value of \"\n\t\t\t\t\t\t\t\t\t\t+ \"Change_should_be_based_on[Maximum-Minimum,Difference From 0]\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Gene_Annotation_Source\")) {\n\t\t\t\t\t\t\t/*Boolean bProteAll=false;\n\t\t\t\t\t\t\t * try { ndbDEF = Integer.parseInt(szvalue); if\n\t\t\t\t\t\t\t * ((ndbDEF < 0)|| (ndbDEF >= organisms.length)) {\n\t\t\t\t\t\t\t * ndbDEF = 0; } } catch(NumberFormatException ex) {\n\t\t\t\t\t\t\t * boolean bfound = false; int nsource = 0; while\n\t\t\t\t\t\t\t * ((nsource < organisms.length)&&(!bfound)) { if\n\t\t\t\t\t\t\t * (organisms[nsource].equalsIgnoreCase(szvalue)) {\n\t\t\t\t\t\t\t * bfound = true; ndbDEF = nsource; } else {\n\t\t\t\t\t\t\t * nsource++; } }\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * if (!bfound) { szError += \"Warning: \"+szvalue\n\t\t\t\t\t\t\t * +\" is an unrecognized \"+\n\t\t\t\t\t\t\t * \"type for Gene Annotation Source\\n\"; } }\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Allow_Path_Merges\")) {\n\t\t\t\t\t\t\tballowmergeDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"TF-gene_Interaction_Source\")) {\n\t\t\t\t\t\t\tint numitems = staticsourceArray.length;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnstaticsourceDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((nstaticsourceDEF < 0)\n\t\t\t\t\t\t\t\t\t\t|| (nstaticsourceDEF >= numitems)) {\n\t\t\t\t\t\t\t\t\tnstaticsourceDEF = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tboolean bfound = false;\n\t\t\t\t\t\t\t\tint nsource = 0;\n\t\t\t\t\t\t\t\twhile ((nsource < numitems) && (!bfound)) {\n\t\t\t\t\t\t\t\t\tif (((String) staticsourceArray[nsource])\n\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(szvalue)) {\n\t\t\t\t\t\t\t\t\t\tbfound = true;\n\t\t\t\t\t\t\t\t\t\tnstaticsourceDEF = nsource;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnsource++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (!bfound) {\n\t\t\t\t\t\t\t\t\tszError += \"Warning: \"\n\t\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t\t+ \" is an unrecognized \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"type for TF-gene_Interaction_Source\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Cross_Reference_Source\")) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * int numitems = defaultxrefs.length; try {\n\t\t\t\t\t\t\t * nxrefDEF = Integer.parseInt(szvalue); if\n\t\t\t\t\t\t\t * ((nxrefDEF < 0)|| (nxrefDEF >= numitems)) {\n\t\t\t\t\t\t\t * nxrefDEF = 0; } } catch(NumberFormatException ex)\n\t\t\t\t\t\t\t * { boolean bfouparseDefaultsnd = false; int nsource = 0; while\n\t\t\t\t\t\t\t * ((nsource < numitems)&&(!bfound)) { if (((String)\n\t\t\t\t\t\t\t * defaultxrefs[nsource]).equalsIgnoreCase(szvalue))\n\t\t\t\t\t\t\t * { bfound = true; nxrefDEF = nsource; } else {\n\t\t\t\t\t\t\t * nsource++; } }\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * if (!bfound) { szError += \"Warning: \"+szvalue\n\t\t\t\t\t\t\t * +\" is an unrecognized \"+\n\t\t\t\t\t\t\t * \"type for a Cross_Reference_Source\"; } }\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Gene_Annotation_File\")) {\n\t\t\t\t\t\t\tszGeneAnnotationFileDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Cross_Reference_File\")) {\n\t\t\t\t\t\t\tszCrossRefFileDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_Files(comma delimited list)\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_Files\"))) {\n\t\t\t\t\t\t\tvRepeatFilesDEF = new Vector();\n\t\t\t\t\t\t\tStringTokenizer stRepeatList = new StringTokenizer(\n\t\t\t\t\t\t\t\t\tszvalue, \",\");\n\t\t\t\t\t\t\twhile (stRepeatList.hasMoreTokens()) {\n\t\t\t\t\t\t\t\tvRepeatFilesDEF.add(stRepeatList.nextToken());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_is_from\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Data_is_from[Different time periods,The same time period]\"))) {\n\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Different time periods\")) {\n\t\t\t\t\t\t\t\tballtimeDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"The same time period\")) {\n\t\t\t\t\t\t\t\tballtimeDEF = false;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Repeat Data is from it must be either \"\n\t\t\t\t\t\t\t\t\t\t+ \"'Different time periods' or 'The same time period'\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Y-axis_Scale_Factor\")) {\n\t\t\t\t\t\t\tdYaxisDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Scale_Node_Areas_By_The_Factor\")) {\n\t\t\t\t\t\t\tdnodekDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_Scale_Factor\")) {\n\t\t\t\t\t\t\tdXaxisDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"X-axis_scale\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_scale_should_be\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_scale[Uniform,Based on Real Time]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"X-axis_scale_should_be[Uniform,Based on Real Time]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Uniform\")) {\n\t\t\t\t\t\t\t\tbrealXaxisDEF = false;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Based on Real Time\")) {\n\t\t\t\t\t\t\t\tbrealXaxisDEF = true;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"X-axis_scale it must be either 'Uniform'\"\n\t\t\t\t\t\t\t\t\t\t+ \"or 'Based on Real Time'.\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Key_Input_X_p-val_10^-X\")) {\n\t\t\t\t\t\t\tdKeyInputXDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Key_Input_Significance_Based_On[\"\n\t\t\t\t\t\t\t\t\t\t+ \"Path Significance Conditional on Split,Path Significance Overall,Split Significance]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Key_Input_Significance_Based_On[\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"Split Significance,Path Significance Conditional on Split,Path Significance Overall]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnKeyInputTypeDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((nKeyInputTypeDEF < 0)\n\t\t\t\t\t\t\t\t\t\t|| (nKeyInputTypeDEF > 2)) {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Key Input Significance Based On\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// so code maps to input order\n\t\t\t\t\t\t\t\t\tif (nKeyInputTypeDEF == 0)\n\t\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 1;\n\t\t\t\t\t\t\t\t\telse if (nKeyInputTypeDEF == 1)\n\t\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 2;\n\t\t\t\t\t\t\t\t\telse if (nKeyInputTypeDEF == 2)\n\t\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 0;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Split Significance\")) {\n\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 0;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Path Significance Conditional on Split\")) {\n\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 1;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Path Significance Overall\")) {\n\t\t\t\t\t\t\t\t\tnKeyInputTypeDEF = 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Key_Input_Significance_Based_On\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Maximum_number_of_paths_out_of_split\")) {\n\t\t\t\t\t\t\tnumchildDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Split_Seed\"))\n\t\t\t\t\t\t\t\t|| (sztype.equalsIgnoreCase(\"Random_Seed\"))) {\n\t\t\t\t\t\t\tnSEEDDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Penalized_likelihood_node_penalty\")) {\n\t\t\t\t\t\t\tdNODEPENALTYDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Model_selection_framework\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Model_selection_framework[Penalized Likelihood,Train-Test]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tint ntempval;\n\t\t\t\t\t\t\t\tntempval = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((ntempval < 0) || (ntempval > 1)) {\n\t\t\t\t\t\t\t\t\tbPENALIZEDDEF = (ninitsearchDEF == 0);\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Model_selection_framework\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Penalized Likelihood\")) {\n\t\t\t\t\t\t\t\t\tbPENALIZEDDEF = true;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Train-Test\")) {\n\t\t\t\t\t\t\t\t\tbPENALIZEDDEF = false;\n\t\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"Model_selection_framework \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"it must be either \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"'Use As Is', 'Start Search From', or 'Do Not Use'\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delay_path_improvement\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delay_split_score_%\"))) {\n\t\t\t\t\t\t\tdDELAYPATHDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDELAYPATHDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Merge_path_score_%\")) {\n\t\t\t\t\t\t\tdDMERGEPATHDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDMERGEPATHDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Merge_path_difference_threshold\")) {\n\t\t\t\t\t\t\tdDMERGEPATHDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDMERGEPATHDIFFDEF > 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be <= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delay_split_difference_threshold\")) {\n\t\t\t\t\t\t\tdDELAYPATHDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dDELAYPATHDIFFDEF > 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be <= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delete_path_difference_threshold\")) {\n\t\t\t\t\t\t\tdPRUNEPATHDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dPRUNEPATHDIFFDEF > 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be <= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Main_search_difference_threshold\")) {\n\t\t\t\t\t\t\tdMinScoreDIFFDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dMinScoreDIFFDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Prune_path_improvement\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Delete_path_score_%\"))) {\n\t\t\t\t\t\t\tdPRUNEPATHDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dPRUNEPATHDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_score_improvement\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Main_search_score_%\"))) {\n\t\t\t\t\t\t\tdMinScoreDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t\tif (dMinScoreDEF < 0) {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(szvalue\n\t\t\t\t\t\t\t\t\t\t+ \" is an invalid value for \" + sztype\n\t\t\t\t\t\t\t\t\t\t+ \" must be >= 0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Saved_Model\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Saved_Model[Use As Is/Start Search From/Do Not Use]\"))) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tninitsearchDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t\t\tif ((ninitsearchDEF < 0)\n\t\t\t\t\t\t\t\t\t\t|| (ninitsearchDEF > 2)) {\n\t\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\t\tszvalue\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" is an invalid argument for Saved_Model\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Use As Is\")) {\n\t\t\t\t\t\t\t\t\tninitsearchDEF = 0;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Start Search From\")) {\n\t\t\t\t\t\t\t\t\tninitsearchDEF = 1;\n\t\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Do Not Use\")) {\n\t\t\t\t\t\t\t\t\tninitsearchDEF = 2;\n\t\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"Saved_Model \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"it must be either \"\n\t\t\t\t\t\t\t\t\t\t\t+ \"'Use As Is', 'Start Search From', or 'Do Not Use'\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Filter_Gene_If_It_Has_No_Static_Input_Data\")) {\n\t\t\t\t\t\t\tbfilterstaticDEF = (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Maximum_Number_of_Missing_Values\")) {\n\t\t\t\t\t\t\tnMaxMissingDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Absolute_Log_Ratio_Expression\")) {\n\t\t\t\t\t\t\tdMinExpressionDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Correlation_between_Repeats\")) {\n\t\t\t\t\t\t\tdMinCorrelationRepeatsDEF = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Pre-filtered_Gene_File\")) {\n\t\t\t\t\t\t\tszPrefilteredDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Include_Biological_Process\")) {\n\t\t\t\t\t\t\tbpontoDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Include_Molecular_Function\")) {\n\t\t\t\t\t\t\tbfontoDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Include_Cellular_Process\")) {\n\t\t\t\t\t\t\tbcontoDEF = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Only_include_annotations_with_these_evidence_codes\")) {\n\t\t\t\t\t\t\tszevidenceDEF = szvalue;\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Only_include_annotations_with_these_taxon_IDs\")) {\n\t\t\t\t\t\t\tsztaxonDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Category_ID_File\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Category_ID_Mapping_File\"))) {\n\t\t\t\t\t\t\tszcategoryIDDEF = szvalue;\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"GO_Minimum_number_of_genes\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_number_of_genes\"))) {\n\t\t\t\t\t\t\tnMinGoGenesDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Minimum_GO_level\")) {\n\t\t\t\t\t\t\tnMinGOLevelDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Minimum_Split_Percent\")) {\n\t\t\t\t\t\t\tdpercentDEF = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Number_of_samples_for_randomized_multiple_hypothesis_correction\")) {\n\t\t\t\t\t\t\tnSamplesMultipleDEF = Integer.parseInt(szvalue);\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Multiple_hypothesis_correction_method_enrichment[Bonferroni,Randomization]\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Multiple_hypothesis_correction_method[Bonferroni,Randomization]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Bonferroni\")) {\n\t\t\t\t\t\t\t\tbrandomgoDEF = false;\n\t\t\t\t\t\t\t} else if (szvalue\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Randomization\")) {\n\t\t\t\t\t\t\t\tbrandomgoDEF = true;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Correction_Method it must be either 'Bonferroni'\"\n\t\t\t\t\t\t\t\t\t\t+ \"or 'Randomization'.\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"miRNA-gene_Interaction_Source\")) {\n\t\t\t\t\t\t\tmiRNAInteractionDataFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"miRNA_Expression_Data_File\")) {\n\t\t\t\t\t\t\tmiRNAExpressionDataFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Regulator_Types_Used_For_Activity_Scoring\")) {\n\t\t\t\t\t\t\tif(szvalue.equalsIgnoreCase(\"None\")){\n\t\t\t\t\t\t\t\tcheckStatusTF = false;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = false;\n\t\t\t\t\t\t\t} else if(szvalue.equalsIgnoreCase(\"TF\")){\n\t\t\t\t\t\t\t\tcheckStatusTF = true;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"miRNA\")) {\n\t\t\t\t\t\t\t\tcheckStatusTF = false;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"Both\")) {\n\t\t\t\t\t\t\t\tcheckStatusTF = true;\n\t\t\t\t\t\t\t\tcheckStatusmiRNA = true;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")){\n\t\t\t\t\t\t\t\tszError = \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t+ \"Regulator_Types_Used_For_Activity_Scoring it must be either 'None', 'TF'\"\n\t\t\t\t\t\t\t\t\t+ \", 'miRNA' or 'Both'.\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Normalize_miRNA_Data[Log normalize data,Normalize data,No normalization/add 0]\")) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Log normalize data\")) {\n\t\t\t\t\t\t\t\tmiRNATakeLog = true;\n\t\t\t\t\t\t\t\tmiRNAAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"Normalize data\")) {\n\t\t\t\t\t\t\t\tmiRNATakeLog = false;\n\t\t\t\t\t\t\t\tmiRNAAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"No normalization/add 0\")) {\n\t\t\t\t\t\t\t\tmiRNATakeLog = false;\n\t\t\t\t\t\t\t\tmiRNAAddZero = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\tszvalue+ \" is an invalid argument for Normalize_miRNA_Data\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_miRNA_Data_Files(comma delimited list)\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_miRNA_Data_Files\"))) {\n\t\t\t\t\t\t\tmiRNARepeatFilesDEF = new Vector();\n\t\t\t\t\t\t\tStringTokenizer stRepeatList = new StringTokenizer(\n\t\t\t\t\t\t\t\t\tszvalue, \",\");\n\t\t\t\t\t\t\twhile (stRepeatList.hasMoreTokens()) {\n\t\t\t\t\t\t\t\tmiRNARepeatFilesDEF.add(stRepeatList.nextToken());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ((sztype.equalsIgnoreCase(\"Repeat_miRNA_Data_is_from\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_miRNA_Data_is_from[Different time periods,The same time period]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Different time periods\")) {\n\t\t\t\t\t\t\t\tmiRNAalltimeDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"The same time period\")) {\n\t\t\t\t\t\t\t\tmiRNAalltimeDEF = false;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Repeat miRNA Data is from it must be either \"\n\t\t\t\t\t\t\t\t\t\t+ \"'Different time periods' or 'The same time period'\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Filter_miRNA_With_No_Expression_Data_From_Regulators\")) {\n\t\t\t\t\t\t\tfiltermiRNAExp = (szvalue.equalsIgnoreCase(\"true\"));\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Expression_Scaling_Weight\")) {\n\t\t\t\t\t\t\tmiRNAWeight = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Minimum_TF_Expression_After_Scaling\")) {\n\t\t\t\t\t\t\ttfWeight = Double.parseDouble(szvalue);\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Regulator_Score_File\")) {\n\t\t\t\t\t\t\tregScoreFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"DECOD_Executable_Path\")) {\n\t\t\t\t\t\t\tdecodPath = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Gene_To_Fasta_Format_file\")) {\n\t\t\t\t\t\t\tfastaFile = szvalue;\n\t\t\t\t\t\t} else if (sztype.equalsIgnoreCase(\"Active_TF_influence\")) {\n\t\t\t\t\t\t\tdProbBindingFunctional = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(szvalue);\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"Setting active TF influence to \"\n\t\t\t\t\t\t\t\t\t\t\t+ dProbBindingFunctional);\n // parseDefault for proteomics panel \n } else if (sztype.equalsIgnoreCase(\"Proteomics_File\")){\n djProteFile=szvalue;\n // parseDefault for relative proteomics weight\n } else if (sztype.equalsIgnoreCase(\"Proteomics_Relative_Weight\")){\n pweight=szvalue;\n } else if ((sztype\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Prote_Data_Files(comma delimited list)\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Prote_Data_Files\"))) {\n\t\t\t\t\t\t\tProteRepeatFilesDEF = new Vector();\n\t\t\t\t\t\t\tStringTokenizer stRepeatList = new StringTokenizer(\n\t\t\t\t\t\t\t\t\tszvalue, \",\");\n\t\t\t\t\t\t\twhile (stRepeatList.hasMoreTokens()) {\n\t\t\t\t\t\t\t\tProteRepeatFilesDEF.add(stRepeatList.nextToken());\n\t\t\t\t\t\t\t}\n } else if ((sztype.equalsIgnoreCase(\"Repeat_Prote_Data_is_from\"))\n\t\t\t\t\t\t\t\t|| (sztype\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"Repeat_Prote_Data_is_from[Different time periods,The same time period]\"))) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Different time periods\")) {\n\t\t\t\t\t\t\t\tProtealltimeDEF = true;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"The same time period\")) {\n\t\t\t\t\t\t\t\tProtealltimeDEF = false;\n\t\t\t\t\t\t\t} else if (!szvalue.equals(\"\")) {\n\t\t\t\t\t\t\t\tszError += \"WARNING: '\"\n\t\t\t\t\t\t\t\t\t\t+ szvalue\n\t\t\t\t\t\t\t\t\t\t+ \"' is an invalid value for \"\n\t\t\t\t\t\t\t\t\t\t+ \"Repeat Prote Data is from it must be either \"\n\t\t\t\t\t\t\t\t\t\t+ \"'Different time periods' or 'The same time period'\\n\";\n\t\t\t\t\t\t\t}\n } else if (sztype.equalsIgnoreCase(\"Normalize_Prote_Data[Log normalize data,Normalize data,No normalization/add 0]\")) {\n\t\t\t\t\t\t\tif (szvalue.equalsIgnoreCase(\"Log normalize data\")) {\n\t\t\t\t\t\t\t\tproteTakeLog = true;\n\t\t\t\t\t\t\t\tproteAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"Normalize data\")) {\n\t\t\t\t\t\t\t\tproteTakeLog = false;\n\t\t\t\t\t\t\t\tproteAddZero = false;\n\t\t\t\t\t\t\t} else if (szvalue.equalsIgnoreCase(\"No normalization/add 0\")) {\n\t\t\t\t\t\t\t\tproteTakeLog = false;\n\t\t\t\t\t\t\t\tproteAddZero = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\t\t\tszvalue+ \" is an invalid argument for Normalize_Prote_Data\");\n\t\t\t\t\t\t\t}\n } else if (sztype.equalsIgnoreCase(\"Use Proteomics[No,TF,All]\")){\n if (szvalue.equalsIgnoreCase(\"No\")){\n bProteTF=false;\n bProteAll=false;\n } else if (szvalue.equalsIgnoreCase(\"TF\")){\n bProteTF=true;\n bProteAll=false;\n } else if (szvalue.equalsIgnoreCase(\"All\")){\n bProteAll=true;\n bProteTF=false;\n } else{\n throw new IllegalArgumentException(\n szvalue+\" is not valid\"\n );\n }\n \n } else if (sztype.equalsIgnoreCase(\"PPI File\")){\n djPPIFile=szvalue;\n \n } else if (sztype.equalsIgnoreCase(\"Epigenomic_File\")){\n // parseDefault for epigenomics panel\n djMethyFile=szvalue;\n } else if (sztype.equalsIgnoreCase(\"GTF File\")){\n djMethyGTF=szvalue;\n\t\t\t\t\t\t} else if ((sztype.charAt(0) != '#')) {\n\t\t\t\t\t\t\tszError += \"WARNING: '\" + sztype\n\t\t\t\t\t\t\t\t\t+ \"' is an unrecognized variable.\\n\";\n\t\t\t\t\t\t} \n \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tif (!szError.equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException(szError);\n\t\t\t}\n\t\t} catch (FileNotFoundException ex) {\n\t\t}\n\t}", "private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }", "public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "File getPropertiesFile();", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "void load() {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(propertyFile);\n\t\t\tfinal Properties newProperties = new Properties();\n\t\t\tnewProperties.load(fis);\n\t\t\ttimeLastRead = propertyFile.lastModified();\n\t\t\tproperties = newProperties;\n\t\t\tfis.close();\n\t\t} catch (final Exception e) {\n\t\t\tlogger.info(\"Property file \" + propertyFile + \" \" + e.getMessage());\n\t\t}\n\t}", "public\n YutilProperties(InputStream in)\n {\n super(new Properties());\n setPropertiesDefaults(in);\n }", "public final Properties init() throws FileNotFoundException, IOException{\n /*\n Your properties file must be in the deployed .war file in WEB-INF/classes/tokens. It is there automatically\n if you have it in Source Packages/java/tokens when you build. That is how this will read it in without defining a root location\n https://stackoverflow.com/questions/2395737/java-relative-path-of-a-file-in-a-java-web-application\n */\n String fileLoc =TinyTokenManager.class.getResource(Constant.PROPERTIES_FILE_NAME).toString();\n fileLoc = fileLoc.replace(\"file:\", \"\");\n setFileLocation(fileLoc);\n InputStream input = new FileInputStream(propFileLocation);\n props.load(input);\n input.close();\n currentAccessToken = props.getProperty(\"access_token\");\n currentRefreshToken = props.getProperty(\"refresh_token\");\n currentS3AccessID = props.getProperty(\"s3_access_id\");\n currentS3Secret = props.getProperty(\"s3_secret\");\n currentS3BucketName = props.getProperty(\"s3_bucket_name\");\n currentS3Region = Region.US_WEST_2;\n apiSetting = props.getProperty(\"open_api_cors\");\n return props;\n }", "private static Properties getProperties(final String filename) throws IOException, FileNotFoundException {\r\n \r\n final Properties result = new Properties();\r\n final InputStream propertiesStream = getInputStream(filename);\r\n result.load(propertiesStream);\r\n return result;\r\n }", "private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ConfigProperties read(File fFile) throws GUIReaderException { \n if ( fFile == null || fFile.getName().trim().equalsIgnoreCase(\"\") ) /*no filename for input */\n {\n throw new GUIReaderException\n (\"No input filename specified\",GUIReaderException.EXCEPTION_NO_FILENAME);\n }\n else /* start reading from config file */\n {\n try{ \n URL url = fFile.toURI().toURL();\n \n Map global = new HashMap(); \n Map pm = loader(url, global);\n ConfigProperties cp = new ConfigProperties ();\n cp.setGlobal(global);\n cp.setProperty(pm);\n return cp;\n \n }catch(IOException e){\n throw new GUIReaderException(\"IO Exception during read\",GUIReaderException.EXCEPTION_IO);\n }\n }\n }", "private static Properties loadProperties() {\n Properties properties;\n try (InputStream in = FHIRServerProperties.class.getClassLoader().getResourceAsStream(HAPI_PROPERTIES)) {\n properties = new Properties();\n properties.load(in);\n } catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties\", e);\n }\n\n Properties overrideProps = loadOverrideProperties();\n if (overrideProps != null) {\n properties.putAll(overrideProps);\n }\n return properties;\n }", "private Properties loadProperties(String fileName){\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinput = new FileInputStream(fileName);\r\n\t\t\tprop.load(input);\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prop;\t \r\n\t}", "private void init(String propFilePath) {\n properties = new Properties();\n try {\n properties.load(new FileInputStream(new File(propFilePath)));\n } catch (FileNotFoundException e1) {\n logger.error(\"External properties file not found!\", e1);\n System.exit(1);\n } catch (IOException e2) {\n logger.error(\"Error while reading External properties file!\", e2);\n System.exit(1);\n }\n }", "public static Properties load() throws IOException {\n Properties properties = new Properties();\n\n try (InputStream defaultProperties = PropertiesLoader.class.getClassLoader().getResourceAsStream(DEFAULT_PROPERTIES_PATH)) {\n properties.load(defaultProperties);\n }\n\n try (InputStream overwriteProperties = PropertiesLoader.class.getClassLoader().getResourceAsStream(OVERWRITE_PROPERTIES_PATH)) {\n if (overwriteProperties != null) {\n properties.load(overwriteProperties);\n }\n }\n\n String systemPropertiesPath = System.getProperty(SYSTEM_PROPERTY);\n if (systemPropertiesPath != null) {\n try (InputStream overwriteProperties = new FileInputStream(systemPropertiesPath)) {\n properties.load(overwriteProperties);\n }\n }\n\n properties.putAll(System.getProperties());\n\n return properties;\n }", "public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.close();\r\n\t\t\t}catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}", "private static Properties readProps() {\n Path[] candidatePaths = {\n Paths.get(System.getProperty(\"user.home\"), \".sourcegraph-jetbrains.properties\"),\n Paths.get(System.getProperty(\"user.home\"), \"sourcegraph-jetbrains.properties\"),\n };\n\n for (Path path : candidatePaths) {\n try {\n return readPropsFile(path.toFile());\n } catch (IOException e) {\n // no-op\n }\n }\n // No files found/readable\n return new Properties();\n }", "private void loadProperties() {\n\t\t\n\t\tString fldr = env.getProperty(\"response.folder\");\n\t\tthis.repo.setRootFolder( new File(fldr));;\n\t\t\n\t\tint nthConfigItem = 1;\n\t\twhile(true) {\n\t\t\tString seq = (\"\"+nthConfigItem++).trim();\n\t\t\t\n\t\t\tString xpathPropName = \"request.\" + seq + \".xpath\";\n\t\t\tString responseTextFilePropName = \"request.\" + seq + \".response.file\";\n\t\t\tString xpath = env.getProperty(xpathPropName);\n\t\t\tString responseTextFileName = env.getProperty(responseTextFilePropName);\n\t\t\tif (xpath!=null && !\"\".equals(xpath.trim())\n\t\t\t\t&& responseTextFileName!=null & !\"\".equals(responseTextFileName.trim())\t) {\n\t\t\t\t\n\t\t\t\trepo.addFile(xpath, responseTextFileName);\n\t\t\t\tController.logAlways(\"Loading config item [\" + seq + \"] xpath: [\" + rpad(xpath, 60) + \"] data file: [\" + rpad(responseTextFileName,25) + \"]\" );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tController.logAlways(\"End of littleMock initialization. No more properties from application.properties will be loaded because either [\" + xpathPropName + \"] or [\" + responseTextFilePropName + \"] was not found in application.properties.\");\n\t\t\t\t//parameters in application.properties must be\n\t\t\t\t//in sequential order, starting at 1.\n\t\t\t\t//When we discover the first missing one, stop looking for more.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\thumanReadableConfig = PlaybackRepository.SINGLETON.humanReadable();\n\t}", "private void loadProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Loading Properties from {}\", path.toString());\n try {\n FileInputStream fis = new FileInputStream(getSamplePropertiesPath().toFile());\n Properties properties = new Properties();\n properties.load(fis);\n\n String privateKey = properties.getProperty(PRIVATE_KEY);\n this.credentials = Credentials.create(privateKey);\n this.contract1Address = properties.getProperty(CONTRACT1_ADDRESS);\n this.contract2Address = properties.getProperty(CONTRACT2_ADDRESS);\n this.contract3Address = properties.getProperty(CONTRACT3_ADDRESS);\n this.contract4Address = properties.getProperty(CONTRACT4_ADDRESS);\n this.contract5Address = properties.getProperty(CONTRACT5_ADDRESS);\n this.contract6Address = properties.getProperty(CONTRACT6_ADDRESS);\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "@Override\n\tpublic String getFileProperties() {\n\t\treturn null;\n\t}", "private void loadProperties() {\n try (InputStream in = getClass().getClassLoader().getResourceAsStream(PATH_TO_PROPERTIES)) {\n this.prs.load(in);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }", "private Properties loadConfig(String baseFileName, String userPathParamName) throws IOException {\n\t\tString fileName = baseFileName + \".properties\";\n\t\tProperties properties = new Properties();\n\t\ttry (InputStream configStream = ApiInitializer.class.getClassLoader().getResourceAsStream(fileName)) {\n\t\t\tif (configStream != null) {\n\t\t\t\tproperties.load(configStream);\n\t\t\t}\n\t\t}\n\n\t\t// Then, override with whatever the user set up.\n\t\tString userFilePath = servletContext.getInitParameter(userPathParamName);\n\t\tif (userFilePath == null) {\n\t\t\tuserFilePath = \"WEB-INF/\" + baseFileName + \".properties\";\n\t\t} else {\n\t\t\tPath path = Paths.get(userFilePath, baseFileName + \".properties\");\n\t\t\tuserFilePath = path.toString();\n\t\t}\n\t\ttry (InputStream inStream = servletContext.getResourceAsStream(userFilePath);) {\n\t\t\tif (inStream != null) {\n\t\t\t\tproperties.load(inStream);\n\t\t\t}\n\t\t}\n\n\t\treturn properties;\n\t}", "public DataInputClientProperties(String propertiesFilename) throws IOException {\n if (propertiesFilename == null) {\n initializeProperties();\n }\n else {\n initializeProperties(propertiesFilename);\n }\n }", "public static Properties getProperties(String filename)\r\n/* 13: */ {\r\n/* 14:26 */ Properties properties = new Properties();\r\n/* 15: */ try\r\n/* 16: */ {\r\n/* 17:29 */ properties.load(new FileInputStream(System.getProperty(\"user.dir\") + \"/properties/\" + filename));\r\n/* 18: */ }\r\n/* 19: */ catch (IOException ex)\r\n/* 20: */ {\r\n/* 21:31 */ logger.error(\"Can't load properties file: \" + filename, ex);\r\n/* 22: */ }\r\n/* 23:33 */ return properties;\r\n/* 24: */ }", "private Properties readProperties() throws IOException {\n\t\tProperties props = new Properties();\n\t\t\n\t\tFileInputStream in = new FileInputStream(\"Config.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\treturn props;\n\t}", "public static Properties getDefaultProperties() {\n Properties json = new Properties();\n json.put(REROUTE_PROPERTY, \"true\");\n json.put(AUTO_CLEAN_PATH_PROPERTY, \"true\");\n json.put(UPLOAD_DIRECTORY_PROP, \"webroot/images/\");\n json.put(UPLOAD_RELATIVE_PATH_PROP, \"images/\");\n return json;\n }", "public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "public static Properties loadProperties(@NonNull File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n Properties properties = new Properties();\n properties.load(fileInputStream);\n return properties;\n }", "public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "private void loadProperties(){\n try {\n input = new FileInputStream(fileName);\n properties.load(input);\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO LOAD GAME ---\");\n e.printStackTrace();\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE INTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }", "private void initializeProperties() throws IOException {\n String userHome = org.wattdepot.util.logger.WattDepotUserHome.getHomeString();\n String wattDepotHome = userHome + \"/.wattdepot\";\n String clientHome = wattDepotHome + \"/client\";\n String propFile = clientHome + \"/datainput.properties\";\n initializeProperties(propFile);\n }", "public static void basefn() throws IOException {\r\n\t\t//Below line creates an object of Properties called 'prop'\r\n\t\tprop = new Properties(); \r\n\t\t\r\n\t\t//Below line creates an object of FileInputStream called 'fi'. Give the path of the properties file which you have created\r\n\t\tFileInputStream fi = new FileInputStream(\"D:\\\\Java\\\\workspace\\\\Buffalocart\\\\src\\\\test\\\\resources\\\\config.properties\");\r\n\t\t\r\n\t\t//Below line of code will load the property file\r\n\t\tprop.load(fi);\t\t\t\t\r\n\t}", "public Properties loadProps(String propFile) {\n Properties props = new Properties();\n BufferedReader f;\n try {\n f = new BufferedReader(new FileReader(propFile));\n } catch (FileNotFoundException e) {\n return null;\n }\n try {\n props.load(f);\n } catch (IOException e) {\n System.err.println(\"IO EXception in loadProps in EvalModels class\");\n }\n System.out.println(props.toString());\n return props;\n }", "public static void loadProps(InputStream in) {\r\n\t\ttry {\r\n properties.load(in);\r\n } catch (IOException e) {\r\n System.out.println( \"No config.properties was found.\");\r\n e.printStackTrace();\r\n }\r\n\t}", "public static Properties file2Properties(File file) {\r\n Properties props = new Properties();\r\n FileInputStream stream = null;\r\n InputStreamReader streamReader = null;\r\n\r\n\r\n try {\r\n stream = new FileInputStream(file);\r\n streamReader = new InputStreamReader(stream, charSet);\r\n props.load(streamReader);\r\n } catch (IOException ex) {\r\n Logger.getLogger(RunProcessor.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return props;\r\n }", "public final void loadPropertiesFromFile(final String fileName)\n {\n\n Properties tempProp = PropertyLoader.loadProperties(fileName);\n fProp.putAll(tempProp);\n\n }", "public ReadConfigProperty() {\n\n\t\ttry {\n\t\t\tString filename = \"com/unitedcloud/resources/config.properties\";\n\t\t\tinput = ReadConfigProperty.class.getClassLoader().getResourceAsStream(filename);\n\t\t\tif (input == null) {\n\t\t\t\tSystem.out.println(\"Sorry, unable to find \" + filename);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public DefaultProperties() {\n\t\t// Festlegung der Werte für Admin-Zugang\n\t\tthis.setProperty(\"admin.username\", \"admin\");\n\t\tthis.setProperty(\"admin.password\", \"password\");\n\t\tthis.setProperty(\"management.port\", \"8443\");\n\n\t\t// Festlegung der Werte für CouchDB-Verbindung\n\t\tthis.setProperty(\"couchdb.adress\", \"http://localhost\");\n\t\tthis.setProperty(\"couchdb.port\", \"5984\");\n\t\tthis.setProperty(\"couchdb.databaseName\", \"profiles\");\n\n\t\t// Festlegung der Werte für Zeitvergleiche\n\t\tthis.setProperty(\"server.minTimeDifference\", \"5\");\n\t\tthis.setProperty(\"server.monthsBeforeDeletion\", \"18\");\n\t}", "public static Properties loadProperties(String file) throws Exception {\n Properties props = new Properties();\n props.load(new FileInputStream(file));\n\n return props;\n }", "private void loadProperties() {\n\t\tInputStream propsFile;\n\t\tProperties tempProp = new Properties();\n\n\t\ttry {\n\t\t\t//propsFile = new FileInputStream(\"plugins\\\\balloonplugin\\\\BalloonSegmentation.properties\");\n\t\t\tpropsFile = getClass().getResourceAsStream(\"/BalloonSegmentation.properties\");\n\t\t\ttempProp.load(propsFile);\n\t\t\tpropsFile.close();\n\n\t\t\t// load properties\n\t\t\tinit_channel = Integer.parseInt(tempProp.getProperty(\"init_channel\"));\t\t\t\t// initial channel selected for segmenting the cell architecture 1 - red, 2 - green, 3 - blue\n\t\t\tinit_max_pixel = Integer.parseInt(tempProp.getProperty(\"init_max_pixel\"));\t\t\t// initial max pixel intensity used for finding the doundaries of the colony of cells\n\t\t\tinit_HL = Integer.parseInt(tempProp.getProperty(\"init_HL\"));\t\t\t\t\t\t// initial H*L factor used finding seeds in the population\n\t\t\tinit_min_I = Integer.parseInt(tempProp.getProperty(\"init_min_I\"));\t\t\t\t\t// initial pixel intensity when balloon algorithm starts\n\t\t\tinit_max_I = Integer.parseInt(tempProp.getProperty(\"init_max_I\"));\t\t\t\t\t// final pixel intensity when balloon algorithm stops\n\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tIJ.error(\"I/O Exception: cannot read .properties file\");\n\t\t}\n\t}", "@Override\n public void loadDefaultConfig() {\n currentConfigFileName = defaultConfigFileName;\n mesoCfgXML = (SCANConfigMesoXML) readDefaultConfig();\n createAttributeMap(getAttributes());\n }", "public void getPropValues() throws IOException {\r\n try {\r\n Properties prop = new Properties();\r\n String path = System.getProperty(\"user.dir\") +\"\\\\src\\\\es\\\\udc\\\\redes\\\\webserver\\\\resources\\\\\";\r\n\t String filename = \"config.properties\";\r\n inputStream = new FileInputStream(path+filename);\r\n if (inputStream != null) {\r\n prop.load(inputStream);\r\n } else {\r\n\t\tthrow new FileNotFoundException(\"property file '\"+path + filename + \"' not found\");\r\n }\r\n\t // get the property value and set in attributes\r\n\t this.PORT = prop.getProperty(\"PORT\");\r\n this.DIRECTORY_INDEX = prop.getProperty(\"DIRECTORY_INDEX\");\r\n this.DIRECTORY = System.getProperty(\"user.dir\")+ prop.getProperty(\"DIRECTORY\");\r\n this.ALLOW = prop.getProperty(\"ALLOW\");\r\n this.HOSTNAME = prop.getProperty(\"HOSTNAME\");\r\n System.out.println();\r\n } catch (Exception e) {\r\n\t\tSystem.out.println(\"Exception: \" + e);\r\n\t} finally {\r\n\t\tinputStream.close();\r\n\t}\r\n }", "public File getPropertyFile() { return propertyFile; }", "@Override\n\tpublic void checkPropertyConfiguration() throws IOException, CustomizedException {\n\t\tString conf=PropertyReader.getProperty(\"configuration\");\n\t\tString\tfileName=\"\";\n\t\tconfiguration=conf;\n\t\tif(conf == null || conf.isEmpty())\n\t\t{\n\t\t\tthrow new CustomizedException(\"Configuration property is not set,it must be set to 1 or 2 \");\n\n\t\t}\n\t\tif(conf.equals(\"1\"))\n\t\t{\n\t\t\titeration=1;\n\t\t\tfileName=PropertyReader.getProperty(\"anagram_file\");\n\t\t\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be set to sample against the key anagramFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(conf.equals(\"2\"))\n\t\t{\n\t\t\titeration=Integer.parseInt(PropertyReader.getProperty(\"load_testing_iteration\"));\n\t\t\tfileName=PropertyReader.getProperty(\"large_file\");\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be bigFile against the key largeFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tthis.fileName=fileName;\n\t\t\n\t}", "public void loadProperties() throws IOException\n\t{\n\t\tFile src = new File(\"D://Selenium Stuff//Selenium Workspace//OpenCartL2_28112017//ObjectRepo.properties\");\n\t\tFileInputStream fis = new FileInputStream(src);\n\t\tpro = new Properties();\n\t\tpro.load(fis);\n\t}", "public static void readProperties(String propFilename){\n\t\tString propertiesFilename = propFilename;\n\t\tProperties properties = new Properties();\n\n\t\tFileInputStream in;\n\t\ttry {\n\t\t\tin = new FileInputStream(propertiesFilename);\n\t\t\tproperties.load(in);\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading properties \"+propertiesFilename);\n\t\t\tSystem.exit(1);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tString path=\"Not set\";\n\t\tint popSize=0;\n\t\tint features=0;\n\t\tint maxGenerations=0;\n\t\tboolean log=false;\n\t\tboolean debug=false;\n\t\tboolean printbest=false;\n\t\tboolean cwd=false;\n\t\tboolean arrcache=false;\n\t\tdouble addSubRangeH;\n\t\tdouble divMultRangeH;\n\t\tdouble randomThicknessRange;\n\t\tdouble randomVelocityRange;\n\n\t\tdouble addSubRangeVS;\n\t\tdouble divMultRangeVS;\n\n\t\tint zThreshold=0;\n\t\tboolean useThreshold = true;\n\n\tif(properties.containsKey(\"path\")){\n\t\tpath = ((String)properties.get(\"path\"));\n\t\tif(properties.containsKey(\"cwd\")){\n\t\t\tcwd = Boolean.parseBoolean((String)properties.get(\"cwd\"));\n\t\t}\n\t\tc.path=path;\n\t\tc.setPaths(cwd);\n\t}else{\n\t\tSystem.out.println(\"Path : \"+path);\n\t\tSystem.exit(1);\n\t}if(properties.containsKey(\"populationSize\")){\n\t\tpopSize = Integer.parseInt((String)properties.get(\"populationSize\"));\n\t\tc.populationSize =popSize;\n\t}if(properties.containsKey(\"printBest\")){\n\t\tprintbest = Boolean.parseBoolean((String)properties.get(\"printBest\"));\n\t\tc.printBest=printbest;\n\t}if(properties.containsKey(\"maxGenerations\")){\n\t\tmaxGenerations = Integer.parseInt((String)properties.get(\"maxGenerations\"));\n\t\tc.maxGenerations=maxGenerations;\n\t}if(properties.containsKey(\"log\")){\n\t\tlog = Boolean.parseBoolean((String)properties.get(\"log\"));\n\t\tc.log=log;\n\t}if(properties.containsKey(\"debug\")){\n\t\tdebug = Boolean.parseBoolean((String)properties.get(\"debug\"));\n\t\tc.debug=debug;\n\t}if(properties.containsKey(\"features\")){\n\t\tfeatures = Integer.parseInt((String)properties.get(\"features\"));\n\t\tc.features=features;\n\t}if(properties.containsKey(\"addSubRangeH\")){\n\t\taddSubRangeH = Double.parseDouble((String)properties.get(\"addSubRangeH\"));\n\t\tc.addSubRangeH=addSubRangeH;\n\t}if(properties.containsKey(\"addSubRangeVS\")){\n\t\taddSubRangeVS = Double.parseDouble((String)properties.get(\"addSubRangeVS\"));\n\t\tc.addSubRangeVS=addSubRangeVS;\n\t}if(properties.containsKey(\"divMultRangeH\")){\n\t\tdivMultRangeH = Double.parseDouble((String)properties.get(\"divMultRangeH\"));\n\t\tc.divMultRangeH=divMultRangeH;\n\t}if(properties.containsKey(\"divMultRangeVS\")){\n\t\tdivMultRangeVS = Double.parseDouble((String)properties.get(\"divMultRangeVS\"));\n\t\tc.divMultRangeVS=divMultRangeVS;\n\t}if(properties.containsKey(\"randomThicknessRange\")){\n\t\trandomThicknessRange = Double.parseDouble((String)properties.get(\"randomThicknessRange\"));\n\t\tc.randomThicknessRange=randomThicknessRange;\n\t}if(properties.containsKey(\"randomVelocityRange\")){\n\t\trandomVelocityRange = Double.parseDouble((String)properties.get(\"randomVelocityRange\"));\n\t\tc.randomVelocityRange=randomVelocityRange;\n\t}if(properties.containsKey(\"zThreshold\")){\n\t\tzThreshold = Integer.parseInt((String)properties.get(\"zThreshold\"));\n\t\tc.zThreshold=zThreshold;\n\t}if(properties.containsKey(\"useThreshold\")){\n\t\tuseThreshold = Boolean.parseBoolean((String)properties.get(\"useThreshold\"));\n\t\tc.useThreshold=useThreshold;\n\t}\n\n\tSystem.out.println(\" Debug? \"+debug + \" | Log? \"+ log + \" | printBest? \"+ printbest);\n\tSystem.out.println(\"Pop: \"+c.populationSize+\" | Max Gens: \"+ maxGenerations+ \"\\nPath: \"+c.path);\n\tSystem.out.println(\"randomThicknessRange :\"+c.randomThicknessRange+\" randomVelocityRange :\"+c.randomVelocityRange);\n\tSystem.out.println(\"AddSubRange H :\"+c.addSubRangeH+\" VS :\"+c.addSubRangeVS);\n\tSystem.out.println(\"divMultRange H :\"+c.divMultRangeH+\" VS :\"+c.divMultRangeVS);\n\tSystem.out.println(\"Threshold ? \"+c.useThreshold+\" : \"+c.zThreshold);\n\t}", "public MutablePropertiesPropertySource(File propertiesLocation, int defaultOrdinal) {\n super(propertiesLocation.toString(), defaultOrdinal);\n try {\n this.file = propertiesLocation;\n refresh();\n } catch (Exception e) {\n LOG.log(Level.SEVERE, \"Cannot convert file to URL: \" + propertiesLocation, e);\n }\n }", "public Properties readParameters(String filename) {\n\t// Läser in parametrar för simuleringen\n\t// Metoden kan läsa från terminalfönster, dialogrutor\n\t// eller från en parameterfil. Det sista alternativet\n\t// är att föredra vid uttestning av programmet eftersom\n\t// man inte då behöver mata in värdena vid varje körning.\n // Standardklassen Properties är användbar för detta.\n\n Properties p = new Properties();\n try {\n p.load(new FileInputStream(filename));\n } catch (IOException e) {\n System.out.println(e);\n }\n return p;\n }", "public void getConfigProperty() {\n Properties properties = new Properties();\n try(InputStream input = new FileInputStream(\"config.properties\");){\n properties.load(input);\n logger.info(\"BASE URL :\" + properties.getProperty(\"BASEURL\"));\n setBaseUrl(properties.getProperty(\"BASEURL\"));\n setLoginMode(properties.getProperty(\"LOGINMODE\"));\n setProjectId(properties.getProperty(\"PROJECTID\"));\n setReportId(properties.getProperty(\"REPORTID\"));\n if (!(properties.getProperty(\"PASSWORD\").trim().equals(\"\"))) {\n setPassword(properties.getProperty(\"PASSWORD\"));\n }\n if (!(properties.getProperty(\"USERNAME\").trim().equals(\"\"))) {\n setUserName(properties.getProperty(\"USERNAME\"));\n }\n }catch(IOException ex) {\n logger.debug(\"Failed to fetch value from configure file: \", ex);\n }\n\n }", "static void getProps() throws Exception {\r\n\t\tFileReader fileReader = new FileReader(\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\t\tProperties properties = new Properties();\r\n\r\n\t\tproperties.load(fileReader);\r\n\r\n\t\tSystem.out.println(\"By using File Reader: \" + properties.getProperty(\"username\"));\r\n\r\n\t}", "protected Properties loadClientProperties(String filename) throws Exception {\n InputStream is = null;\n try {\n Properties props = new Properties();\n\n // Open the properties file specified by the user.\n File f = new File(filename);\n if (f.exists()) {\n is = new FileInputStream(f);\n } else {\n throw new FileNotFoundException(\"Properties file '\" + filename + \"' not found.\");\n }\n\n // Load the properties.\n props.load(is);\n is.close();\n\n return props;\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "private void loadProperties() {\n driver = JiveGlobals.getXMLProperty(\"database.defaultProvider.driver\");\n serverURL = JiveGlobals.getXMLProperty(\"database.defaultProvider.serverURL\");\n username = JiveGlobals.getXMLProperty(\"database.defaultProvider.username\");\n password = JiveGlobals.getXMLProperty(\"database.defaultProvider.password\");\n String minCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.minConnections\");\n String maxCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.maxConnections\");\n String conTimeout = JiveGlobals.getXMLProperty(\"database.defaultProvider.connectionTimeout\");\n // See if we should use Unicode under MySQL\n mysqlUseUnicode = Boolean.valueOf(JiveGlobals.getXMLProperty(\"database.mysql.useUnicode\")).booleanValue();\n try {\n if (minCons != null) {\n minConnections = Integer.parseInt(minCons);\n }\n if (maxCons != null) {\n maxConnections = Integer.parseInt(maxCons);\n }\n if (conTimeout != null) {\n connectionTimeout = Double.parseDouble(conTimeout);\n }\n }\n catch (Exception e) {\n Log.error(\"Error: could not parse default pool properties. \" +\n \"Make sure the values exist and are correct.\", e);\n }\n }", "public static Properties loadProperties(String filePath)\n {\n \tProperties listProperties = new Properties();\n\t\t//System.out.println(filePath);\n\n\t\tFileInputStream file = null;\n\t\ttry \n\t\t{\n\t\t\tfile = new FileInputStream(filePath);\n\t\t\t\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\t listProperties.load(file);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listProperties;\n }", "public static Properties load(File file) {\n\t\ttry {\n\t\t\tif (file != null && file.exists()) {\n\t\t\t\treturn load(new FileInputStream(file));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "void readProperties(java.util.Properties p) {\n }", "public void setDefaultProperties(ResourceProperties defaultProperties) {\n this.defaultProperties = defaultProperties;\n update();\n }", "public static Properties readProperties(String filePath){\n try {\n FileInputStream fileInputStream= new FileInputStream(filePath);\n properties=new Properties();\n properties.load(fileInputStream);\n fileInputStream.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return properties;\n }", "@Override\r\n public void initValues() {\r\n try {\r\n crackedPasswords = Files.readAllLines(Paths.get(DefectivePasswordValidatorConstants.PASSWORD_FILE_PATH),\r\n StandardCharsets.UTF_8);\r\n } catch (IOException e) {\r\n log.error(\"Exception occured while reading and initializing values from \"\r\n + DefectivePasswordValidatorConstants.PASSWORD_FILE_NAME, e);\r\n }\r\n }", "public void setPropertiesFile(File propertiesFile) {\n this.propertiesFile = propertiesFile;\n }", "public static Properties loadProperties(final String filename) throws IllegalArgumentException {\n final File file = new File(filename);\n final Properties properties = new Properties();\n try {\n properties.load(new FileInputStream(file));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(\"File not found: \" + file, ex);\n } catch (IOException ex) {\n throw new IllegalArgumentException(\"Unable to load properties: \" + file, ex);\n }\n return properties;\n }", "public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}" ]
[ "0.6939147", "0.68105227", "0.6757202", "0.66560906", "0.662677", "0.648806", "0.64799833", "0.64654815", "0.6450124", "0.64225197", "0.64136016", "0.63676167", "0.6341487", "0.6249271", "0.62272507", "0.6183831", "0.61740327", "0.6165256", "0.6157992", "0.61552024", "0.6151442", "0.61274225", "0.6126034", "0.6095808", "0.60904145", "0.6083043", "0.60818005", "0.6074855", "0.6069929", "0.6039231", "0.6021766", "0.60201603", "0.60146725", "0.6001977", "0.5960215", "0.595628", "0.5956038", "0.5954541", "0.59472823", "0.5941704", "0.5938352", "0.5927347", "0.5920799", "0.5918256", "0.5907752", "0.5900784", "0.58914536", "0.5890904", "0.5889442", "0.5884416", "0.58732176", "0.58727163", "0.5861629", "0.58470476", "0.58409053", "0.5838598", "0.5837454", "0.58332974", "0.5814105", "0.58076984", "0.58009374", "0.580023", "0.5798281", "0.5795804", "0.5793934", "0.579069", "0.57879394", "0.57867724", "0.5779491", "0.5778763", "0.57778215", "0.57758665", "0.5774149", "0.5772868", "0.5724047", "0.5713624", "0.57064855", "0.5704986", "0.56985295", "0.5687067", "0.56869125", "0.5683646", "0.56784445", "0.5676637", "0.56747556", "0.56700903", "0.5651415", "0.56484747", "0.56474644", "0.564154", "0.5639395", "0.5635897", "0.56277317", "0.56271344", "0.5621901", "0.5615317", "0.56111246", "0.56085247", "0.5604296", "0.55927956" ]
0.6517247
5
Returns the value of the Server Property specified by the key.
public String get(String key) { return this.properties.getProperty(key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getPropertyValue(String key){\n return properties.getProperty(key);\n }", "private String getValueFromProperty(String key) {\n\t\treturn properties.getProperty(key);\n\n\t}", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "public String getValue(String key) {\r\n\t\t\treturn prop.getProperty(key);\r\n\t\t}", "public String getProperty(String key) {\n String value = properties.getProperty(key);\n return value;\n }", "public String getValue(String key) {\n\t\t\treturn properties.get(key);\n\t\t}", "public static String getProperty(String key) {\r\n\t\treturn prop.getProperty(key);\r\n\t}", "public static String getProperty(String key) {\n\t\treturn properties.getProperty(key);\n\t}", "public static String getValue(String key) {\r\n\t\tload();\r\n\t\treturn properties.getProperty(key);\r\n\t}", "public static String get(String key) {\n return properties.getProperty(key);\n }", "public String getProperty(String key) {\n\t\treturn this.properties.get(key);\n\t}", "public String getProperty(String key) {\n\t\treturn this.properties.getProperty(key);\n\t}", "public String getProperty( String key )\n {\n List<Props.Entry> props = this.props.getEntry();\n Props.Entry keyObj = new Props.Entry();\n keyObj.setKey( key );\n\n String value = null;\n int indx = props.indexOf( keyObj );\n if ( indx != -1 )\n {\n Props.Entry entry = props.get( props.indexOf( keyObj ) );\n value = entry.getValue();\n }\n\n return value;\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public Object getProperty(Object key) {\r\n\t\treturn properties.get(key);\r\n\t}", "public static String get(ServerProperty property)\n\t{\n\t\tString value = properties.getProperty(property.getKey());\n\n\t\treturn StringUtils.isEmpty(value) ? property.getDefaultValue() : value;\n\t}", "public String getProp(String key) {\n\t\treturn prop.getProperty(key);\n\t}", "public String getPropertyValue(String key) {\n return prop != null ? prop.getProperty(key) : ApplicationConstants.EMPTY_STRING;\n }", "@Override\r\n\tpublic String getProperty(String key) {\r\n\t\t\r\n\t\treturn Settings.getProperty(key);\r\n\t\t\r\n\t}", "public String getValue(final String key) {\n final ConfigProperty cp = get(key);\n return cp != null ? cp.getValue() : null;\n }", "public String getPropertyeee(String key) {\n if (key == null) {\n return null;\n }\n String value = properties.getProperty(key);\n if (value == null) {\n return null;\n }\n return value;\n }", "public static String getProperty(String key) {\n if (prop == null) {\n return null;\n }\n return prop.getProperty(key);\n }", "public static String getProperty (String key) {\n return SystemProperties.getProperty(key);\n }", "Object getProperty(String key);", "public static String getProperty(String key) {\r\n if (oProperties == null) {\r\n oInstance.loadProperties();\r\n }\r\n return oProperties.getProperty(key);\r\n }", "public String getProperty(String key) {\n \t\tSecurityManager sm = System.getSecurityManager();\n \n \t\tif (sm != null) {\n \t\t\tsm.checkPropertyAccess(key);\n \t\t}\n \n \t\treturn (framework.getProperty(key));\n \t}", "public static String getProperty(String key) {\n\t\tString val = properties.getProperty(key);\n\t\tif (val == null) {\n\t\t\tAlert.raise(null, \"Unable to find config property named '\" + key + \"' in \"\n\t\t\t\t\t+ Configuration.configFileName);\n\t\t}\n\t\treturn val;\n\t}", "public final String readProperty(@NonNull final String key){\n return mProperties.getProperty(key);\n }", "private String get(String key)\n {\n return settings.getProperty(key);\n }", "public final String readProperty(final String key){\n return mProperties.getProperty(key);\n }", "public static String getProperty(String key) {\r\n\r\n\t\treturn getProperties(LanguageManagerUtil.getCurrentLanguage()).getString(key);\r\n\t}", "public Object getProperty(String key) {\n return commandData.get(key);\n }", "public static final String getPropertyString(String key) {\n\t\tProperties props = new Properties();\n\t\tprops = loadProperties(propertyFileAddress);\n\t\treturn props.getProperty(key);\n\t}", "public ConfigProperty get(final String key) {\n ArgumentChecker.notNull(key, \"key\");\n return _properties.get(key);\n }", "@Override\r\n\tpublic String get(Object key) {\r\n\t\tif (key == null) return null;\r\n\t\treturn getProperty(key.toString());\r\n\t}", "public\n String getProperty_String(String key)\n {\n if (key == null)\n return null;\n\n String val = getProperty(key);\n\n return val;\n }", "public String getProperty(String key) {\r\n \tif (mConfig.containsKey(key)){\r\n \t\treturn mConfig.getProperty(key);\r\n \t}else{\r\n \t\tSystem.out.println(\"[ERROR] Not defined property key: \" + key);\r\n \t\treturn null;\r\n \t}\r\n \r\n }", "public String getValue(final String key) {\n\n\t\treturn config.getString(StringUtils.lowerCase(key));\n\t\t\t}", "public String getProperty(String key) {\n\t\treturn Optional.ofNullable(env.get(key)).orElseGet(()->\"\");\n\t}", "protected abstract String getPropertyValue(Server instance);", "public static String getProp(String key) {\n try {\n Process process = Runtime.getRuntime().exec(String.format(\"getprop %s\", key));\n String value = new BufferedReader(new InputStreamReader(process.getInputStream())).readLine();\n process.destroy();\n return value;\n } catch (IOException e) {\n Log.d(\"getProp exception\", e.toString(), e);\n return null;\n }\n }", "public static String get(String key){\n\t\tif(sys_cfg == null){\n\t\t\tsys_cfg = new Configuration(\"text.properties\");\n\t\t}\n\t\tString value = sys_cfg.getValue(key);\n\t\treturn value;\n\t}", "public String getStringProperty(String key) {\n \n return environment.getProperty(key, String.class);\n }", "public static synchronized String getPropValue(String key, String path)\r\n/* */ {\r\n/* 21 */ if (p == null) {\r\n/* 22 */ String npath = path + \"WEB-INF/classes/config.properties\";\r\n/* 23 */ InputStream is = null;\r\n/* */ try {\r\n/* 25 */ is = new FileInputStream(npath);\r\n/* */ } catch (FileNotFoundException e1) {\r\n/* 27 */ e1.printStackTrace();\r\n/* */ }\r\n/* 29 */ p = new Properties();\r\n/* */ try {\r\n/* 31 */ p.load(is);\r\n/* */ } catch (IOException e) {\r\n/* 33 */ e.printStackTrace();\r\n/* */ }\r\n/* */ }\r\n/* 36 */ return p.getProperty(JobStandConfs.work_base_dir);\r\n/* */ }", "public <T> WorldStateValue<T> getPropertyValue (String key)\n\t{\n\t\tif (!properties.containsKey(key))\n\t\t{\n\t\t\t//Handle error\n\t\t\treturn new WorldStateValue(false); //This is not correct! Needs fixing later\n\t\t}\n\t\treturn properties.get(key).value;\n\t}", "public String getProperty(String key) {\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n return this.attributes.getProperty(key);\n }", "@Override\n\tpublic Object get(Object key) throws Exception {\n\t\treturn propertyConfigMapper.selectByPrimaryKey(key);\n\t}", "public Object get(String key) {\r\n\t\treturn settings.get(key);\r\n\t}", "public String getProperty(Class type, String key);", "private static String getProperty(String key)\r\n/* 70: */ throws IOException\r\n/* 71: */ {\r\n/* 72: 71 */ log.finest(\"OSHandler.getProperty\");\r\n/* 73: 72 */ File propsFile = getPropertiesFile();\r\n/* 74: 73 */ FileInputStream fis = new FileInputStream(propsFile);\r\n/* 75: 74 */ Properties props = new Properties();\r\n/* 76: 75 */ props.load(fis);\r\n/* 77: 76 */ String value = props.getProperty(key);\r\n/* 78: 77 */ fis.close();\r\n/* 79: 78 */ log.finest(\"Key=\" + key + \" Value=\" + value);\r\n/* 80: 79 */ return value;\r\n/* 81: */ }", "String get(String key) {\n return settings.get(key);\n }", "public String getProperty(Object obj, String key);", "public static String getProperty(String key) {\n String valorPropiedad = null;\n\n valorPropiedad = getInstance().propert.getProperty(key);\n\n if (valorPropiedad != null) {\n valorPropiedad = valorPropiedad.trim();\n }\n\n return valorPropiedad;\n }", "public static String getConfigValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"config\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "public String getConfigurationValue(String key) {\n // format property key\n String propertyKey = key;\n if (this.PROPERTY_PART != null) {\n propertyKey = MessageFormat.format(key, new Object[] { this.PROPERTY_PART });\n }\n\n // get value\n String value = this.CONFIGURATION.get(propertyKey);\n\n // trim value\n if (value != null) {\n value = value.trim();\n\n // set as null if empty string\n if (value.length() == 0) {\n value = null;\n }\n }\n\n this.LOGGER.logDebug(new Object[] { \"Extracted configuration for key: \", propertyKey, \" value: \", value },\n null);\n\n return value;\n }", "public static String getProperty(String settingsPath, String key) {\n\t\tString v = \"\";\n\t\tProperties p = new Properties();\n\t\ttry {\n\t\t\tp.load(new FileInputStream(settingsPath));\n\t\t\tv = p.getProperty(key);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn v;\n\t}", "public int getPropertyInt(String key);", "public String get(String key) {\n\t\tInstant start = Instant.now();\n\t\tString value = getConfig(key);\n\t\tLOGGER.debug(\"Access to config {} to get {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn value;\n\t}", "public static String getPropValue(Config config, String key ) throws Exception {\n\t\tif( config.getObject(\"eagleNotificationProps\") == null )\n\t\t\tthrow new Exception(\"Eagle Notification Properties not found in application.conf \");\n\t\tConfigObject notificationConf = config.getObject(\"eagleNotificationProps\");\n\t\treturn notificationConf.get(key).unwrapped().toString();\n\t}", "public static String valueOf(String key) {\n try {\n if (!getInstance().containsKey(key)) {\n return \"\";\n } else {\n return getInstance().getProperty(key);\n }\n } catch (FileNotFoundException e) {\n System.err.println(\"Couldn't find \" + PROPERTIES_FILE);\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "public static String getProp(PropertiesAllowedKeys key) {\n\t\ttry {\n\t\t\treturn (String) properties.get(key.toString());\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"You just found a bug in marabou. Marabou requested a config key from marabou.properties that is non existent.\\n\"\n\t\t\t\t\t\t\t+ \"Please file a bug report and include this messages and what you just did.\");\n\t\t\treturn \"\";\n\t\t}\n\t}", "public static String getProperty(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n String propValue = \"\";\n propValue = props.getProperty(aKey);\n return propValue;\n }", "String getEnvironmentProperty(String key);", "public String getVal(String key) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n return kv.get().getCfgVal();\n }\n\n return null;\n }", "public long getLongProperty(String key) {\n\t\treturn Long.parseLong(this.getProperty(key));\n\t}", "public static String getProperty( String key )\r\n {\r\n if (System.getProperties().containsKey( key ))\r\n {\r\n return System.getProperty( key );\r\n }\r\n return _resourceBundle.getString( key );\r\n }", "public String getSubstitutionProperty(String key)\n {\n String substKey = getSubstitutionPropertyKey(key);\n return getProperty(substKey);\n }", "public String get(String key) {\n return getData().get(key);\n }", "java.lang.String getPropertiesOrThrow(\n java.lang.String key);", "@Override\n\t\tpublic Object getProperty(String key) {\n\t\t\treturn null;\n\t\t}", "public String loggableValue(final String key) {\n ArgumentChecker.notNull(key, \"key\");\n final ConfigProperty cp = _properties.get(key);\n return cp != null ? cp.loggableValue() : null;\n }", "protected String getProperty(String key) {\r\n\t\ttry {\r\n\t\t\tif (null == key || (\"\").equals(key.trim())) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\treturn rb.getString(key);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tLOG.error(\"Can't find key \" + key + \"in resource bundle file\", ex);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public String getPropertyValue(String key){\n\t\treturn this.prop.getProperty(key,\"Default Value\");\n\t}", "public Object get(String key){ \r\n\t\treturn this.context.getValue(key);\r\n\t}", "String getProperty(String property);", "public String get(String key) {\n return this.map.get(key);\n }", "public String getSetting(String key) throws SQLException {\n\t\treturn db.selectItem(\"value\", \"settings\", \"`key`='\"+key+\"'\");\n\t}", "public Mono<EntityProperty> addonPropertiesResourceGetAddonPropertyGet(String addonKey, String propertyKey) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'addonKey' is set\n if (addonKey == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'addonKey' when calling addonPropertiesResourceGetAddonPropertyGet\");\n }\n // verify the required parameter 'propertyKey' is set\n if (propertyKey == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'propertyKey' when calling addonPropertiesResourceGetAddonPropertyGet\");\n }\n // create path and map variables\n final Map<String, Object> pathParams = new HashMap<String, Object>();\n\n pathParams.put(\"addonKey\", addonKey);\n pathParams.put(\"propertyKey\", propertyKey);\n\n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n\n final String[] localVarAccepts = { \n \"application/json\"\n };\n final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n final String[] localVarContentTypes = { };\n final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n\n String[] localVarAuthNames = new String[] { };\n\n ParameterizedTypeReference<EntityProperty> localVarReturnType = new ParameterizedTypeReference<EntityProperty>() {};\n return apiClient.invokeAPI(\"/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}\", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);\n }", "String getValue(Key key) {\n return this.parameters.get(key);\n }", "public static String getProperty(final String key) {\n String str = null;\n if (resourceBundle != null) {\n str = resourceBundle.getString(key);\n LOGGER.debug(\"Value found: \" + str + \" for key: \" + key);\n } else {\n LOGGER.debug(\"Properties file was not loaded correctly!!\");\n }\n return str;\n }", "public Object getOption(String key) {\n\t\tint index = propertyKeys.indexOf(key);\n\t\tif (index == -1)\n throw new IllegalArgumentException(\"Unknown option \" + key);\n\t\treturn currentOption.get(index);\n\t}", "public static long getLongProperty(String key) {\r\n\t\treturn getLongProperty(key, 0);\r\n\t}", "public int getIntegerProperty(String key) {\n\t\treturn Integer.parseInt(this.getProperty(key));\n\t}", "public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\tString val = System.getProperty(key);\n\t\tif (val != null) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Key not in System.properties try loaded data instead\n\t\tsynchronized (fileSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : fileSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\n\t\t// Key not in file based settings, try classpath settings instead\n\t\tsynchronized (defaultClasspathSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : defaultClasspathSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n */\n\t\tthrow new UnknownID(\"No match for key '\" + key + \"' in settings\");\n\t}", "String getSettingByKey(String key);", "public Object get(String key) {\n \t\treturn this.get(null, key);\n \t}", "public String getPropertyKey() {\n\t\treturn propertyKey;\n\t}", "public String getAsString(String key) {\n return entries.getProperty(key);\n }", "public String getConfig(String configKey) {\n\t\t// Do something if key doesn't exist\n\t\t\n\t\treturn serverOptions.get(configKey);\n\t}", "public static String getValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"message\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "public Object get(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null)\n\t\t\treturn null;\n\t\treturn value.value;\n\t}", "public String getURL(String key) {\n return propertiesConfiguration.getString(key);\n }", "public int getIntegerProperty(String key) {\n String val = getProperty(key);\n return (null == val ? 1 : Integer.parseInt(val));\n }", "private PropertyValueEntity getPropertyValueFromZK(String domain,String key,CuratorWatcher watcher){\n try {\n String ratDomainNode = propertyBaseZKNode+domain;\n String ratDomainKeyNode=propertyBaseZKNode+domain+\"/\"+key;\n if(zkClient.existsNode(ratDomainKeyNode)){\n byte[] datas = zkClient.getNodeValue(ratDomainKeyNode, watcher);\n if(datas==null){\n return null;\n }\n String strData = new String(datas,\"UTF-8\");\n JSON json = JSON.parseObject(strData);\n return JSON.toJavaObject(json,PropertyValueEntity.class);\n }\n notExistsNode.put(ratDomainKeyNode,ratDomainNode);\n if(zkClient.existsNode(ratDomainNode)){\n return null;\n }\n if(zkClient.existsNode(propertyBaseZKNode)){\n return null;\n }\n return null;\n }catch (Exception e){\n e.printStackTrace();\n return null;\n }\n }", "public static String extractFromPropertiesFile(String key) throws IOException {\n\t\tFileInputStream fis = new FileInputStream(\"./env.properties\");\n\t\tProperties prop = new Properties();\n\t\tprop.load(fis);\t\n\t\treturn prop.getProperty(key);\n\t}", "public Object setProperty(String key, String value) {\n return this.props.setProperty(key, value);\n }", "public Object getSessionProperty(String key) {\n\t\tif (_sessionPropertyList.containsKey(key)) {\n\t\t\treturn _sessionPropertyList.get(key);\n\t\t}\n\t\treturn null;\n\t}", "public Object get(String key) {\n return options.get(key);\n }" ]
[ "0.7660628", "0.75640863", "0.75271463", "0.7453343", "0.7444549", "0.74405986", "0.7294969", "0.72273856", "0.7214122", "0.72023135", "0.7199795", "0.71994513", "0.7186468", "0.7167111", "0.7167111", "0.7167111", "0.70683414", "0.69855034", "0.69638145", "0.6954487", "0.69445264", "0.6896846", "0.6855409", "0.6832463", "0.67871135", "0.67786527", "0.6770282", "0.6746624", "0.67409104", "0.6700617", "0.6692317", "0.6691862", "0.66720676", "0.66528016", "0.662533", "0.6619979", "0.6602349", "0.6575611", "0.65613115", "0.6553625", "0.6530593", "0.65286416", "0.6517697", "0.6437536", "0.6436919", "0.6435099", "0.6423104", "0.6384256", "0.6336944", "0.63333434", "0.6324356", "0.6296135", "0.62939066", "0.6219581", "0.6213355", "0.6169313", "0.6167089", "0.61024445", "0.6101779", "0.6100859", "0.6080186", "0.6061666", "0.60427266", "0.60411453", "0.60219854", "0.60194325", "0.6007139", "0.60020584", "0.5992546", "0.59865713", "0.5978152", "0.590196", "0.5893639", "0.58743083", "0.5869432", "0.5851691", "0.58497", "0.5848168", "0.58351654", "0.58317554", "0.5830115", "0.58241993", "0.57826257", "0.57737446", "0.57656306", "0.5759469", "0.57521725", "0.5751093", "0.5746988", "0.57467425", "0.57412404", "0.5699849", "0.5697464", "0.56948733", "0.569032", "0.56869894", "0.5675036", "0.5666724", "0.5666284", "0.5665658" ]
0.74747115
3
Ensures that the there is no leading or trailing whitespace in the property values. The fact that we need to do this indicates a bug in Java's Properties implementation to me.
private void trimProperties(Properties properties) { // Have to do this iteration in a Java 5 compatible manner. no stringPropertyNames(). for (Map.Entry<Object, Object> entry : properties.entrySet()) { String propName = (String) entry.getKey(); properties.setProperty(propName, properties.getProperty(propName).trim()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean skipBlankValues() {\n return true;\n }", "public static boolean avoidSpecialCharsInFieldNames() {\n\t\treturn PROP_SEP_LEN > 1;\n\t}", "Rule WhiteSpace() {\n return ZeroOrMore(AnyOf(\" \\n\\r\\t\\f\"));\n }", "@Test\n\tpublic void testTrimmingWhiteSpaces() {\n\t\t// Setup\n\t\tString file = \" file.name \";\n\n\t\t// Exercise\n\t\tLine line = new Line(\"5\", \"5\", file);\n\n\t\t// Verify\n\t\tassertEquals(\"file.name\", line.toString());\n\t}", "public boolean getTrimSpaces();", "@Override\n public boolean isLenientProperties() {\n return true;\n }", "public boolean supportsTrimChar() {\n return false;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName1(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \" \", Integer.class);\n }", "public final void setProperty(final String key, final String value)\n {\n\n if (!StringUtils.isBlank(key))\n {\n\n if ((StringUtils.isBlank(value)) || (StringUtils.isEmpty(value)))\n {\n this.fProp.setProperty(StringUtils.deleteWhitespace(key)\n .toLowerCase().trim(), \" \");\n } else\n {\n this.fProp.setProperty(StringUtils.deleteWhitespace(key)\n .toLowerCase().trim(), value.trim());\n } // end if..else\n } // end outer if.else\n\n }", "@Test\n public void testGetDuplicateTranslationKeysWithEmptyLine() throws Exception {\n final File testFile = getTestFile(\"messages.properties\");\n FileUtils.writeLines(testFile, Arrays.asList(\"emptyline.dup=foo\", \"emptyline.not.dup=bar\", \" \", \"emptyline.dup=fizzbuzz\"));\n assertThat(parser.getDuplicateTranslationKeys(testFile)).hasSize(1).contains(\"emptyline.dup\");\n }", "@Test\n public void testSafeTrimToNull() {\n assertNull(Strings.safeTrimToNull(\" \\n\\t \\n\"));\n assertNull(Strings.safeTrimToNull(null));\n assertEquals(\"hello there!\", Strings.safeTrimToNull(\" hello there! \\n\"));\n }", "private boolean getReplaceNonBreakingSpace() {\n return false;\n }", "@Test\n public void emptyElementsInPropertyFile() throws Exception {\n String output = \"\";\n\n StmtIterator msIter = propertyOutput.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n if (msStmt.getSubject().toString().equals(\"\") ||\n msStmt.getPredicate().toString().equals(\"\") ||\n msStmt.getObject().toString().equals(\"\") ||\n msStmt.getSubject().toString().equals(\"urn:\") ||\n msStmt.getPredicate().toString().equals(\"urn:\") ||\n msStmt.getObject().toString().equals(\"urn:\")\n ) {\n output += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n // Output assertion with message of results\n if (!output.equals(\"\"))\n assertTrue(\"\\nThe following triples in \" + propertyOutputFileName + \" have an empty element:\\n\" + output\n , false);\n else\n assertTrue(true);\n }", "private void skipBlankSpaces() {\n while (currentIndex < this.data.length) {\n if (!Character.isWhitespace(data[currentIndex])) {\n break;\n }\n currentIndex++;\n }\n }", "private String getTrimmedValue(String value) {\n\t\treturn value == null ? \"\" : value.trim();\n\t}", "@Test\n public void testSafeTrim() {\n assertEquals(\"\", Strings.safeTrim(null));\n assertEquals(\"\", Strings.safeTrim(\" \\t\\n\"));\n assertEquals(\"hello there!\", Strings.safeTrim(\" hello there! \\n\"));\n }", "private static boolean validateString(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return prop != null && !\"\".equals(prop);\n }", "private void skipBlankSpaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tchar c = data[currentIndex];\n\t\t\tif(c == ' ' || c == '\\t' || c =='\\n' || c == '\\r') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testJustEmptyChars() {\n\t\tSmartScriptLexer lexer = new SmartScriptLexer(\" \\r\\n\\t \");\n\t\t\n\t\tSmartScriptToken expected = new SmartScriptToken(SmartScriptTokenType.TEXT, \" \\r\\n\\t \");\n\t\tassertEquals(lexer.nextToken().getType(), SmartScriptTokenType.TEXT);\n\t\tassertEquals(lexer.getToken().getValue(), expected.getValue());\n\t}", "Boolean isBlankOrNull(String key)\n {\n return StringUtils.isBlank(properties.getProperty(key));\n }", "@Test\n\tpublic void testEmptyLine() {\n\t\tString s = \" \\n\";\n\t\tassertTrue(\"Empty string with line ending\", StringUtil.isEmpty(s));\n\t}", "public void setTrimAllWhite(boolean trimAllWhite) {\r\n defaultFormat.trimAllWhite = trimAllWhite;\r\n }", "@Test\n\tpublic void testEmptyString() {\n\t\tString s = \" \\t \";\n\t\tassertTrue(\"Empty string with tab\", StringUtil.isEmpty(s));\n\t}", "@Test\n\tpublic void nonEmptyMultiLine() {\n\t\tString s = \" \\n\" + \"Nothing\";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "private boolean isBlank() {\n\t\tchar currentChar = data[index];\n\t\tif (currentChar == '\\r' || currentChar == '\\n' || currentChar == '\\t' || currentChar == ' ') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "static public final boolean ccIsAllNoneSpace(String pxLine){\n return VcStringUtility.ccNulloutString(pxLine)\n .matches(\"^\\\\S+$\");\n }", "private static void assertEqualsIgnoringWhitespace(final String expected, final String actual){\n // assertEquals(expected.replaceAll(\"^ +\", \"\"), actual.replaceAll(\"^ +\", \"\"));\n assertEquals(expected.replaceAll(\"\\\\s+\", \"\"), actual.replaceAll(\"\\\\s+\", \"\"));\n }", "private void removeSpaces(String[] lines) {\r\n for (int i = 0; i<lines.length; i++) {\r\n lines[i] = lines[i].strip();\r\n lines[i] = lines[i].replaceAll(\"\\\"\", \"\");\r\n }\r\n }", "protected static Value canonicalize(Value v) {\n if (Options.get().isDebugOrTestEnabled()) { // checking representation invariants\n String msg = null;\n if ((v.flags & (STR_OTHERNUM | STR_IDENTIFIERPARTS | STR_OTHER)) != 0 && v.str != null)\n msg = \"fixed string and flags inconsistent\";\n else if ((v.flags & STR_PREFIX) != 0 && (v.str == null || v.str.isEmpty()))\n msg = \"prefix string inconsistent\";\n else if ((v.flags & NUM) != 0 && v.num != null)\n msg = \"number facet inconsistent\";\n else if (v.num != null && Double.isNaN(v.num))\n msg = \"number constant is NaN\";\n else if (v.object_labels != null && v.object_labels.isEmpty())\n msg = \"empty set of object labels\";\n else if (v.getters != null && v.getters.isEmpty())\n msg = \"empty set of getters\";\n else if (v.setters != null && v.setters.isEmpty())\n msg = \"empty set of setters\";\n else if (v.excluded_strings != null && v.excluded_strings.isEmpty())\n msg = \"empty set of excluded strings\";\n else if (v.included_strings != null && v.included_strings.isEmpty())\n msg = \"empty set of included strings\";\n else if (v.included_strings != null && v.included_strings.size() <= 1)\n msg = \"invalid number of included strings\";\n else if (v.excluded_strings != null && v.included_strings != null)\n msg = \"has both excluded strings and included strings\";\n else if ((v.flags & UNKNOWN) != 0 && ((v.flags & ~UNKNOWN) != 0 || v.str != null || v.num != null\n || (v.object_labels != null && !v.object_labels.isEmpty())\n || (v.getters != null && !v.getters.isEmpty())\n || (v.setters != null && !v.setters.isEmpty())))\n msg = \"'unknown' inconsistent with other flags\";\n else if (v.var != null && ((v.flags & PRIMITIVE) != 0 || v.str != null || v.num != null\n || (v.object_labels != null && !v.object_labels.isEmpty())\n || (v.getters != null && !v.getters.isEmpty())\n || (v.setters != null && !v.setters.isEmpty())))\n msg = \"mix of polymorphic and ordinary value\";\n else if ((v.flags & (PRESENT_DATA | PRESENT_ACCESSOR)) != 0 && v.var == null)\n msg = \"PRESENT set for non-polymorphic value\";\n else if (v.excluded_strings != null && (v.flags & STR) == 0)\n msg = \"excluded strings present without fuzzy strings\";\n else if (v.included_strings != null && (v.flags & STR) == 0)\n msg = \"included_strings present without fuzzy strings\";\n if (msg != null)\n throw new AnalysisException(\"Invalid value (0x\" + Integer.toHexString(v.flags) + \",\"\n + Strings.escape(v.str) + \",\" + v.num + \",\" + v.object_labels\n + \",\" + v.getters + \",\" + v.setters + \",\" + (v.excluded_strings != null ? Strings.escape(v.excluded_strings) : null)\n + \",\" + (v.included_strings != null ? Strings.escape(v.included_strings) : null) + \"), \" + msg);\n if (Options.get().isPolymorphicDisabled() && v.isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value\");\n }\n canonicalizing = true;\n if (v.object_labels != null)\n v.object_labels = Canonicalizer.get().canonicalizeSet(v.object_labels);\n if (v.getters != null)\n v.getters = Canonicalizer.get().canonicalizeSet(v.getters);\n if (v.setters != null)\n v.setters = Canonicalizer.get().canonicalizeSet(v.setters);\n if (v.excluded_strings != null)\n v.excluded_strings = Canonicalizer.get().canonicalizeStringSet(v.excluded_strings);\n if (v.included_strings != null)\n v.included_strings = Canonicalizer.get().canonicalizeStringSet(v.included_strings);\n v.hashcode = v.computeHashCode();\n Value cv = Canonicalizer.get().canonicalize(v);\n canonicalizing = false;\n return cv;\n }", "@Test\n\tpublic void nonEmptyString() {\n\t\tString s = \" H \";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "@Test\n public void testGetPropertyAsList() {\n System.out.println(\"getPropertyAsList\");\n Properties props = new Properties();\n String key = \"testProp\";\n props.setProperty(key, \"alpha, beta, gamma\");\n List<String> expResult = Arrays.asList(\"alpha\", \"beta\", \"gamma\");\n List<String> result = EngineConfiguration.getPropertyAsList(props, key);\n assertEquals(expResult, result);\n }", "private static void trimTrailingWhitespace(Map<String, Object> inputData) {\n \n String[] tStrs = null;\n List<String> tmpArray = new ArrayList<String>();\n \n for (String paramName : inputData.keySet()) {\n \n tStrs = (String[]) inputData.get(paramName);\n tmpArray.clear();\n \n for (String t : tStrs) {\n tmpArray.add(StringUtils.trimTrailingWhitespace(t));\n }\n \n inputData.put(paramName, tmpArray.toArray(new String[tmpArray.size()]));\n }\n }", "public void correctStrings() {\n this.content = StringUtils.correctWhiteSpaces(content);\n }", "private static Properties processCommandLineProperties(String[] args)\n {\n Properties props = new Properties();\n\n for (String arg : args) {\n if (!arg.startsWith(\"-\")) {\n continue;\n }\n String definition = arg.substring(1);\n int definitionEquals = definition.indexOf('=');\n if (definitionEquals < 0)\n continue;\n String propName = definition.substring(0, definitionEquals); \n String propValue = definition.substring(definitionEquals+1);\n if (!propName.equals(\"\") && !propValue.equals(\"\"))\n props.put(propName, propValue);\n }\n return props;\n }", "@SuppressWarnings(\"rawtypes\")\n private boolean containsNoValidValueFor(final Dictionary properties,\n final String propertyKey) {\n final Object propertyValue = properties.get(propertyKey);\n return !(propertyValue instanceof String) || StringUtils.isEmpty((String) propertyValue);\n }", "private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \"\", Integer.class);\n }", "@Override\n protected String stringifySeparator() {\n return \" != \";\n }", "private static boolean checkValue(String rawValue) {\n\t\trawValue = rawValue.trim();\n\t\tif (!rawValue.startsWith(\"\\\"\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!rawValue.endsWith(\"\\\"\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "public XMLString fixWhiteSpace(boolean trimHead, boolean trimTail, boolean doublePunctuationSpaces) {\n/* 92 */ return new XMLStringDefault(this.m_str.trim());\n/* */ }", "private boolean isAllWhitespace(Object obj) {\r\n String str = null;\r\n\r\n if (obj instanceof String) {\r\n str = (String) obj;\r\n }\r\n else if (obj instanceof Text) {\r\n str = ((Text) obj).getText();\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < str.length(); i++) {\r\n if ( !isWhitespace( str.charAt( i)))\r\n return false;\r\n }\r\n return true;\r\n }", "private void parseProperties(Properties props) {\r\n\r\n\t\tfor (Object key : props.keySet()) {\r\n\t\t\tString keyStr = key.toString();\r\n\t\t\tString value = props.getProperty(keyStr);\r\n\t\t\tif (value != null) {\r\n\t\t\t\t// try to get real type of property value\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (value.contains(\".\")) {\r\n\t\t\t\t\t\tthis.settings.put(keyStr, Double.parseDouble(value));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.settings.put(keyStr, Integer.parseInt(value));\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tthis.settings.put(keyStr, value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "private void trimWhitespaces() {\n \n while(currentIndex < dataLength && Character.isWhitespace( data[currentIndex] )) {\n ++currentIndex;\n }\n }", "protected static String trimmed(String value) {\n return (value != null) ? value.trim() : null;\n }", "private void setStringPropertyUnlessEqual(StringProperty property, String newValue) {\n if (!property.getValue().equals(newValue)) property.setValue(newValue);\n }", "@Test(timeout=100)\r\n\tpublic void testUnquotedSpace() {\r\n\t\tString [] r1in = {\"aaa \",\" bbb\",\" ccc \"};\r\n\t\tString [] r1out = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"AA AA\",\"\",\"C C\",\"DD DD\"};\r\n\t\twriteArrayToLine(r1in);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1out, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}", "@java.lang.Override\n public boolean hasPunctuationToAppend() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "public void testAssertPropertyLenientEquals_equalsIgnoredDefault() {\r\n assertPropertyLenientEquals(\"stringProperty\", null, testObject);\r\n }", "public boolean isWhiteSpace() {\n return node.getNodeType() == Node.TEXT_NODE && node.getTextContent().trim().length() == 0;\n }", "private void checkLabelValue()\n\t{\n\t\tif(labelValue != null && !\"\".equals(labelValue))\n\t\t{\n\t\t\tlabelValue += \": \";\n\t\t}\n\t}", "private boolean skipSpaceChars() {\r\n \t\tint ch;\r\n \t\twhile ((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isSpaceChar(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "boolean canMatchEmptyString() {\n return false;\n }", "@Test\n void trim_null() {\n assertNull(stringUtil.trim(null));\n }", "public XMLString trim() {\n/* 780 */ return new XMLStringDefault(this.m_str.trim());\n/* */ }", "public String nextPropertyValue()\n {\n if (empty())\n return null;\n int start = position;\n int lastValidPos = position;\n\n int ch = input.charAt(position);\n while (ch != -1 && ch != ';' && ch != '}' && ch != '!' && !isEOL(ch)) {\n if (!isWhitespace(ch)) // don't include an spaces at the end\n lastValidPos = position + 1;\n ch = advanceChar();\n }\n if (position > start)\n return input.substring(start, lastValidPos);\n position = start;\n return null;\n }", "protected boolean shouldAddProperty(String key) {\n return !key.equals(\"label\") && !key.equals(\"id\");\n }", "private boolean spaces() {\r\n return OPT(GO() && space() && spaces());\r\n }", "public void testInsertDoesNotRemoveSystemPropertiesWhenIdIsString() throws Throwable {\n String[] systemProperties = SystemPropertiesTestData.ValidSystemProperties;\n\n for (String systemProperty : systemProperties) {\n insertDoesNotRemovePropertyWhenIdIsString(systemProperty);\n }\n }", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "public boolean isIgnoreMissingChars() {\n return ignoreMissingChars;\n }", "protected boolean skipNullValues() {\n return true;\n }", "protected boolean checkEmpty(String line) {\n return line == null || line.isBlank();\n }", "public\n static\n StringBuffer scanOutProperties(String args, StringBuffer sb)\n {\n int si; // source Index\n \n int len = args.length();\n char c;\n\n int nambeg, namlen;\n int valbeg, vallen;\n\n // set output sb empty\n sb.setLength(0);\n\n // scan entire args for nam/val pairs\n si = 0;\n\n mainscanloop: // outermost scan loop\n for (;;)\n {\n if (si >= len)\n break mainscanloop; // totally done\n\n namvalscanloop: // scan single nam/val pair\n for (;;)\n {\n // ====== begin scan on one pair\n nambeg = -1;\n namlen = 0;\n\n valbeg = -1;\n vallen = 0;\n\n\n // ====== scan past white space before nam\n for (;;)\n {\n if (si >= len)\n break namvalscanloop; // done with this pair\n\n c = args.charAt(si);\n\n if (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r')\n {\n si++;\n continue;\n }\n break;\n }\n\n\n // ====== Start of nam\n // scan len of nam, up to '='\n nambeg = si;\n for (;;)\n {\n if (si >= len)\n break namvalscanloop; // done with this pair\n\n c = args.charAt(si);\n\n if (c == '\\n')\n {\n si++;\n break namvalscanloop; // done with this pair\n }\n\n if (c == '=') // Found delimiter - go on to scan val\n {\n si++;\n break;\n }\n\n namlen++;\n\n si++;\n }\n\n\n // ====== Start of val\n // scan len of val\n // handle \" and ' bounded values\n if (si >= len)\n break namvalscanloop; // done with this pair\n\n c = args.charAt(si);\n\n // === scan to matching \" or '\n if (c == '\\\"' || c == '\\'')\n {\n char matchc = c;\n si++;\n if (si >= len)\n break namvalscanloop; // done with this pair\n\n c = args.charAt(si);\n\n valbeg = si;\n for (;;)\n {\n if (c == '\\n')\n {\n si++;\n break namvalscanloop; // done with this pair\n }\n\n if (c == '\\\\') // Check for escaped \" or '\n {\n if (si + 1 < len)\n {\n if (args.charAt(si + 1) == '\\\"' || args.charAt(si + 1) == '\\'')\n {\n vallen += 2;\n si += 2;\n if (si >= len)\n break namvalscanloop; // done with this pair\n c = args.charAt(si);\n continue;\n }\n }\n }\n\n if (c == matchc)\n {\n si++;\n break namvalscanloop; // done with this pair\n }\n\n vallen++;\n\n si++;\n if (si >= len)\n break namvalscanloop; // done with this pair\n c = args.charAt(si);\n }\n }\n else\n\n // === scan normal value - c is valid upon first entry\n {\n valbeg = si;\n for (;;)\n {\n if (c == '\\n')\n {\n si++;\n break namvalscanloop; // done with this pair\n }\n\n if (c == ' ')\n {\n si++;\n break namvalscanloop; // done with this pair\n }\n\n vallen++;\n\n si++;\n if (si >= len)\n break namvalscanloop; // done with this pair\n c = args.charAt(si);\n }\n }\n\n } // end of namvalscanloop\n\n // append anything accumulated in output sb and go for another pair\n YutilProperties.scanOutPropertiesNamValAppend(args, nambeg, namlen, valbeg, vallen, sb);\n\n } // end of for ever\n\n return sb;\n }", "char skipSpaces () {\n char c = getChar ();\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n if (c == '\\n') { m_nbLines++; }\n c = getNextChar ();\n }\n return c;\n }", "public Value restrictToFalsy() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n if (isMaybeStr(\"\"))\n r.str = \"\";\n else\n r.str = null;\n r.flags &= ~STR;\n if (r.num != null && Math.abs(r.num) != 0.0)\n r.num = null;\n r.object_labels = r.getters = r.setters = null;\n r.flags &= ~(BOOL_TRUE | STR_PREFIX | (NUM & ~(NUM_ZERO | NUM_NAN)));\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }", "private boolean hasEncodedProperties(Properties props) {\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tEnumeration keys = props.keys();\n\t\twhile(keys.hasMoreElements()){\n\t\t\tString key = (String) keys.nextElement();\n\t\t\tString propValue = props.getProperty(key);\n\t\t\tif(propValue.startsWith(ENC_PREFIX)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void setStringPropertyUnlessEqual(StringProperty property, int newValue) {\n String valueAsString = Integer.toString(newValue);\n if (!property.getValue().equals(valueAsString)) property.setValue(valueAsString);\n }", "@Test\n void testAssertPropertyLenientEquals_equalsIgnoredDefault() {\n assertPropertyLenientEquals(\"stringProperty\", null, testObject);\n }", "private static boolean noWhiteSpace(String password) {\n\t\tint whitespaces = 0;\n\t\tfor (int i = 0; i < password.length(); i++) {\n\t\t char c = password.charAt(i);\n\t\t if ( Character.isWhitespace(c) ) {\n\t\t \t whitespaces++;\n\t\t }\n\t\t}\n\t\tif (whitespaces >= 1) {\n\t\t\tSystem.out.println(\"no whitespaces!\");\n\t\t\treturn false;\n\t\t} else return true;\n\t}", "@Test\n\tpublic void testRemoveWhiteSpacesAndPunctuation() {\n\t\tString input = \"2$2?5 5!63\";\n\t\tString actual = GeneralUtility.removeWhiteSpacesAndPunctuation(input);\n\t\tString expected = \"225563\";\n\t\tAssert.assertEquals(expected, actual);\n\t}", "public WhitespaceState()\n\t{\n\t\tsetWhitespaceChars(0, ' ', true);\n\t}", "protected boolean removeDoubleSlashesFromConfigNames() {\n return true;\n }", "public void testProperties(){\n \n if (parent == null)\n return;\n \n tests(parent);\n \n if (testSettings.AP_mnemonics){\n \n //- LOG ONLY - list of conflicts before cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n cleanMnemonicsConflict();\n \n // LOG ONLY - list of conflicts after cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS after clean up = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n }\n \n if (testSettings.AP_noLabelFor)\n checkLabelTextComponentPairs();\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "public void setIgnoreWhitespace(boolean ignoreWhitespace) {\r\n this.ignoreWhitespace = ignoreWhitespace;\r\n }", "private void skipEmptyLines() throws IOException {\n for (;;) {\n if (nextChar != ';') {\n do {\n readNextChar();\n } while (isWhitespace(nextChar));\n if (nextChar != ';') return;\n }\n do {\n readNextChar();\n if (nextChar == -1) return;\n } while (nextChar != '\\n');\n }\n }", "public boolean isIgnoreTrailingChars() {\n return this.ignoreTrailingChars;\n }", "private static boolean isBlank(CharSequence str) {\n int strLen;\n if (str == null || (strLen = str.length()) == 0) {\n return true;\n }\n for (int i = 0; i < strLen; i++) {\n if ((Character.isWhitespace(str.charAt(i)) == false)) {\n return false;\n }\n }\n return true;\n }", "public boolean noSeparator(){\n return separator == EMPTY_CHAR;\n }", "@Override\n\tpublic void addProperty(String key, String value) {\n\n\t\tif (key.equals(key_delimiter) && value.length() == 1) {\n\t\t\tvalue = \"#\" + String.valueOf((int) value.charAt(0));\n\t\t}\n\t\tsuper.addProperty(key, value);\n\t}", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "public void testShouldAddColonExceptSpace(){\n indentlogic.addText(\"except \\n\");\n assertTrue(indentlogic.shouldAddColon());\n }", "@Test\n public void testSetPropertyWithDelimiter() throws ConfigurationException {\n final DatabaseConfiguration config = helper.setUpMultiConfig();\n config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));\n config.setProperty(\"keyList\", \"1;2;3\");\n final String[] values = config.getStringArray(\"keyList\");\n assertArrayEquals(new String[] {\"1\", \"2\", \"3\"}, values);\n }", "public DATATYPE trim() {\n\t\tif (size() > 0) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\t\n\t\t\tfor (int i=0; i < mLines.length; i++) {\n\t\t\t\tif (mLines[i].trim().length() > 0) {\n\t\t\t\t\tlist.add(mLines[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmLines = list.toArray( new String[list.size()] );\n\t\t}\n\t\t\n\t\treturn (DATATYPE) this;\n\t}", "private void filter() {\n // there is only one forbidden sys prop now so no need yet for fancy\n // data structures to contain the one key/value\n\n // I have seen these 2 values:\n // com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder\n // com.sun.enterprise.ee.admin.AppServerMBeanServerBuilder\n\n final String key = \"javax.management.builder.initial\";\n final String forbiddenStart = \"com.sun.enterprise\";\n final String forbiddenEnd = \"AppServerMBeanServerBuilder\";\n\n String val = sysProps.get(key);\n\n if(val != null && val.startsWith(forbiddenStart) && val.endsWith(forbiddenEnd))\n sysProps.remove(key);\n }", "public String removeComplexWhiteSpaces(@NotNull String rawText) {\n return rawText.replaceAll(\"(\\\\s)?\\n\\n(\\\\s)?\", \"\\n\").trim();\n }", "public void dropNullValueProperties(){\n if(properties!=null){\n final Iterator<Map.Entry<String,Object>> iterator = properties.entrySet().iterator();\n for (;iterator.hasNext();) {\n final Object value = iterator.next().getValue();\n if(value == null){\n iterator.remove();\n }\n }\n }\n }", "@Test\n\tpublic void caseNameWithEmpty() {\n\t\tString caseName = \" \";\n\t\ttry {\n\t\t\tStringNumberUtil.stringUtil(caseName);\n\t\t} catch (StringException e) {\n\t\t}\n\t}", "public void setProperty(String keyValuePair) throws PropertiesPlusException\n\t{\n\t\tkeyValuePair = keyValuePair.trim();\n\t\tint i = keyValuePair.indexOf('=');\n\t\tif (i < 1)\n\t\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%nError parsing %s%nExpecting a String containing one '=' sign%n\",\n\t\t\t\t\tkeyValuePair));\n\t\t\n\t\tString key = keyValuePair.substring(0, i).trim();\n\t\tString value = i == keyValuePair.length()-1 ? \"\" : keyValuePair.substring(i+1).trim();\n\t\tsetProperty(key, value);\n\t}", "public void setValue(String value) {\n this.value = value == null ? null : value.trim();\n }", "public void setValue(String value) {\n this.value = value == null ? null : value.trim();\n }", "public void setValue(String value) {\n this.value = value == null ? null : value.trim();\n }", "public String trim(String value) {\r\n return (value == null) ? value : nullable(value.trim());\r\n }", "@org.junit.Test\n public void markingSpaces()\n {\n assertEquals(\"empty\", \"\", markSpaces(\"\"));\n assertEquals(\"simple\", \"just_a_test\", markSpaces(\"just a test\"));\n assertEquals(\"all\", \"just\\\\ta\\\\ntest\\\\f\\\\r_with___all_\\\\n\\\\nthings\",\n markSpaces(\"just\\ta\\ntest\\f\\r with all \\n\\nthings\"));\n }", "protected void convertProperties(Properties props) {\n\t\tEnumeration propertyNames = props.propertyNames();\n\t\twhile (propertyNames.hasMoreElements()) {\n\t\t\tString propertyName = (String) propertyNames.nextElement();\n\t\t\tString propertyValue = props.getProperty(propertyName);\n\t\t\tString convertedValue = convertPropertyValue(propertyValue);\n\t\t\tif (!ObjectUtils.nullSafeEquals(propertyValue, convertedValue)) {\n\t\t\t\tprops.setProperty(propertyName, convertedValue);\n\t\t\t}\n\t\t}\n\t}", "private void checkEmptyLine(String line) {\n if (line.substring(5).replace('\\t', ' ')\n .replace('\\n', ' ').trim().length() != 0) {\n throw new IllegalArgumentException(\"Invalid characters after tag.\");\n }\n }", "Rule ListSeparator() {\n // No effect on value stack\n return Sequence(AnyOf(\",;\"), WhiteSpace());\n }", "@SuppressWarnings(\"unchecked\")\n public PropertyValue<String> getLineCap() {\n return (PropertyValue<String>) new PropertyValue(nativeGetLineCap());\n }" ]
[ "0.627223", "0.62641364", "0.61409277", "0.5781479", "0.5730764", "0.5656096", "0.557327", "0.5545125", "0.5532273", "0.545181", "0.54374117", "0.5406904", "0.53907967", "0.5375453", "0.5368385", "0.5332189", "0.5310151", "0.52968496", "0.52655745", "0.5247179", "0.52378845", "0.52234274", "0.5193658", "0.5152895", "0.51394796", "0.51222456", "0.5121287", "0.50965476", "0.5094213", "0.5089677", "0.5081386", "0.5069661", "0.5058837", "0.50585836", "0.50581396", "0.5042289", "0.5040428", "0.5029067", "0.5016011", "0.5005184", "0.5002721", "0.49928308", "0.49927062", "0.49882331", "0.49863842", "0.49833786", "0.49725327", "0.4964519", "0.49600917", "0.4956438", "0.49185136", "0.48910913", "0.48773867", "0.48673344", "0.4860894", "0.48540768", "0.48491126", "0.48446876", "0.4833582", "0.48274422", "0.48220098", "0.4797092", "0.4796911", "0.47965848", "0.47918656", "0.47908634", "0.4786781", "0.47824377", "0.4779444", "0.47652137", "0.47613385", "0.4758145", "0.47528785", "0.4751287", "0.47444332", "0.47395575", "0.47376227", "0.47370335", "0.47349447", "0.47292084", "0.47201845", "0.47190383", "0.47122055", "0.47100925", "0.47020283", "0.4698496", "0.46974805", "0.46928352", "0.46927875", "0.46788278", "0.46776477", "0.46738783", "0.46738783", "0.46738783", "0.4670694", "0.4654064", "0.46527287", "0.46472776", "0.4646879", "0.46464178" ]
0.68215716
0
equals method must be changed !!
public Point(int x,int y){ this.pos = x; this.id = y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object other) {\n return super.equals(other);\n }", "private Equals() {}", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object other) {\n return this == other;\n }", "@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override \n boolean equals(Object obj);", "@Override\n public boolean equals(Object o) {\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Override\n public boolean equals(Object obj) {\n \n //TODO: Complete Method\n \n return true;\n }", "@Override\n public final boolean equals( Object obj ) {\n return super.equals(obj);\n }", "@Override\n\t\tpublic boolean equals(Object obj) {\n\t\t\treturn super.equals(obj);\n\t\t}", "@Override\n\tpublic boolean equals(Object obj){\n\t\treturn super.equals(obj);\n\t}", "@Override\r\n public boolean equals(Object obj) {\r\n return super.equals(obj);\r\n }", "@Override\n public boolean equals(Object o) {\n return this == o;\n }", "@Override\n boolean equals(Object other);", "@Override\n boolean equals(Object obj);", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}", "@Override\n public final boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Override\n boolean equals(Object o);", "@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn super.equals(o);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object other)\n\t{\n\t\treturn false;\n\t}", "@Override\n public boolean equals(final Object obj) {\n return super.equals(obj);\n }", "@Override\n public boolean equals(Object other) {\n return false;\n }", "@Override\n public boolean equals(Object o) {\n return false;\n }", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@Override\n\tpublic abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\r\n \tpublic boolean equals(final Object obj) {\r\n \t\t// Insert code to compare the receiver and obj here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: obj might be an instance of any class\r\n \t\treturn super.equals(obj);\r\n \t}", "@Override\n public boolean equals(Object o1) {\n return super.equals(o1);\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override public boolean equals(Object object);", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Override\r\n\t\tpublic boolean implementEquals(Object obj) {\n\t\t\treturn false;\r\n\t\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Override\n public abstract boolean equals(Object abc);", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n public abstract boolean equals(final Object o);", "@Override\n public abstract boolean equals(final Object o);", "@Override public boolean equals(Object o) { // since 1.3.1\n // should these ever match actually?\n return (o == this);\n }", "public boolean equals(java.lang.Object other){\n return false; //TODO codavaj!!\n }", "@Override\r\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\r\n\t}", "public abstract boolean equals(Object other);", "public abstract boolean equals(Object o);", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\n\t}", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n\tpublic void test_equals1() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(11,\"Joe Tsonga\");\n\tassertTrue(c1.equals(c2));\n }", "public void equals() {\r\n // todo Implement this java.lang.Object method\r\n throw new UnsupportedOperationException(\"Method equals() not yet implemented.\");\r\n }", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Override\n\tpublic boolean equals(Card anotherCard){\n\t\t\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}", "@Override\n public boolean equals(Object obj){\n \tState s=(State) obj;\n if (this.state==s.getState())\n \treturn true;\n else\n \treturn false;\n \t\t\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "public void testEqualsObject() {\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.0\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.1\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.2\")); //$NON-NLS-1$\n\t\t\tif (tipo1 != tipo1)\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.3\")); //$NON-NLS-1$\n\t\t\tif (!tipo1.equals(tipo2))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.4\"));\t\t\t //$NON-NLS-1$\n\t\t\tif (tipo1.equals(tipo3))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.5\"));\t //$NON-NLS-1$\n\t\t}", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (getClass() != obj.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (!super.equals(obj));\n\t}", "@Override\r\n\tpublic boolean equals (Object l) {\n\t\tif (l == null) return false;\r\n\t\tif ( (l.toString()).equals(toString()) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean equals(Object anObject) {\n/* 205 */ return this.m_str.equals(anObject);\n/* */ }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Override\n public boolean equals(Object obj) {\n PlanningSalle plaS;\n if (obj ==null || obj.getClass()!=this.getClass()){\n return false;\n }\n\n else {\n plaS =(PlanningSalle)obj;\n if(\n plaS.getDateDebutR().equals(getDateDebutR()) //vu que type primitif == pas equals\n & plaS.getDateFinR().equals(getDateFinR())) { \n {\n return true;\n }\n }\n\n else {\n return false;\n }\n }\n }", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015\n boolean r0 = r2 instanceof com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice\n if (r0 == 0) goto L_0x0013\n com.ss.android.ugc.aweme.notice.repo.list.bean.PostNotice r2 = (com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice) r2\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r1.aweme\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r2.aweme\n boolean r2 = kotlin.jvm.internal.C7573i.m23585a(r0, r2)\n if (r2 == 0) goto L_0x0013\n goto L_0x0015\n L_0x0013:\n r2 = 0\n return r2\n L_0x0015:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice.equals(java.lang.Object):boolean\");\n }", "@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }", "@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Contrasena)) {\n return false;\n }\n Contrasena other = (Contrasena) object;\n if ((this.contrasenaActual == null && other.contrasenaActual != null) || (this.contrasenaActual != null && !this.contrasenaActual.equals(other.contrasenaActual))) {\n return false;\n }\n return true;\n }", "@Test\n\tpublic void test_equals1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.equals(t2));\n }", "public boolean equals(Object obj) {\n if (!super.equals(obj)) {\n return false;\n }\n\n if (obj.getClass() != getClass()) {\n return false;\n }\n \n return true;\n }", "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "@Override\n public boolean equals(Object obj) {\n Pair temp = (Pair) obj;\n if(left == temp.left && right == temp.right) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(final Object obj)\n {\n return this.value.equals(obj);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }" ]
[ "0.771175", "0.76986635", "0.7675851", "0.7634523", "0.76177996", "0.7574186", "0.75728387", "0.75706625", "0.7538115", "0.75287026", "0.75260955", "0.75053227", "0.7502172", "0.7499945", "0.7492566", "0.7489262", "0.74649733", "0.7450221", "0.7432783", "0.7432783", "0.7432783", "0.742702", "0.74151206", "0.7412067", "0.7410418", "0.738475", "0.738475", "0.738475", "0.738475", "0.738475", "0.738475", "0.7360253", "0.7356609", "0.7345328", "0.7335277", "0.7289029", "0.7289029", "0.7266744", "0.72558343", "0.7210278", "0.7206286", "0.7205137", "0.7205137", "0.7205137", "0.7205137", "0.71916175", "0.71599185", "0.71574724", "0.7151838", "0.7136967", "0.71359235", "0.7123937", "0.7123937", "0.7123937", "0.7123937", "0.7096183", "0.7043444", "0.7043444", "0.7022812", "0.7022812", "0.700973", "0.70057744", "0.6958311", "0.69430846", "0.6893012", "0.6882945", "0.6880085", "0.6880085", "0.6868755", "0.6863978", "0.68638456", "0.686152", "0.686152", "0.686152", "0.686152", "0.6859737", "0.6845678", "0.6826315", "0.6816742", "0.6814027", "0.68111515", "0.68093586", "0.68077874", "0.6804202", "0.67979527", "0.6785761", "0.6774875", "0.675658", "0.6747475", "0.67437434", "0.67407167", "0.673258", "0.6732433", "0.6722111", "0.671795", "0.67146474", "0.6713106", "0.67124206", "0.67123926", "0.6702126", "0.66985923" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904536", "0.78052336", "0.7766536", "0.7727363", "0.76318616", "0.7621916", "0.7584545", "0.7530609", "0.74878335", "0.74571276", "0.74571276", "0.7438656", "0.7422694", "0.7403604", "0.73918706", "0.7387049", "0.7379379", "0.73706305", "0.7362634", "0.7356091", "0.7345742", "0.7341655", "0.7330208", "0.73284286", "0.7325726", "0.7319205", "0.731691", "0.73137385", "0.7304247", "0.7304247", "0.73017776", "0.7298307", "0.72933966", "0.7286999", "0.7283511", "0.72811604", "0.72787315", "0.7259994", "0.7259994", "0.7259994", "0.72595567", "0.72595537", "0.72501904", "0.7224887", "0.7219672", "0.7217532", "0.72043973", "0.72010916", "0.7199519", "0.71928704", "0.71855384", "0.7177209", "0.71689284", "0.7167426", "0.715412", "0.71537405", "0.7135554", "0.7134872", "0.7134872", "0.7129713", "0.7129041", "0.71240187", "0.7123551", "0.7123167", "0.71221936", "0.71173894", "0.71173894", "0.71173894", "0.71173894", "0.71170884", "0.7116871", "0.7116271", "0.7114722", "0.7112311", "0.7109584", "0.7108896", "0.7105745", "0.70993924", "0.70979136", "0.7095834", "0.70936936", "0.70936936", "0.70863414", "0.7083095", "0.7081166", "0.70801973", "0.7073687", "0.7068324", "0.7061727", "0.7060408", "0.7060199", "0.7051346", "0.70376796", "0.70376796", "0.7035851", "0.70354784", "0.70354784", "0.7032029", "0.70307976", "0.70294225", "0.70193213" ]
0.0
-1
After properties set this method is invoked to set the date format that will be used for all JSON dates.
@PostConstruct public void afterPropertiesSet() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat(getDateFormat()); SerializationConfig serialConfig = getSerializationConfig().withDateFormat(sdf); setSerializationConfig(serialConfig); DeserializationConfig deserializationConfig = getDeserializationConfig().withDateFormat(sdf); setDeserializationConfig(deserializationConfig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDateFormats(String dateFormats)\n {\n this.dateFormats = dateFormats;\n }", "public void setDateFormat(String format) {\n dateFormat = format;\n constructVssDateTimeFormat();\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "@Override\n public void postConfig() {\n Locale locale = new Locale(localeLanguage, localeCountry);\n try {\n formatter = DateTimeFormatter.ofPattern(dateFormat, locale);\n } catch (IllegalArgumentException e) {\n throw new PropertyException(e,\"\",\"dateFormat\",\"dateFormat could not be parsed by DateTimeFormatter\");\n }\n }", "public void setDateFormat(String format) {\n this.mDateFormat = format;\n }", "public void setDateFormatOverride(DateFormat formatter) {\n/* 563 */ this.dateFormatOverride = formatter;\n/* 564 */ fireChangeEvent();\n/* */ }", "@Override\n protected SimpleDateFormat getDateFormat() {\n return dateFormat;\n }", "public void setDateFormat(ProjectDateFormat dateFormat)\r\n {\r\n m_dateFormat = dateFormat;\r\n }", "public void setUnmarshalDateFormats (String [] formats) {\n\t\tthis.dateFormatStrings = formats;\n\t}", "public void setDateFormatString(String value) {\n this.dateFormatString = value;\n }", "public void setMarshalDateFormat (String format) {\n\t\tthis.outFormat = format;\n }", "public String getFormatDate()\n {\n return formatDate;\n }", "@InitBinder\n protected void initBinder(WebDataBinder binder) {\n binder.addCustomFormatter(new DateFormatter(\"yyyy-MM-dd\"));\n }", "public void setDateFormat(DateFormat dateFormat) {\n\t\tthis.dateFormat = dateFormat;\n\t}", "public static void dateFormat() {\n }", "public void setDateFormat(DateFormat dateFormat){\n\tif(dateFormat != null){\n\t this.dateFormat = dateFormat;\n\t}\n }", "public void setDate() {\n this.date = new Date();\n }", "@Override\n\tpublic String[] getFormats() {\n\t\treturn new String[] {\"yyyy-MM-dd'T'HH:mm:ss\",\"yyyy-MM-dd HH:mm:ss\",\"yyyy-MM-dd HH:mm\",\"yyyy-MM-dd'T'HH:mm\",\"yyyy-MM-dd HH\", \"yyyy-MM-dd\" };\n\t}", "public DateFormat getDateFormatOverride() { return this.dateFormatOverride; }", "public void setDateFormat(String dateFormatString) {\n dateFormat = new SimpleDateFormat(dateFormatString);\n }", "public CustomObjectMapper(){\n this.setDateFormat(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\"));\n }", "private void setDateSetting(String dateFormat)\n\t{\n\n\t\tif (dateFormat.equals(\"dd/mm/yyyy\"))\n\t\t{\n\t\t\tthis.dateSetting = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.dateSetting = 1;\n\t\t}\n\t}", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "public void setCustomDateFormat(SimpleDateFormat customDateFormat) {\n this.customDateFormat = customDateFormat;\n }", "@JsonProperty(\"configurationDate\")\r\n public void setConfigurationDate(Date configurationDate) {\r\n this.configurationDate = configurationDate;\r\n }", "public String getDateFormats()\n {\n return dateFormats;\n }", "private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}", "public void setDate(String date){\n this.date = date;\n }", "void setDate(Date data);", "public void populateFormats(Model model) {\n model.addAttribute(\"application_locale\", LocaleContextHolder.getLocale().getLanguage());\n model.addAttribute(\"rel_date_date_format\", DateTimeFormat.patternForStyle(\"M-\", LocaleContextHolder.getLocale()));\n }", "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "@Override\n\tpublic void initDate() {\n\n\t}", "@Bean(name = \"dateFormatter\")\n public SimpleDateFormat dateFormatter() {\n return new SimpleDateFormat(\"dd/MM/yyyy\");\n }", "public void write(JsonWriter jsonWriter, Date object) {\n synchronized (this) {\n String string2;\n if (string2 == null) {\n jsonWriter.nullValue();\n return;\n }\n Object object2 = this.dateFormats;\n object2 = object2.get(0);\n object2 = (DateFormat)object2;\n string2 = ((DateFormat)object2).format((Date)((Object)string2));\n jsonWriter.value(string2);\n return;\n }\n }", "@JsonSetter(\"dateAdded\")\r\n public void setDateAdded (String value) { \r\n this.dateAdded = value;\r\n }", "void setDate(java.lang.String date);", "public void setDate(String date){\n this.date = date;\n }", "public String getDateFormatString() {\n return this.dateFormatString;\n }", "@Test\n public void shouldCorrectWhenSettingObjectMapperDateFormat() throws Exception {\n SimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy hh:mm\");\n\n String toParse = \"20-12-2014 02:30\";\n Date date = df.parse(toParse );\n Event event = new Event(\"party\", date);\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(df);\n\n String result = mapper.writeValueAsString(event);\n assertThat(result, containsString(toParse));\n }", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(String date) {\r\n this.date = date;\r\n }", "public void SetDate(Date date);", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "void setCreateDate(Date date);", "public void setDate(String date) {\n while (!date.endsWith(\"00\")){\n date+=\"0\";\n }\n try{\n this.date = FORMATTER.parse(date.trim());\n }catch (ParseException e){\n throw new RuntimeException(e);\n }\n\n }", "@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}", "public void setDateCreated(Date dateCreated);", "public void setCreateDate(Date createDate);", "public void setCreateDate(Date createDate);", "public void setCreateDate(Date createDate);", "public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "public DateFormat getDateFormat(){\n\treturn dateFormat;\n }", "@JsonProperty(\"deliveryDate\")\n public void setDeliveryDate(Date deliveryDate) {\n this.deliveryDate = deliveryDate;\n }", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "@InitBinder\n private void dateBinder(WebDataBinder binder) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n //Create a new CustomDateEditor\n CustomDateEditor editor = new CustomDateEditor(dateFormat, true);\n //Register it as custom editor for the Date type\n binder.registerCustomEditor(Date.class, editor);\n }", "public void setCreateDate(Date createDate) { this.createDate = createDate; }", "@Override\n public void setLocalTimeZone(DateFormat df) {\n \n }", "public String getFormatDate() {\n String formatDate = servletRequest.getHeader(ConstantsCustomers.CUSTOMER_FORMAT_DATE);\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = jwtTokenUtil.getFormatDateFromToken();\n }\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = ConstantsCustomers.APP_DATE_FORMAT_ES;\n }\n return formatDate;\n }", "public void setDate(long date)\r\n/* 199: */ {\r\n/* 200:299 */ setDate(\"Date\", date);\r\n/* 201: */ }", "private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }", "public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }", "public DateGraphFormat(DateFormat dateFormatIn){\n\tif(dateFormatIn != null){\n\t dateFormat = dateFormatIn;\n\t} \n }", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "void setCreatedDate(Date createdDate);", "public void setDate(java.lang.String date) {\n this.date = date;\n }", "@InitBinder\n\tpublic void initBinder(WebDataBinder binder) {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tbinder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));\n\t}", "@BeforeEach\n\tprotected void setUp()\n\t{\n\t\tformatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n\t}", "private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }", "@Override\n public void date_()\n {\n }", "@InitBinder\r\n public void initBinder(WebDataBinder webDataBinder) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n dateFormat.setLenient(false);\r\n webDataBinder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));\r\n }", "public void setDate (String s) {\n date = s;\n }", "@Override\n protected void addDefaultConverters() {\n super.addDefaultConverters();\n\n /* Add the \"shortDate\" conversion. */\n StringToDate dateAndTimeToDate = new StringToDate();\n dateAndTimeToDate.setPattern(DATE_AND_TIME_FORMAT);\n addConverter(\"date\", dateAndTimeToDate);\n }", "public void setCreatedDate(Date createdDate);", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "private void setDate(String headerName, long date)\r\n/* 329: */ {\r\n/* 330:483 */ SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMATS[0], Locale.US);\r\n/* 331:484 */ dateFormat.setTimeZone(GMT);\r\n/* 332:485 */ set(headerName, dateFormat.format(new Date(date)));\r\n/* 333: */ }", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public DateFormat getDateFormat() {\r\n return this.dateFormat;\r\n }", "@JsonSetter(\"dateCanceled\")\r\n public void setDateCanceled (String value) { \r\n this.dateCanceled = value;\r\n }", "public DateTextFieldConfig withFormat(final String value) {\n put(Key.Format, Dates.toJavaScriptDateFormat(value));\n return this;\n }", "private String getDefaultDateFormat() {\n return getString(DATE_FORMAT_KEY, DEFAULT_DATE_FORMAT);\n }" ]
[ "0.6672296", "0.66612935", "0.66135836", "0.65967834", "0.65361327", "0.64720213", "0.64036167", "0.634351", "0.63425523", "0.6339893", "0.6325255", "0.6319444", "0.63147026", "0.6227528", "0.62012386", "0.6196015", "0.61865175", "0.61476994", "0.61388254", "0.61361957", "0.612319", "0.6114868", "0.6109535", "0.60735965", "0.6054296", "0.6047022", "0.60290605", "0.6005325", "0.5982004", "0.5979695", "0.59747016", "0.59587306", "0.59572345", "0.5950478", "0.595018", "0.5941186", "0.5927634", "0.59198415", "0.587823", "0.5873067", "0.5857561", "0.58199567", "0.58199567", "0.58199567", "0.58199567", "0.58199567", "0.58199567", "0.58199567", "0.58199567", "0.58199567", "0.5815601", "0.57877535", "0.5777307", "0.5777307", "0.5777307", "0.5777307", "0.5777307", "0.5747973", "0.5734517", "0.572985", "0.57255656", "0.5723659", "0.5723659", "0.5723659", "0.57233286", "0.57138884", "0.56858426", "0.5684399", "0.56825274", "0.56825274", "0.56825274", "0.56818646", "0.56744313", "0.5667009", "0.5665331", "0.5663723", "0.56637174", "0.5660203", "0.5656245", "0.5639019", "0.5634801", "0.56282496", "0.56248033", "0.5624149", "0.56116855", "0.5607508", "0.5598417", "0.5598103", "0.5597292", "0.5596176", "0.55829245", "0.55829245", "0.55801857", "0.5572146", "0.5572146", "0.5572146", "0.55662316", "0.5551575", "0.5550226", "0.55500734" ]
0.57800615
52
Creates a new async stub that supports all call types for the service
public static RegistrationServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<RegistrationServiceStub> factory = new io.grpc.stub.AbstractStub.StubFactory<RegistrationServiceStub>() { @java.lang.Override public RegistrationServiceStub newStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RegistrationServiceStub(channel, callOptions); } }; return RegistrationServiceStub.newStub(factory, channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "public interface GenerateResourceServiceAsync {\n /**\n * {@link GenerateResourceServiceImpl#generateTSDPattern(long,boolean)}\n */\n void generateTSDPattern(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#generateBehaviorPattern(long,boolean)}\n */\n void generateBehaviorPattern(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#generateScenarioSet(long, boolean)}\n */\n void generateScenarioSet(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#generateConcreteScenarioSet(long, byte[])}\n */\n void generateConcreteScenarioSet(long settingFileId, byte[] pattern, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#getPartOfFileContent(long, long, long, long)}\n */\n void getPartOfFileContent(long projectId, long fileId, long startRecordOffset, long recordCount, AsyncCallback<byte[]> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#getPartOfFileContent(long, long, long, String)}\n */\n void getPartOfFileContent(long projectId, long fileId, long patternId, String generationHash, AsyncCallback<byte[]> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#getSettingFileJobStatusList(long, long)}\n */\n void getSettingFileJobStatusList(long fileId, long projectId, AsyncCallback<List<JobStatusInfo>> callback) throws IllegalArgumentException;\n\n}", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resource on a given Google Cloud project and region.\n * `AzureClient` resources hold client authentication\n * information needed by the Anthos Multicloud API to manage Azure resources\n * on your Azure subscription on your behalf.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureClient(\n com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.\n * </pre>\n */\n default void getAzureClient(\n com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureClient>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resources on a given Google Cloud project and region.\n * </pre>\n */\n default void listAzureClients(\n com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClientsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resource.\n * If the client is used by one or more clusters, deletion will\n * fail and a `FAILED_PRECONDITION` error will be returned.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureClient(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]\n * resource on a given Google Cloud Platform project and region.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureCluster(\n com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * </pre>\n */\n default void updateAzureCluster(\n com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * </pre>\n */\n default void getAzureCluster(\n com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureCluster>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]\n * resources on a given Google Cloud project and region.\n * </pre>\n */\n default void listAzureClusters(\n com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClustersMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * Fails if the cluster has one or more associated\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureCluster(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates a short-lived access token to authenticate to a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * </pre>\n */\n default void generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateAzureAccessTokenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool],\n * attached to a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureNodePool(\n com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].\n * </pre>\n */\n default void updateAzureNodePool(\n com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.\n * </pre>\n */\n default void getAzureNodePool(\n com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureNodePool>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]\n * resources on a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * </pre>\n */\n default void listAzureNodePools(\n com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureNodePoolsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureNodePool(\n com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Returns information, such as supported Azure regions and Kubernetes\n * versions, on a given Google Cloud location.\n * </pre>\n */\n default void getAzureServerConfig(\n com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureServerConfig>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureServerConfigMethod(), responseObserver);\n }\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Lists nodes.\n * </pre>\n */\n default void listNodes(\n com.google.cloud.tpu.v2alpha1.ListNodesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListNodesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the details of a node.\n * </pre>\n */\n default void getNode(\n com.google.cloud.tpu.v2alpha1.GetNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.Node> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a node.\n * </pre>\n */\n default void createNode(\n com.google.cloud.tpu.v2alpha1.CreateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a node.\n * </pre>\n */\n default void deleteNode(\n com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Stops a node. This operation is only available with single TPU nodes.\n * </pre>\n */\n default void stopNode(\n com.google.cloud.tpu.v2alpha1.StopNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Starts a node.\n * </pre>\n */\n default void startNode(\n com.google.cloud.tpu.v2alpha1.StartNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the configurations of a node.\n * </pre>\n */\n default void updateNode(\n com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists queued resources.\n * </pre>\n */\n default void listQueuedResources(\n com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListQueuedResourcesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets details of a queued resource.\n * </pre>\n */\n default void getQueuedResource(\n com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.QueuedResource>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a QueuedResource TPU instance.\n * </pre>\n */\n default void createQueuedResource(\n com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a QueuedResource TPU instance.\n * </pre>\n */\n default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Resets a QueuedResource TPU instance\n * </pre>\n */\n default void resetQueuedResource(\n com.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getResetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates the Cloud TPU service identity for the project.\n * </pre>\n */\n default void generateServiceIdentity(\n com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateServiceIdentityMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists accelerator types supported by this API.\n * </pre>\n */\n default void listAcceleratorTypes(\n com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAcceleratorTypesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets AcceleratorType.\n * </pre>\n */\n default void getAcceleratorType(\n com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.AcceleratorType>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAcceleratorTypeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists runtime versions supported by this API.\n * </pre>\n */\n default void listRuntimeVersions(\n com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListRuntimeVersionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a runtime version.\n * </pre>\n */\n default void getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetRuntimeVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves the guest attributes for the node.\n * </pre>\n */\n default void getGuestAttributes(\n com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetGuestAttributesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Simulates a maintenance event.\n * </pre>\n */\n default void simulateMaintenanceEvent(\n com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSimulateMaintenanceEventMethod(), responseObserver);\n }\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Creates a namespace, and returns the new namespace.\n * </pre>\n */\n default void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all namespaces.\n * </pre>\n */\n default void listNamespaces(\n com.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.servicedirectory.v1beta1.ListNamespacesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListNamespacesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a namespace.\n * </pre>\n */\n default void getNamespace(\n com.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a namespace.\n * </pre>\n */\n default void updateNamespace(\n com.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a namespace. This also deletes all services and endpoints in\n * the namespace.\n * </pre>\n */\n default void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a service, and returns the new service.\n * </pre>\n */\n default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all services belonging to a namespace.\n * </pre>\n */\n default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a service.\n * </pre>\n */\n default void getService(\n com.google.cloud.servicedirectory.v1beta1.GetServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a service.\n * </pre>\n */\n default void updateService(\n com.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a service. This also deletes all endpoints associated with\n * the service.\n * </pre>\n */\n default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an endpoint, and returns the new endpoint.\n * </pre>\n */\n default void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all endpoints.\n * </pre>\n */\n default void listEndpoints(\n com.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListEndpointsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListEndpointsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets an endpoint.\n * </pre>\n */\n default void getEndpoint(\n com.google.cloud.servicedirectory.v1beta1.GetEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an endpoint.\n * </pre>\n */\n default void updateEndpoint(\n com.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an endpoint.\n * </pre>\n */\n default void deleteEndpoint(\n com.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the IAM Policy for a resource\n * </pre>\n */\n default void getIamPolicy(\n com.google.iam.v1.GetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetIamPolicyMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Sets the IAM Policy for a resource\n * </pre>\n */\n default void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSetIamPolicyMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Tests IAM permissions for a resource (namespace, service or\n * service workload only).\n * </pre>\n */\n default void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getTestIamPermissionsMethod(), responseObserver);\n }\n }", "public static RaftServerProtocolServiceFutureStub newFutureStub(\n org.apache.ratis.shaded.io.grpc.Channel channel) {\n return new RaftServerProtocolServiceFutureStub(channel);\n }", "protected HttpJsonServicesStub(\n ServicesStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder().setGet(\"/v1/{name=apps/*/operations/*}\").build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder().setGet(\"/v1/{name=apps/*}/operations\").build())\n .build());\n\n HttpJsonCallSettings<ListServicesRequest, ListServicesResponse> listServicesTransportSettings =\n HttpJsonCallSettings.<ListServicesRequest, ListServicesResponse>newBuilder()\n .setMethodDescriptor(listServicesMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetServiceRequest, Service> getServiceTransportSettings =\n HttpJsonCallSettings.<GetServiceRequest, Service>newBuilder()\n .setMethodDescriptor(getServiceMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateServiceRequest, Operation> updateServiceTransportSettings =\n HttpJsonCallSettings.<UpdateServiceRequest, Operation>newBuilder()\n .setMethodDescriptor(updateServiceMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteServiceRequest, Operation> deleteServiceTransportSettings =\n HttpJsonCallSettings.<DeleteServiceRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteServiceMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n\n this.listServicesCallable =\n callableFactory.createUnaryCallable(\n listServicesTransportSettings, settings.listServicesSettings(), clientContext);\n this.listServicesPagedCallable =\n callableFactory.createPagedCallable(\n listServicesTransportSettings, settings.listServicesSettings(), clientContext);\n this.getServiceCallable =\n callableFactory.createUnaryCallable(\n getServiceTransportSettings, settings.getServiceSettings(), clientContext);\n this.updateServiceCallable =\n callableFactory.createUnaryCallable(\n updateServiceTransportSettings, settings.updateServiceSettings(), clientContext);\n this.updateServiceOperationCallable =\n callableFactory.createOperationCallable(\n updateServiceTransportSettings,\n settings.updateServiceOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteServiceCallable =\n callableFactory.createUnaryCallable(\n deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext);\n this.deleteServiceOperationCallable =\n callableFactory.createOperationCallable(\n deleteServiceTransportSettings,\n settings.deleteServiceOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "protected GrpcJobServiceStub(\n JobServiceStubSettings settings,\n ClientContext clientContext,\n GrpcStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);\n\n GrpcCallSettings<CreateCustomJobRequest, CustomJob> createCustomJobTransportSettings =\n GrpcCallSettings.<CreateCustomJobRequest, CustomJob>newBuilder()\n .setMethodDescriptor(createCustomJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetCustomJobRequest, CustomJob> getCustomJobTransportSettings =\n GrpcCallSettings.<GetCustomJobRequest, CustomJob>newBuilder()\n .setMethodDescriptor(getCustomJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListCustomJobsRequest, ListCustomJobsResponse>\n listCustomJobsTransportSettings =\n GrpcCallSettings.<ListCustomJobsRequest, ListCustomJobsResponse>newBuilder()\n .setMethodDescriptor(listCustomJobsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<DeleteCustomJobRequest, Operation> deleteCustomJobTransportSettings =\n GrpcCallSettings.<DeleteCustomJobRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteCustomJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CancelCustomJobRequest, Empty> cancelCustomJobTransportSettings =\n GrpcCallSettings.<CancelCustomJobRequest, Empty>newBuilder()\n .setMethodDescriptor(cancelCustomJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CreateDataLabelingJobRequest, DataLabelingJob>\n createDataLabelingJobTransportSettings =\n GrpcCallSettings.<CreateDataLabelingJobRequest, DataLabelingJob>newBuilder()\n .setMethodDescriptor(createDataLabelingJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetDataLabelingJobRequest, DataLabelingJob>\n getDataLabelingJobTransportSettings =\n GrpcCallSettings.<GetDataLabelingJobRequest, DataLabelingJob>newBuilder()\n .setMethodDescriptor(getDataLabelingJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse>\n listDataLabelingJobsTransportSettings =\n GrpcCallSettings.<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse>newBuilder()\n .setMethodDescriptor(listDataLabelingJobsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<DeleteDataLabelingJobRequest, Operation>\n deleteDataLabelingJobTransportSettings =\n GrpcCallSettings.<DeleteDataLabelingJobRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteDataLabelingJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CancelDataLabelingJobRequest, Empty> cancelDataLabelingJobTransportSettings =\n GrpcCallSettings.<CancelDataLabelingJobRequest, Empty>newBuilder()\n .setMethodDescriptor(cancelDataLabelingJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CreateHyperparameterTuningJobRequest, HyperparameterTuningJob>\n createHyperparameterTuningJobTransportSettings =\n GrpcCallSettings\n .<CreateHyperparameterTuningJobRequest, HyperparameterTuningJob>newBuilder()\n .setMethodDescriptor(createHyperparameterTuningJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetHyperparameterTuningJobRequest, HyperparameterTuningJob>\n getHyperparameterTuningJobTransportSettings =\n GrpcCallSettings\n .<GetHyperparameterTuningJobRequest, HyperparameterTuningJob>newBuilder()\n .setMethodDescriptor(getHyperparameterTuningJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse>\n listHyperparameterTuningJobsTransportSettings =\n GrpcCallSettings\n .<ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse>\n newBuilder()\n .setMethodDescriptor(listHyperparameterTuningJobsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<DeleteHyperparameterTuningJobRequest, Operation>\n deleteHyperparameterTuningJobTransportSettings =\n GrpcCallSettings.<DeleteHyperparameterTuningJobRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteHyperparameterTuningJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CancelHyperparameterTuningJobRequest, Empty>\n cancelHyperparameterTuningJobTransportSettings =\n GrpcCallSettings.<CancelHyperparameterTuningJobRequest, Empty>newBuilder()\n .setMethodDescriptor(cancelHyperparameterTuningJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CreateNasJobRequest, NasJob> createNasJobTransportSettings =\n GrpcCallSettings.<CreateNasJobRequest, NasJob>newBuilder()\n .setMethodDescriptor(createNasJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetNasJobRequest, NasJob> getNasJobTransportSettings =\n GrpcCallSettings.<GetNasJobRequest, NasJob>newBuilder()\n .setMethodDescriptor(getNasJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListNasJobsRequest, ListNasJobsResponse> listNasJobsTransportSettings =\n GrpcCallSettings.<ListNasJobsRequest, ListNasJobsResponse>newBuilder()\n .setMethodDescriptor(listNasJobsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<DeleteNasJobRequest, Operation> deleteNasJobTransportSettings =\n GrpcCallSettings.<DeleteNasJobRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteNasJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CancelNasJobRequest, Empty> cancelNasJobTransportSettings =\n GrpcCallSettings.<CancelNasJobRequest, Empty>newBuilder()\n .setMethodDescriptor(cancelNasJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetNasTrialDetailRequest, NasTrialDetail> getNasTrialDetailTransportSettings =\n GrpcCallSettings.<GetNasTrialDetailRequest, NasTrialDetail>newBuilder()\n .setMethodDescriptor(getNasTrialDetailMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse>\n listNasTrialDetailsTransportSettings =\n GrpcCallSettings.<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse>newBuilder()\n .setMethodDescriptor(listNasTrialDetailsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CreateBatchPredictionJobRequest, BatchPredictionJob>\n createBatchPredictionJobTransportSettings =\n GrpcCallSettings.<CreateBatchPredictionJobRequest, BatchPredictionJob>newBuilder()\n .setMethodDescriptor(createBatchPredictionJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetBatchPredictionJobRequest, BatchPredictionJob>\n getBatchPredictionJobTransportSettings =\n GrpcCallSettings.<GetBatchPredictionJobRequest, BatchPredictionJob>newBuilder()\n .setMethodDescriptor(getBatchPredictionJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse>\n listBatchPredictionJobsTransportSettings =\n GrpcCallSettings\n .<ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse>newBuilder()\n .setMethodDescriptor(listBatchPredictionJobsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<DeleteBatchPredictionJobRequest, Operation>\n deleteBatchPredictionJobTransportSettings =\n GrpcCallSettings.<DeleteBatchPredictionJobRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteBatchPredictionJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CancelBatchPredictionJobRequest, Empty>\n cancelBatchPredictionJobTransportSettings =\n GrpcCallSettings.<CancelBatchPredictionJobRequest, Empty>newBuilder()\n .setMethodDescriptor(cancelBatchPredictionJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>\n createModelDeploymentMonitoringJobTransportSettings =\n GrpcCallSettings\n .<CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>\n newBuilder()\n .setMethodDescriptor(createModelDeploymentMonitoringJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<\n SearchModelDeploymentMonitoringStatsAnomaliesRequest,\n SearchModelDeploymentMonitoringStatsAnomaliesResponse>\n searchModelDeploymentMonitoringStatsAnomaliesTransportSettings =\n GrpcCallSettings\n .<SearchModelDeploymentMonitoringStatsAnomaliesRequest,\n SearchModelDeploymentMonitoringStatsAnomaliesResponse>\n newBuilder()\n .setMethodDescriptor(searchModelDeploymentMonitoringStatsAnomaliesMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"model_deployment_monitoring_job\",\n String.valueOf(request.getModelDeploymentMonitoringJob()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>\n getModelDeploymentMonitoringJobTransportSettings =\n GrpcCallSettings\n .<GetModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>newBuilder()\n .setMethodDescriptor(getModelDeploymentMonitoringJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<\n ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse>\n listModelDeploymentMonitoringJobsTransportSettings =\n GrpcCallSettings\n .<ListModelDeploymentMonitoringJobsRequest,\n ListModelDeploymentMonitoringJobsResponse>\n newBuilder()\n .setMethodDescriptor(listModelDeploymentMonitoringJobsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<UpdateModelDeploymentMonitoringJobRequest, Operation>\n updateModelDeploymentMonitoringJobTransportSettings =\n GrpcCallSettings.<UpdateModelDeploymentMonitoringJobRequest, Operation>newBuilder()\n .setMethodDescriptor(updateModelDeploymentMonitoringJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"model_deployment_monitoring_job.name\",\n String.valueOf(request.getModelDeploymentMonitoringJob().getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<DeleteModelDeploymentMonitoringJobRequest, Operation>\n deleteModelDeploymentMonitoringJobTransportSettings =\n GrpcCallSettings.<DeleteModelDeploymentMonitoringJobRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteModelDeploymentMonitoringJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<PauseModelDeploymentMonitoringJobRequest, Empty>\n pauseModelDeploymentMonitoringJobTransportSettings =\n GrpcCallSettings.<PauseModelDeploymentMonitoringJobRequest, Empty>newBuilder()\n .setMethodDescriptor(pauseModelDeploymentMonitoringJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ResumeModelDeploymentMonitoringJobRequest, Empty>\n resumeModelDeploymentMonitoringJobTransportSettings =\n GrpcCallSettings.<ResumeModelDeploymentMonitoringJobRequest, Empty>newBuilder()\n .setMethodDescriptor(resumeModelDeploymentMonitoringJobMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<ListLocationsRequest, ListLocationsResponse> listLocationsTransportSettings =\n GrpcCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetLocationRequest, Location> getLocationTransportSettings =\n GrpcCallSettings.<GetLocationRequest, Location>newBuilder()\n .setMethodDescriptor(getLocationMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =\n GrpcCallSettings.<SetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(setIamPolicyMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =\n GrpcCallSettings.<GetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(getIamPolicyMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n GrpcCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>\n testIamPermissionsTransportSettings =\n GrpcCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()\n .setMethodDescriptor(testIamPermissionsMethodDescriptor)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n\n this.createCustomJobCallable =\n callableFactory.createUnaryCallable(\n createCustomJobTransportSettings, settings.createCustomJobSettings(), clientContext);\n this.getCustomJobCallable =\n callableFactory.createUnaryCallable(\n getCustomJobTransportSettings, settings.getCustomJobSettings(), clientContext);\n this.listCustomJobsCallable =\n callableFactory.createUnaryCallable(\n listCustomJobsTransportSettings, settings.listCustomJobsSettings(), clientContext);\n this.listCustomJobsPagedCallable =\n callableFactory.createPagedCallable(\n listCustomJobsTransportSettings, settings.listCustomJobsSettings(), clientContext);\n this.deleteCustomJobCallable =\n callableFactory.createUnaryCallable(\n deleteCustomJobTransportSettings, settings.deleteCustomJobSettings(), clientContext);\n this.deleteCustomJobOperationCallable =\n callableFactory.createOperationCallable(\n deleteCustomJobTransportSettings,\n settings.deleteCustomJobOperationSettings(),\n clientContext,\n operationsStub);\n this.cancelCustomJobCallable =\n callableFactory.createUnaryCallable(\n cancelCustomJobTransportSettings, settings.cancelCustomJobSettings(), clientContext);\n this.createDataLabelingJobCallable =\n callableFactory.createUnaryCallable(\n createDataLabelingJobTransportSettings,\n settings.createDataLabelingJobSettings(),\n clientContext);\n this.getDataLabelingJobCallable =\n callableFactory.createUnaryCallable(\n getDataLabelingJobTransportSettings,\n settings.getDataLabelingJobSettings(),\n clientContext);\n this.listDataLabelingJobsCallable =\n callableFactory.createUnaryCallable(\n listDataLabelingJobsTransportSettings,\n settings.listDataLabelingJobsSettings(),\n clientContext);\n this.listDataLabelingJobsPagedCallable =\n callableFactory.createPagedCallable(\n listDataLabelingJobsTransportSettings,\n settings.listDataLabelingJobsSettings(),\n clientContext);\n this.deleteDataLabelingJobCallable =\n callableFactory.createUnaryCallable(\n deleteDataLabelingJobTransportSettings,\n settings.deleteDataLabelingJobSettings(),\n clientContext);\n this.deleteDataLabelingJobOperationCallable =\n callableFactory.createOperationCallable(\n deleteDataLabelingJobTransportSettings,\n settings.deleteDataLabelingJobOperationSettings(),\n clientContext,\n operationsStub);\n this.cancelDataLabelingJobCallable =\n callableFactory.createUnaryCallable(\n cancelDataLabelingJobTransportSettings,\n settings.cancelDataLabelingJobSettings(),\n clientContext);\n this.createHyperparameterTuningJobCallable =\n callableFactory.createUnaryCallable(\n createHyperparameterTuningJobTransportSettings,\n settings.createHyperparameterTuningJobSettings(),\n clientContext);\n this.getHyperparameterTuningJobCallable =\n callableFactory.createUnaryCallable(\n getHyperparameterTuningJobTransportSettings,\n settings.getHyperparameterTuningJobSettings(),\n clientContext);\n this.listHyperparameterTuningJobsCallable =\n callableFactory.createUnaryCallable(\n listHyperparameterTuningJobsTransportSettings,\n settings.listHyperparameterTuningJobsSettings(),\n clientContext);\n this.listHyperparameterTuningJobsPagedCallable =\n callableFactory.createPagedCallable(\n listHyperparameterTuningJobsTransportSettings,\n settings.listHyperparameterTuningJobsSettings(),\n clientContext);\n this.deleteHyperparameterTuningJobCallable =\n callableFactory.createUnaryCallable(\n deleteHyperparameterTuningJobTransportSettings,\n settings.deleteHyperparameterTuningJobSettings(),\n clientContext);\n this.deleteHyperparameterTuningJobOperationCallable =\n callableFactory.createOperationCallable(\n deleteHyperparameterTuningJobTransportSettings,\n settings.deleteHyperparameterTuningJobOperationSettings(),\n clientContext,\n operationsStub);\n this.cancelHyperparameterTuningJobCallable =\n callableFactory.createUnaryCallable(\n cancelHyperparameterTuningJobTransportSettings,\n settings.cancelHyperparameterTuningJobSettings(),\n clientContext);\n this.createNasJobCallable =\n callableFactory.createUnaryCallable(\n createNasJobTransportSettings, settings.createNasJobSettings(), clientContext);\n this.getNasJobCallable =\n callableFactory.createUnaryCallable(\n getNasJobTransportSettings, settings.getNasJobSettings(), clientContext);\n this.listNasJobsCallable =\n callableFactory.createUnaryCallable(\n listNasJobsTransportSettings, settings.listNasJobsSettings(), clientContext);\n this.listNasJobsPagedCallable =\n callableFactory.createPagedCallable(\n listNasJobsTransportSettings, settings.listNasJobsSettings(), clientContext);\n this.deleteNasJobCallable =\n callableFactory.createUnaryCallable(\n deleteNasJobTransportSettings, settings.deleteNasJobSettings(), clientContext);\n this.deleteNasJobOperationCallable =\n callableFactory.createOperationCallable(\n deleteNasJobTransportSettings,\n settings.deleteNasJobOperationSettings(),\n clientContext,\n operationsStub);\n this.cancelNasJobCallable =\n callableFactory.createUnaryCallable(\n cancelNasJobTransportSettings, settings.cancelNasJobSettings(), clientContext);\n this.getNasTrialDetailCallable =\n callableFactory.createUnaryCallable(\n getNasTrialDetailTransportSettings,\n settings.getNasTrialDetailSettings(),\n clientContext);\n this.listNasTrialDetailsCallable =\n callableFactory.createUnaryCallable(\n listNasTrialDetailsTransportSettings,\n settings.listNasTrialDetailsSettings(),\n clientContext);\n this.listNasTrialDetailsPagedCallable =\n callableFactory.createPagedCallable(\n listNasTrialDetailsTransportSettings,\n settings.listNasTrialDetailsSettings(),\n clientContext);\n this.createBatchPredictionJobCallable =\n callableFactory.createUnaryCallable(\n createBatchPredictionJobTransportSettings,\n settings.createBatchPredictionJobSettings(),\n clientContext);\n this.getBatchPredictionJobCallable =\n callableFactory.createUnaryCallable(\n getBatchPredictionJobTransportSettings,\n settings.getBatchPredictionJobSettings(),\n clientContext);\n this.listBatchPredictionJobsCallable =\n callableFactory.createUnaryCallable(\n listBatchPredictionJobsTransportSettings,\n settings.listBatchPredictionJobsSettings(),\n clientContext);\n this.listBatchPredictionJobsPagedCallable =\n callableFactory.createPagedCallable(\n listBatchPredictionJobsTransportSettings,\n settings.listBatchPredictionJobsSettings(),\n clientContext);\n this.deleteBatchPredictionJobCallable =\n callableFactory.createUnaryCallable(\n deleteBatchPredictionJobTransportSettings,\n settings.deleteBatchPredictionJobSettings(),\n clientContext);\n this.deleteBatchPredictionJobOperationCallable =\n callableFactory.createOperationCallable(\n deleteBatchPredictionJobTransportSettings,\n settings.deleteBatchPredictionJobOperationSettings(),\n clientContext,\n operationsStub);\n this.cancelBatchPredictionJobCallable =\n callableFactory.createUnaryCallable(\n cancelBatchPredictionJobTransportSettings,\n settings.cancelBatchPredictionJobSettings(),\n clientContext);\n this.createModelDeploymentMonitoringJobCallable =\n callableFactory.createUnaryCallable(\n createModelDeploymentMonitoringJobTransportSettings,\n settings.createModelDeploymentMonitoringJobSettings(),\n clientContext);\n this.searchModelDeploymentMonitoringStatsAnomaliesCallable =\n callableFactory.createUnaryCallable(\n searchModelDeploymentMonitoringStatsAnomaliesTransportSettings,\n settings.searchModelDeploymentMonitoringStatsAnomaliesSettings(),\n clientContext);\n this.searchModelDeploymentMonitoringStatsAnomaliesPagedCallable =\n callableFactory.createPagedCallable(\n searchModelDeploymentMonitoringStatsAnomaliesTransportSettings,\n settings.searchModelDeploymentMonitoringStatsAnomaliesSettings(),\n clientContext);\n this.getModelDeploymentMonitoringJobCallable =\n callableFactory.createUnaryCallable(\n getModelDeploymentMonitoringJobTransportSettings,\n settings.getModelDeploymentMonitoringJobSettings(),\n clientContext);\n this.listModelDeploymentMonitoringJobsCallable =\n callableFactory.createUnaryCallable(\n listModelDeploymentMonitoringJobsTransportSettings,\n settings.listModelDeploymentMonitoringJobsSettings(),\n clientContext);\n this.listModelDeploymentMonitoringJobsPagedCallable =\n callableFactory.createPagedCallable(\n listModelDeploymentMonitoringJobsTransportSettings,\n settings.listModelDeploymentMonitoringJobsSettings(),\n clientContext);\n this.updateModelDeploymentMonitoringJobCallable =\n callableFactory.createUnaryCallable(\n updateModelDeploymentMonitoringJobTransportSettings,\n settings.updateModelDeploymentMonitoringJobSettings(),\n clientContext);\n this.updateModelDeploymentMonitoringJobOperationCallable =\n callableFactory.createOperationCallable(\n updateModelDeploymentMonitoringJobTransportSettings,\n settings.updateModelDeploymentMonitoringJobOperationSettings(),\n clientContext,\n operationsStub);\n this.deleteModelDeploymentMonitoringJobCallable =\n callableFactory.createUnaryCallable(\n deleteModelDeploymentMonitoringJobTransportSettings,\n settings.deleteModelDeploymentMonitoringJobSettings(),\n clientContext);\n this.deleteModelDeploymentMonitoringJobOperationCallable =\n callableFactory.createOperationCallable(\n deleteModelDeploymentMonitoringJobTransportSettings,\n settings.deleteModelDeploymentMonitoringJobOperationSettings(),\n clientContext,\n operationsStub);\n this.pauseModelDeploymentMonitoringJobCallable =\n callableFactory.createUnaryCallable(\n pauseModelDeploymentMonitoringJobTransportSettings,\n settings.pauseModelDeploymentMonitoringJobSettings(),\n clientContext);\n this.resumeModelDeploymentMonitoringJobCallable =\n callableFactory.createUnaryCallable(\n resumeModelDeploymentMonitoringJobTransportSettings,\n settings.resumeModelDeploymentMonitoringJobSettings(),\n clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.getLocationCallable =\n callableFactory.createUnaryCallable(\n getLocationTransportSettings, settings.getLocationSettings(), clientContext);\n this.setIamPolicyCallable =\n callableFactory.createUnaryCallable(\n setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);\n this.getIamPolicyCallable =\n callableFactory.createUnaryCallable(\n getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);\n this.testIamPermissionsCallable =\n callableFactory.createUnaryCallable(\n testIamPermissionsTransportSettings,\n settings.testIamPermissionsSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public interface GeneralService {\n\n /**\n * Returns general server data\n */\n Request getGeneralData(AsyncCallback<GeneralData> callback);\n\n}", "public interface HomepageServiceAsync {\n\tpublic void getProtectionInformation(AsyncCallback<ProtectionInformationModel[]> callback);\n\n\tpublic void getRecentBackups(int backupType, int backupStatus,int top, AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getRecentBackupsByServerTime(int backupType, int backupStatus, String serverBeginDate, String serverEndDate, boolean needCatalogStatus, AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getVMRecentBackupsByServerTime(int backupType, int backupStatus, String serverBeginDate, String serverEndDate, boolean needCatalogStatus, BackupVMModel vmModel,AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getBackupInforamtionSummary(AsyncCallback<BackupInformationSummaryModel> callback);\n\t\n\tpublic void updateProtectionInformation(AsyncCallback<ProtectionInformationModel[]> callback);\n\t\n\tpublic void getDestSizeInformation(BackupSettingsModel model,AsyncCallback<DestinationCapacityModel> callback);\n\t\n\tpublic void getNextScheduleEvent(int in_iJobType,AsyncCallback<NextScheduleEventModel> callback);\n\n\tpublic void getTrustHosts(\n\t\t\tAsyncCallback<TrustHostModel[]> callback);\n\n\tvoid becomeTrustHost(TrustHostModel trustHostModel,\n\t\t\tAsyncCallback<Boolean> callback);\n\n\tvoid checkBaseLicense(AsyncCallback<Boolean> callback);\n\n\tvoid getBackupInforamtionSummaryWithLicInfo(AsyncCallback<BackupInformationSummaryModel> callback);\n\t\n\tvoid getLocalHost(AsyncCallback<TrustHostModel> callback);\n\n\tvoid PMInstallPatch(PatchInfoModel in_patchinfoModel,\n\t\t\tAsyncCallback<Integer> callback);\n\t\n\tvoid PMInstallBIPatch(PatchInfoModel in_patchinfoModel,\n\t\t\tAsyncCallback<Integer> callback);//added by cliicy.luo\n\t\n\tvoid getVMBackupInforamtionSummaryWithLicInfo(BackupVMModel vm,\n\t\t\tAsyncCallback<BackupInformationSummaryModel> callback);\n\n\tvoid getVMBackupInforamtionSummary(BackupVMModel vm,\n\t\t\tAsyncCallback<BackupInformationSummaryModel> callback);\n\n\tvoid getVMProtectionInformation(BackupVMModel vmModel,\n\t\t\tAsyncCallback<ProtectionInformationModel[]> callback);\n\n\tvoid getVMNextScheduleEvent(BackupVMModel vmModel,\n\t\t\tAsyncCallback<NextScheduleEventModel> callback);\n\tpublic void getVMRecentBackups(int backupType, int backupStatus,int top,BackupVMModel vmModel, AsyncCallback<RecoveryPointModel[]> callback);\n\n\tvoid updateVMProtectionInformation(BackupVMModel vm,\n\t\t\tAsyncCallback<ProtectionInformationModel[]> callback);\n\n\tvoid getArchiveInfoSummary(AsyncCallback<ArchiveJobInfoModel> callback);\n\n\tvoid getLicInfo(AsyncCallback<LicInfoModel> callback);\n\n\tvoid getVMStatusModel(BackupVMModel vmModel,\n\t\t\tAsyncCallback<VMStatusModel[]> callback);\n\n\tvoid getConfiguredVM(AsyncCallback<BackupVMModel[]> callback);\n\n\tvoid getMergeJobMonitor(String vmInstanceUUID,\n\t\t\tAsyncCallback<MergeJobMonitorModel> callback);\n\n\tvoid pauseMerge(String vmInstanceUUID, AsyncCallback<Integer> callback);\n\n\tvoid resumeMerge(String vmInstanceUUID, AsyncCallback<Integer> callback);\n\n\tvoid getMergeStatus(String vmInstanceUUID,\n AsyncCallback<MergeStatusModel> callback);\n\n\tvoid getBackupSetInfo(String vmInstanceUUID, \n\t\t\tAsyncCallback<ArrayList<BackupSetInfoModel>> callback);\n\t\n\tpublic void getDataStoreStatus(String dataStoreUUID, AsyncCallback<DataStoreInfoModel> callback);\n\n\tvoid getVMDataStoreStatus(BackupVMModel vm, String dataStoreUUID,\n\t\t\tAsyncCallback<DataStoreInfoModel> callback);\n\t\n}", "public static SinkServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SinkServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SinkServiceFutureStub>() {\n @java.lang.Override\n public SinkServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SinkServiceFutureStub(channel, callOptions);\n }\n };\n return SinkServiceFutureStub.newStub(factory, channel);\n }", "public static S3InternalServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub>() {\n @java.lang.Override\n public S3InternalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceFutureStub(channel, callOptions);\n }\n };\n return S3InternalServiceFutureStub.newStub(factory, channel);\n }", "public interface GreetingServiceAsync {\r\n\tvoid getAll( String type, AsyncCallback<HashMap<String, String>> callback );\r\n\tvoid delete(String id,AsyncCallback callback );\r\n\tvoid getById(String idData, AsyncCallback<PhotoClient> callback);\r\n\tvoid addProject(String proName,AsyncCallback callback);\r\n\tvoid getProjectList(AsyncCallback callback);\r\n\tvoid getFolderChildren(FileModel model, AsyncCallback<List<FileModel>> children);\r\n \r\n}", "public interface RLatitudeServiceAsync {\r\n\r\n\tvoid sayHello(AsyncCallback<String> callback);\r\n\r\n\tvoid publishUser(String name, String firstName, String dateNaissance,\r\n\t\t\tAsyncCallback< String > callback );\r\n\t\r\n\tvoid checkPasswordLoginValidity( String login, String password, AsyncCallback< Boolean > callback );\r\n\t\r\n\tvoid publishAuthentication( String uid, String login, String password, AsyncCallback</*IUser*/Void> callback );\r\n\t\r\n\tvoid connect(String login, String password, AsyncCallback< String > callback);\r\n\t\r\n\tvoid disconnect(String uid, AsyncCallback< Boolean > callback);\r\n\t\r\n\tvoid changeMyVisibility(String uid, boolean visibility,\r\n\t\t\tAsyncCallback<Boolean> callback);\r\n\r\n\tvoid getVisibility(String uid, AsyncCallback<Boolean> callback);\r\n\t\r\n\tvoid setCurrentPostion(String uid, Position position,\r\n\t\t\tAsyncCallback<Void> callback);\r\n\t\r\n\tvoid addContact( String uidUser, String uidContact, AsyncCallback< Void > callback );\r\n\t\r\n\tvoid getContact( String uid,\r\n\t\t\tAsyncCallback< List< ResolvedContact > > callback );\r\n\t\r\n\tvoid getUser( String name, String lastName, AsyncCallback<ResolvedUser> callback );\r\n\t\r\n\tvoid getUser(String uid,AsyncCallback<ResolvedUser> callback);\r\n\r\n\tvoid getPosition( String uidUser, AsyncCallback< Position > callback );\r\n\r\n}", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Initializes a MetadataStore, including allocation of resources.\n * </pre>\n */\n default void createMetadataStore(\n com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific MetadataStore.\n * </pre>\n */\n default void getMetadataStore(\n com.google.cloud.aiplatform.v1.GetMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataStore>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists MetadataStores for a Location.\n * </pre>\n */\n default void listMetadataStores(\n com.google.cloud.aiplatform.v1.ListMetadataStoresRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListMetadataStoresResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetadataStoresMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a single MetadataStore and all its child resources (Artifacts,\n * Executions, and Contexts).\n * </pre>\n */\n default void deleteMetadataStore(\n com.google.cloud.aiplatform.v1.DeleteMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an Artifact associated with a MetadataStore.\n * </pre>\n */\n default void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Artifact.\n * </pre>\n */\n default void getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Artifacts in the MetadataStore.\n * </pre>\n */\n default void listArtifacts(\n com.google.cloud.aiplatform.v1.ListArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListArtifactsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListArtifactsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Artifact.\n * </pre>\n */\n default void updateArtifact(\n com.google.cloud.aiplatform.v1.UpdateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an Artifact.\n * </pre>\n */\n default void deleteArtifact(\n com.google.cloud.aiplatform.v1.DeleteArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Artifacts.\n * </pre>\n */\n default void purgeArtifacts(\n com.google.cloud.aiplatform.v1.PurgeArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeArtifactsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a Context associated with a MetadataStore.\n * </pre>\n */\n default void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Context.\n * </pre>\n */\n default void getContext(\n com.google.cloud.aiplatform.v1.GetContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Contexts on the MetadataStore.\n * </pre>\n */\n default void listContexts(\n com.google.cloud.aiplatform.v1.ListContextsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListContextsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListContextsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Context.\n * </pre>\n */\n default void updateContext(\n com.google.cloud.aiplatform.v1.UpdateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a stored Context.\n * </pre>\n */\n default void deleteContext(\n com.google.cloud.aiplatform.v1.DeleteContextRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Contexts.\n * </pre>\n */\n default void purgeContexts(\n com.google.cloud.aiplatform.v1.PurgeContextsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeContextsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a set of Artifacts and Executions to a Context. If any of the\n * Artifacts or Executions have already been added to a Context, they are\n * simply skipped.\n * </pre>\n */\n default void addContextArtifactsAndExecutions(\n com.google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddContextArtifactsAndExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a set of Contexts as children to a parent Context. If any of the\n * child Contexts have already been added to the parent Context, they are\n * simply skipped. If this call would create a cycle or cause any Context to\n * have more than 10 parents, the request will fail with an INVALID_ARGUMENT\n * error.\n * </pre>\n */\n default void addContextChildren(\n com.google.cloud.aiplatform.v1.AddContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.AddContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddContextChildrenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Remove a set of children contexts from a parent Context. If any of the\n * child Contexts were NOT added to the parent Context, they are\n * simply skipped.\n * </pre>\n */\n default void removeContextChildren(\n com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getRemoveContextChildrenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves Artifacts and Executions within the specified Context, connected\n * by Event edges and returned as a LineageSubgraph.\n * </pre>\n */\n default void queryContextLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryContextLineageSubgraphMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an Execution associated with a MetadataStore.\n * </pre>\n */\n default void createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Execution.\n * </pre>\n */\n default void getExecution(\n com.google.cloud.aiplatform.v1.GetExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Executions in the MetadataStore.\n * </pre>\n */\n default void listExecutions(\n com.google.cloud.aiplatform.v1.ListExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Execution.\n * </pre>\n */\n default void updateExecution(\n com.google.cloud.aiplatform.v1.UpdateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an Execution.\n * </pre>\n */\n default void deleteExecution(\n com.google.cloud.aiplatform.v1.DeleteExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Executions.\n * </pre>\n */\n default void purgeExecutions(\n com.google.cloud.aiplatform.v1.PurgeExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds Events to the specified Execution. An Event indicates whether an\n * Artifact was used as an input or output for an Execution. If an Event\n * already exists between the Execution and the Artifact, the Event is\n * skipped.\n * </pre>\n */\n default void addExecutionEvents(\n com.google.cloud.aiplatform.v1.AddExecutionEventsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.AddExecutionEventsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddExecutionEventsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Obtains the set of input and output Artifacts for this Execution, in the\n * form of LineageSubgraph that also contains the Execution and connecting\n * Events.\n * </pre>\n */\n default void queryExecutionInputsAndOutputs(\n com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryExecutionInputsAndOutputsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a MetadataSchema.\n * </pre>\n */\n default void createMetadataSchema(\n com.google.cloud.aiplatform.v1.CreateMetadataSchemaRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataSchema>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataSchemaMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific MetadataSchema.\n * </pre>\n */\n default void getMetadataSchema(\n com.google.cloud.aiplatform.v1.GetMetadataSchemaRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataSchema>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetadataSchemaMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists MetadataSchemas.\n * </pre>\n */\n default void listMetadataSchemas(\n com.google.cloud.aiplatform.v1.ListMetadataSchemasRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListMetadataSchemasResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetadataSchemasMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves lineage of an Artifact represented through Artifacts and\n * Executions connected by Event edges and returned as a LineageSubgraph.\n * </pre>\n */\n default void queryArtifactLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryArtifactLineageSubgraphMethod(), responseObserver);\n }\n }", "public AsyncService() {\n super(2, 2);\n }", "@RemoteServiceRelativePath(\"greet\")\npublic interface MyBitService extends RemoteService {\n OrderInfoList getOrderInfoList() throws IllegalArgumentException;\n\n CoinInfoList getCoinInfoList() throws IllegalArgumentException;\n\n ExchangeInfoList getExchangeInfoList() throws IllegalArgumentException;\n\n CompareInfoList getCompareInfoList() throws IllegalArgumentException;\n\n String toggleBot() throws IllegalArgumentException;\n\n String setThreshold(Double threshold) throws IllegalArgumentException;\n\n String getThreshold() throws IllegalArgumentException;\n\n public static class App {\n private static MyBitServiceAsync ourInstance = GWT.create(MyBitService.class);\n\n public static synchronized MyBitServiceAsync getInstance() {\n return ourInstance;\n }\n }\n}", "@RemoteServiceClient(SimpleHttpService.class)\npublic interface ISimpleHttpServiceClient extends IServiceClient {\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_START)\n void bootup(int port);\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_STOP)\n void shutdown();\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_INFO)\n void info(int port);\n}", "public static ImageServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ImageServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ImageServiceFutureStub>() {\n @java.lang.Override\n public ImageServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ImageServiceFutureStub(channel, callOptions);\n }\n };\n return ImageServiceFutureStub.newStub(factory, channel);\n }", "protected HttpJsonAgentsStub(\n AgentsStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.CancelOperation\",\n HttpRule.newBuilder()\n .setPost(\"/v3/{name=projects/*/operations/*}:cancel\")\n .addAdditionalBindings(\n HttpRule.newBuilder()\n .setPost(\"/v3/{name=projects/*/locations/*/operations/*}:cancel\")\n .build())\n .build())\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*/operations/*}\")\n .addAdditionalBindings(\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*/locations/*/operations/*}\")\n .build())\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*}/operations\")\n .addAdditionalBindings(\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*/locations/*}/operations\")\n .build())\n .build())\n .build());\n\n HttpJsonCallSettings<ListAgentsRequest, ListAgentsResponse> listAgentsTransportSettings =\n HttpJsonCallSettings.<ListAgentsRequest, ListAgentsResponse>newBuilder()\n .setMethodDescriptor(listAgentsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAgentRequest, Agent> getAgentTransportSettings =\n HttpJsonCallSettings.<GetAgentRequest, Agent>newBuilder()\n .setMethodDescriptor(getAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateAgentRequest, Agent> createAgentTransportSettings =\n HttpJsonCallSettings.<CreateAgentRequest, Agent>newBuilder()\n .setMethodDescriptor(createAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateAgentRequest, Agent> updateAgentTransportSettings =\n HttpJsonCallSettings.<UpdateAgentRequest, Agent>newBuilder()\n .setMethodDescriptor(updateAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"agent.name\", String.valueOf(request.getAgent().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteAgentRequest, Empty> deleteAgentTransportSettings =\n HttpJsonCallSettings.<DeleteAgentRequest, Empty>newBuilder()\n .setMethodDescriptor(deleteAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ExportAgentRequest, Operation> exportAgentTransportSettings =\n HttpJsonCallSettings.<ExportAgentRequest, Operation>newBuilder()\n .setMethodDescriptor(exportAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<RestoreAgentRequest, Operation> restoreAgentTransportSettings =\n HttpJsonCallSettings.<RestoreAgentRequest, Operation>newBuilder()\n .setMethodDescriptor(restoreAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ValidateAgentRequest, AgentValidationResult>\n validateAgentTransportSettings =\n HttpJsonCallSettings.<ValidateAgentRequest, AgentValidationResult>newBuilder()\n .setMethodDescriptor(validateAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAgentValidationResultRequest, AgentValidationResult>\n getAgentValidationResultTransportSettings =\n HttpJsonCallSettings\n .<GetAgentValidationResultRequest, AgentValidationResult>newBuilder()\n .setMethodDescriptor(getAgentValidationResultMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetGenerativeSettingsRequest, GenerativeSettings>\n getGenerativeSettingsTransportSettings =\n HttpJsonCallSettings.<GetGenerativeSettingsRequest, GenerativeSettings>newBuilder()\n .setMethodDescriptor(getGenerativeSettingsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateGenerativeSettingsRequest, GenerativeSettings>\n updateGenerativeSettingsTransportSettings =\n HttpJsonCallSettings.<UpdateGenerativeSettingsRequest, GenerativeSettings>newBuilder()\n .setMethodDescriptor(updateGenerativeSettingsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"generative_settings.name\",\n String.valueOf(request.getGenerativeSettings().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetLocationRequest, Location> getLocationTransportSettings =\n HttpJsonCallSettings.<GetLocationRequest, Location>newBuilder()\n .setMethodDescriptor(getLocationMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n\n this.listAgentsCallable =\n callableFactory.createUnaryCallable(\n listAgentsTransportSettings, settings.listAgentsSettings(), clientContext);\n this.listAgentsPagedCallable =\n callableFactory.createPagedCallable(\n listAgentsTransportSettings, settings.listAgentsSettings(), clientContext);\n this.getAgentCallable =\n callableFactory.createUnaryCallable(\n getAgentTransportSettings, settings.getAgentSettings(), clientContext);\n this.createAgentCallable =\n callableFactory.createUnaryCallable(\n createAgentTransportSettings, settings.createAgentSettings(), clientContext);\n this.updateAgentCallable =\n callableFactory.createUnaryCallable(\n updateAgentTransportSettings, settings.updateAgentSettings(), clientContext);\n this.deleteAgentCallable =\n callableFactory.createUnaryCallable(\n deleteAgentTransportSettings, settings.deleteAgentSettings(), clientContext);\n this.exportAgentCallable =\n callableFactory.createUnaryCallable(\n exportAgentTransportSettings, settings.exportAgentSettings(), clientContext);\n this.exportAgentOperationCallable =\n callableFactory.createOperationCallable(\n exportAgentTransportSettings,\n settings.exportAgentOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.restoreAgentCallable =\n callableFactory.createUnaryCallable(\n restoreAgentTransportSettings, settings.restoreAgentSettings(), clientContext);\n this.restoreAgentOperationCallable =\n callableFactory.createOperationCallable(\n restoreAgentTransportSettings,\n settings.restoreAgentOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.validateAgentCallable =\n callableFactory.createUnaryCallable(\n validateAgentTransportSettings, settings.validateAgentSettings(), clientContext);\n this.getAgentValidationResultCallable =\n callableFactory.createUnaryCallable(\n getAgentValidationResultTransportSettings,\n settings.getAgentValidationResultSettings(),\n clientContext);\n this.getGenerativeSettingsCallable =\n callableFactory.createUnaryCallable(\n getGenerativeSettingsTransportSettings,\n settings.getGenerativeSettingsSettings(),\n clientContext);\n this.updateGenerativeSettingsCallable =\n callableFactory.createUnaryCallable(\n updateGenerativeSettingsTransportSettings,\n settings.updateGenerativeSettingsSettings(),\n clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.getLocationCallable =\n callableFactory.createUnaryCallable(\n getLocationTransportSettings, settings.getLocationSettings(), clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public IStubProvider getStubProvider();", "void stubResponses(HttpExecuteResponse... responses);", "public static EmployeeServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new EmployeeServiceFutureStub(channel);\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Returns a specific `Metrics Scope`.\n * </pre>\n */\n default void getMetricsScope(\n com.google.monitoring.metricsscope.v1.GetMetricsScopeRequest request,\n io.grpc.stub.StreamObserver<com.google.monitoring.metricsscope.v1.MetricsScope>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetricsScopeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Returns a list of every `Metrics Scope` that a specific `MonitoredProject`\n * has been added to. The metrics scope representing the specified monitored\n * project will always be the first entry in the response.\n * </pre>\n */\n default void listMetricsScopesByMonitoredProject(\n com.google.monitoring.metricsscope.v1.ListMetricsScopesByMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<\n com.google.monitoring.metricsscope.v1.ListMetricsScopesByMonitoredProjectResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetricsScopesByMonitoredProjectMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a `MonitoredProject` with the given project ID\n * to the specified `Metrics Scope`.\n * </pre>\n */\n default void createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMonitoredProjectMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a `MonitoredProject` from the specified `Metrics Scope`.\n * </pre>\n */\n default void deleteMonitoredProject(\n com.google.monitoring.metricsscope.v1.DeleteMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteMonitoredProjectMethod(), responseObserver);\n }\n }", "protected GrpcJobServiceStub(JobServiceStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new GrpcJobServiceCallableFactory());\n }", "public interface InternalAuditServiceAsync {\n\n\tvoid signIn(String userid, String password, AsyncCallback<Employee> callback);\n\n\tvoid fetchObjectiveOwners(AsyncCallback<ArrayList<Employee>> callback);\n\n\tvoid fetchDepartments(AsyncCallback<ArrayList<Department>> callback);\n\n\tvoid fetchRiskFactors(int companyID, AsyncCallback<ArrayList<RiskFactor>> callback);\n\n\tvoid saveStrategic(Strategic strategic, HashMap<String, String> hm, AsyncCallback<String> callback);\n\n\tvoid fetchStrategic(HashMap<String, String> hm, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid fetchRiskAssesment(HashMap<String, String> hm, AsyncCallback<ArrayList<RiskAssesmentDTO>> callback);\n\n\tvoid saveRiskAssesment(HashMap<String, String> hm, ArrayList<StrategicDegreeImportance> strategicRisks,\n\t\t\tArrayList<StrategicRiskFactor> arrayListSaveRiskFactors, float resultRating, AsyncCallback<String> callback);\n\n\tvoid sendBackStrategic(Strategic strategics, AsyncCallback<String> callback);\n\n\tvoid declineStrategic(int startegicId, AsyncCallback<String> callback);\n\n\tvoid fetchStrategicAudit(AsyncCallback<ArrayList<StrategicAudit>> callback);\n\n\tvoid fetchDashBoard(HashMap<String, String> hm, AsyncCallback<ArrayList<DashBoardDTO>> callback);\n\n\tvoid fetchFinalAuditables(AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid checkDate(Date date, AsyncCallback<Boolean> callback);\n\n\tvoid fetchSchedulingStrategic(HashMap<String, String> hm, AsyncCallback<ArrayList<StrategicDTO>> callback);\n\n\tvoid fetchSkills(AsyncCallback<ArrayList<Skills>> callback);\n\n\tvoid saveJobTimeEstimation(JobTimeEstimationDTO entity, ArrayList<SkillUpdateData> updateForSkills,\n\t\t\tAsyncCallback<Boolean> callback);\n\n\tvoid fetchJobTime(int jobId, AsyncCallback<JobTimeEstimationDTO> callback);\n\n\tvoid fetchEmployees(AsyncCallback<ArrayList<Employee>> callback);\n\n\tvoid fetchResourceUseFor(int jobId, AsyncCallback<ArrayList<ResourceUse>> callback);\n\n\tvoid fetchEmployeesByDeptId(ArrayList<Integer> depIds, AsyncCallback<ArrayList<Employee>> asyncCallback);\n\n\tvoid saveJobAndAreaOfExpertiseState(ArrayList<JobAndAreaOfExpertise> state, AsyncCallback<Void> callback);\n\n\tvoid fetchCheckBoxStateFor(int jobId, AsyncCallback<ArrayList<JobAndAreaOfExpertise>> callback);\n\n\tvoid saveCreatedJob(JobCreationDTO job, AsyncCallback<String> callback);\n\n\tvoid fetchCreatedJobs(boolean getEmpRelation, boolean getSkillRelation,\n\t\t\tAsyncCallback<ArrayList<JobCreationDTO>> asyncCallback);\n\n\tvoid getEndDate(Date value, int estimatedWeeks, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchEmployeesWithJobs(AsyncCallback<ArrayList<JobsOfEmployee>> callback);\n\n\tvoid updateEndDateForJob(int jobId, String startDate, String endDate, AsyncCallback<JobCreation> asyncCallback);\n\n\tvoid getMonthsInvolved(String string, String string2, AsyncCallback<int[]> callback);\n\n\tvoid fetchAllAuditEngagement(int loggedInEmployee, AsyncCallback<ArrayList<AuditEngagement>> callback);\n\n\tvoid fetchCreatedJob(int jobId, AsyncCallback<JobCreation> callback);\n\n\tvoid updateAuditEngagement(AuditEngagement e, String fieldToUpdate, AsyncCallback<Boolean> callback);\n\n\tvoid syncAuditEngagementWithCreatedJobs(int loggedInEmployee, AsyncCallback<Void> asyncCallback);\n\n\tvoid saveRisks(ArrayList<RiskControlMatrixEntity> records, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid sendEmail(String body, String sendTo, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid fetchAuditEngagement(int selectedJobId, AsyncCallback<AuditEngagement> asyncCallback);\n\n\tvoid fetchRisks(int auditEngId, AsyncCallback<ArrayList<RiskControlMatrixEntity>> asyncCallback);\n\n\t// void fetchEmpForThisJob(\n\t// int selectedJobId,\n\t// AsyncCallback<ArrayList<Object>> asyncCallback);\n\n\tvoid fetchEmployeeJobRelations(int selectedJobId, AsyncCallback<ArrayList<JobEmployeeRelation>> asyncCallback);\n\n\tvoid fetchJobs(AsyncCallback<ArrayList<JobCreation>> asyncCallback);\n\n\tvoid fetchEmployeeJobs(Employee loggedInEmployee, String reportingTab,\n\t\t\tAsyncCallback<ArrayList<JobCreation>> asyncCallback);\n\n\tvoid fetchJobExceptions(int jobId, AsyncCallback<ArrayList<Exceptions>> asyncCallbac);\n\n\tvoid fetchEmployeeExceptions(int employeeId, int jobId, AsyncCallback<ArrayList<Exceptions>> asyncCallbac);\n\n\tvoid sendException(Exceptions exception, Boolean sendMail, String selectedView, AsyncCallback<String> asyncCallbac);\n\n\tvoid saveAuditStepAndExceptions(AuditStep step, ArrayList<Exceptions> exs, AsyncCallback<Void> asyncCallback);\n\n\tvoid getSavedAuditStep(int selectedJobId, int auditWorkId, AsyncCallback<AuditStep> asyncCallback);\n\n\tvoid getSavedExceptions(int selectedJobId, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid saveAuditWork(ArrayList<AuditWork> records, AsyncCallback<Void> asyncCallback);\n\n\tvoid updateKickoffStatus(int auditEngId, Employee loggedInUser, AsyncCallback<Void> asyncCallback);\n\n\tvoid fetchAuditHeadExceptions(int auditHeadId, int selectedJob, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid fetchCreatedJob(int id, boolean b, boolean c, String string, AsyncCallback<JobCreationDTO> asyncCallback);\n\n\tvoid fetchAuditWorkRows(int selectedJobId, AsyncCallback<ArrayList<AuditWork>> asyncCallback);\n\n\tvoid fetchApprovedAuditWorkRows(int selectedJobId, AsyncCallback<ArrayList<AuditWork>> asyncCallback);\n\n\tvoid saveAuditNotification(int auditEngagementId, String message, String to, String cc, String refNo, String from,\n\t\t\tString subject, String filePath, String momoNo, String date, int status,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid logOut(AsyncCallback<String> asyncCallback);\n\n\tvoid selectYear(int year, AsyncCallback<Void> asyncCallback);\n\n\tvoid fetchNumberofPlannedJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberofInProgressJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberofCompletedJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchJobsKickOffWithInaWeek(AsyncCallback<ArrayList<String>> asyncCallback);\n\n\tvoid fetchNumberOfAuditObservations(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsInProgress(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsImplemented(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsOverdue(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchEmployeesAvilbleForNext2Weeks(AsyncCallback<ArrayList<String>> asyncCallback);\n\n\tvoid fetchStrategicDepartments(int strategicId, AsyncCallback<ArrayList<StrategicDepartments>> asyncCallback);\n\n\tvoid fetchResourceIds(int strategicId, AsyncCallback<ArrayList<Integer>> asyncCallback);\n\n\tvoid fetchJobSoftSkills(int strategicId, AsyncCallback<ArrayList<Integer>> asyncCallback);\n\n\tvoid fetchReportSearchResult(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> department, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid fetchReportWithResourcesSearchResult(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> resources, ArrayList<String> department, AsyncCallback<ArrayList<JobCreation>> callback);\n\n\tvoid fetchStrategicDepartmentsMultiple(ArrayList<Integer> ids,\n\t\t\tAsyncCallback<ArrayList<StrategicDepartments>> callback);\n\n\tvoid exportAuditPlanningReport(ArrayList<ExcelDataDTO> excelDataList, String btn, AsyncCallback<String> callback);\n\n\tvoid fetchReportAuditScheduling(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> jobStatus,\n\t\t\tArrayList<String> responsiblePerson, ArrayList<String> dep, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid approveFinalAuditable(Strategic strategic, AsyncCallback<String> callback);\n\n\tvoid declineFinalAuditable(Strategic strategic, AsyncCallback<String> asyncCallback);\n\n\tvoid saveUser(Employee employee, AsyncCallback<String> asyncCallback);\n\n\tvoid updateUser(int previousHours, Employee employee, AsyncCallback<String> asyncCallback);\n\n\tvoid getStartEndDates(AsyncCallback<ArrayList<Date>> asyncCallback);\n\n\tvoid fetchNumberOfDaysBetweenTwoDates(Date from, Date to, AsyncCallback<Integer> asyncCallback);\n\n\tvoid saveCompany(Company company, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCompanies(AsyncCallback<ArrayList<Company>> asyncCallback);\n\n\tvoid updateStrategic(Strategic strategic, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteRisk(RiskControlMatrixEntity risk, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteAuditWork(int auditWorkId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCurrentYear(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchEmployeesBySkillId(int jobId, AsyncCallback<ArrayList<Employee>> asyncCallback);\n\n\tvoid checkNoOfResourcesForSelectedSkill(int noOfResources, int skillId, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteException(int exceptionId, AsyncCallback<String> asyncCallback);\n\n\tvoid approveScheduling(AsyncCallback<String> asyncCallback);\n\n\tvoid fetchSelectedEmployee(int employeeId, AsyncCallback<Employee> asyncCallback);\n\n\tvoid fetchExceptionReports(ArrayList<String> div, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> resources, ArrayList<String> jobs, ArrayList<String> auditees,\n\t\t\tArrayList<String> exceptionStatus, ArrayList<String> department, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid exportJobTimeAllocationReport(ArrayList<JobTimeAllocationReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid exportAuditExceptionsReport(ArrayList<ExceptionsReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid exportAuditSchedulingReport(ArrayList<AuditSchedulingReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid isScheduleApproved(AsyncCallback<Boolean> asyncCallback);\n\n\tvoid fetchDashboard(HashMap<String, String> hm, AsyncCallback<DashBoardNewDTO> asyncCallback);\n\n\tvoid updateUploadedAuditStepFile(int auditStepId, AsyncCallback<String> asyncCallback);\n\n\tvoid saveSelectedAuditStepIdInSession(int auditStepId, AsyncCallback<String> asyncCallback);\n\n\tvoid submitFeedBack(Feedback feedBack, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchProcessDTOs(AsyncCallback<ArrayList<ProcessDTO>> callback);\n\n\tvoid fetchSubProcess(int processId, AsyncCallback<ArrayList<SubProcess>> callback);\n\n\tvoid saveActivityObjectives(ArrayList<ActivityObjective> activityObjectives, int jobid, int status,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid saveRiskObjectives(ArrayList<RiskObjective> riskObjectives, int jobid, int status,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid saveExistingControls(ArrayList<SuggestedControls> suggestedControls, AsyncCallback<String> callback);\n\n\tvoid saveAuditWorkProgram(ArrayList<AuditProgramme> auditWorkProgramme, int selectedJobId,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchApprovedAuditProgrammeRows(int selectedJobId, AsyncCallback<ArrayList<AuditProgramme>> asyncCallback);\n\n\tvoid deleteRiskObjective(int riskId, int jobId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchJobStatus(int jobId, AsyncCallback<JobStatusDTO> asyncCallback);\n\n\tvoid fetchDashBoardListBoxDTOs(AsyncCallback<ArrayList<DashboardListBoxDTO>> callback);\n\n\tvoid savetoDo(ToDo todo, AsyncCallback<String> callback);\n\n\tvoid saveinformationRequest(InformationRequestEntity informationrequest, String filepath,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchEmailAttachments(AsyncCallback<ArrayList<String>> callback);\n\n\tvoid saveToDoLogs(ToDoLogsEntity toDoLogsEntity, AsyncCallback<String> callback);\n\n\tvoid saveInformationRequestLogs(InformationRequestLogEntity informationRequestLogEntity,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchAuditStepExceptions(String id, AsyncCallback<ArrayList<String>> callback);\n\n\tvoid fetchAuditStepsProcerdure(String id, String mainFolder, AsyncCallback<ArrayList<String>> callback);\n\n\tvoid deleteAttachmentFile(String id, String mainFolder, String fileName, AsyncCallback<String> callback);\n\n\tvoid deleteUnsavedAttachemnts(String pathtodouploads, AsyncCallback<String> callback);\n\n\tvoid fetchAssignedFromToDos(AsyncCallback<ArrayList<ToDo>> callback);\n\n\tvoid fetchAssignedToToDos(AsyncCallback<ArrayList<ToDo>> callback);\n\n\tvoid fetchAssignedFromIRReLoad(AsyncCallback<ArrayList<InformationRequestEntity>> callback);\n\n\tvoid fetchJobExceptionWithImplicationRating(int jobId, int ImplicationRating,\n\t\t\tAsyncCallback<ArrayList<Exceptions>> callback);\n\n\tvoid fetchControlsForReport(int jobId, AsyncCallback<ArrayList<SuggestedControls>> callback);\n\n\tvoid fetchSelectedJob(int jobId, AsyncCallback<JobCreation> callback);\n\n\tvoid saveReportDataPopup(ArrayList<ReportDataEntity> listReportData12, AsyncCallback<String> callback);\n\n\tvoid fetchReportDataPopup(int jobId, AsyncCallback<ArrayList<ReportDataEntity>> callback);\n\n\tvoid saveAssesmentGrid(ArrayList<AssesmentGridEntity> listAssesment, int jobid, AsyncCallback<String> callback);\n\n\tvoid fetchAssesmentGrid(int jobId, AsyncCallback<ArrayList<AssesmentGridDbEntity>> callback);\n\n\tvoid deleteActivityObjective(int jobId, AsyncCallback<String> callback);\n\n\tvoid getNextYear(Date value, AsyncCallback<Date> asyncCallback);\n\n\tvoid readExcel(String subFolder, String mainFolder, AsyncCallback<ArrayList<SamplingExcelSheetEntity>> callback);\n\n\tvoid fetchAssignedToIRReLoad(AsyncCallback<ArrayList<InformationRequestEntity>> asyncCallback);\n\n\tvoid generateSamplingOutput(String populationSize, String samplingSize, String samplingMehod,\n\t\t\tArrayList<SamplingExcelSheetEntity> list, Integer auditStepId, AsyncCallback<ArrayList<SamplingExcelSheetEntity>> callback);\n\n\n\tvoid exportSamplingAuditStep(String samplingMehod, String reportFormat, ArrayList<SamplingExcelSheetEntity> list,\n\t\t\tInteger auditStepId, AsyncCallback<String> callback);\n\n\tvoid fetchDivision(AsyncCallback<ArrayList<Division>> asyncCallback);\n\n\tvoid fetchDivisionDepartments(int divisionID, AsyncCallback<ArrayList<Department>> asyncCallback);\n\n\tvoid fetchSavedSamplingReport(String folder, String auditStepId, AsyncCallback<String> callback);\n\n\tvoid fetchJobsAgainstSelectedDates(Date startDate, Date endDate, AsyncCallback<ArrayList<JobCreation>> callback);\n\n\tvoid fetchStrategicSubProcess(int id, AsyncCallback<StrategicSubProcess> asyncCallback);\n\n\tvoid fetchCompanyPackage(int companyId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCompanyLogoPath(int companyID, AsyncCallback<String> asyncCallback);\n\n\tvoid updatePassword(Employee loggedInUser, AsyncCallback<String> asyncCallback);\n\n\tvoid validateRegisteredUserEmail(String emailID, AsyncCallback<Integer> asyncCallback);\n\n\tvoid sendPasswordResetEmail(String emailBody, String value, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid resetPassword(Integer employeeID, String newPassword, AsyncCallback<String> asyncCallback);\n\n\tvoid upgradeSoftware(AsyncCallback<String> asyncCallback);\n\n\tvoid addDivision(String divisionName, AsyncCallback<String> asyncCallback);\n\n\tvoid addDepartment(int divisionID, String departmentName, AsyncCallback<String> asyncCallback);\n\n\tvoid editDivisionName(Division division, AsyncCallback<String> asyncCallback);\n\n\tvoid editDepartmentName(Department department, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteDivision(int divisionID, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteDepartment(int departmentID, AsyncCallback<String> asyncCallback);\n\n\tvoid uploadCompanyLogo(String fileName, int companyID, AsyncCallback<String> callback);\n\n\tvoid fetchDegreeImportance(int companyID, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid saveDegreeImportance(ArrayList<DegreeImportance> arrayListDegreeImportance, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid deleteDegreeImportance(int degreeID, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid saveRiskFactor(ArrayList<RiskFactor> arrayListRiskFacrors, AsyncCallback<ArrayList<RiskFactor>> asyncCallback);\n\n\tvoid deleteRiskFactor(int riskID, AsyncCallback<ArrayList<RiskFactor>> asyncCallback);\n\n\tvoid removeStrategicDegreeImportance(int id, AsyncCallback<String> asyncCallback);\n\n\tvoid removeStrategicRiskFactor(int id, AsyncCallback<String> callback);\n\n\tvoid fetchStrategicDuplicate(Strategic strategic, AsyncCallback<ArrayList<Strategic>> asyncCallback);\n\n}", "protected HttpJsonEventarcStub(\n EventarcStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.CancelOperation\",\n HttpRule.newBuilder()\n .setPost(\"/v1/{name=projects/*/locations/*/operations/*}:cancel\")\n .build())\n .put(\n \"google.longrunning.Operations.DeleteOperation\",\n HttpRule.newBuilder()\n .setDelete(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*}/operations\")\n .build())\n .build());\n\n HttpJsonCallSettings<GetTriggerRequest, Trigger> getTriggerTransportSettings =\n HttpJsonCallSettings.<GetTriggerRequest, Trigger>newBuilder()\n .setMethodDescriptor(getTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListTriggersRequest, ListTriggersResponse> listTriggersTransportSettings =\n HttpJsonCallSettings.<ListTriggersRequest, ListTriggersResponse>newBuilder()\n .setMethodDescriptor(listTriggersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateTriggerRequest, Operation> createTriggerTransportSettings =\n HttpJsonCallSettings.<CreateTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(createTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateTriggerRequest, Operation> updateTriggerTransportSettings =\n HttpJsonCallSettings.<UpdateTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(updateTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"trigger.name\", String.valueOf(request.getTrigger().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteTriggerRequest, Operation> deleteTriggerTransportSettings =\n HttpJsonCallSettings.<DeleteTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetChannelRequest, Channel> getChannelTransportSettings =\n HttpJsonCallSettings.<GetChannelRequest, Channel>newBuilder()\n .setMethodDescriptor(getChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListChannelsRequest, ListChannelsResponse> listChannelsTransportSettings =\n HttpJsonCallSettings.<ListChannelsRequest, ListChannelsResponse>newBuilder()\n .setMethodDescriptor(listChannelsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateChannelRequest, Operation> createChannelTransportSettings =\n HttpJsonCallSettings.<CreateChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(createChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateChannelRequest, Operation> updateChannelTransportSettings =\n HttpJsonCallSettings.<UpdateChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(updateChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"channel.name\", String.valueOf(request.getChannel().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteChannelRequest, Operation> deleteChannelTransportSettings =\n HttpJsonCallSettings.<DeleteChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetProviderRequest, Provider> getProviderTransportSettings =\n HttpJsonCallSettings.<GetProviderRequest, Provider>newBuilder()\n .setMethodDescriptor(getProviderMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListProvidersRequest, ListProvidersResponse>\n listProvidersTransportSettings =\n HttpJsonCallSettings.<ListProvidersRequest, ListProvidersResponse>newBuilder()\n .setMethodDescriptor(listProvidersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetChannelConnectionRequest, ChannelConnection>\n getChannelConnectionTransportSettings =\n HttpJsonCallSettings.<GetChannelConnectionRequest, ChannelConnection>newBuilder()\n .setMethodDescriptor(getChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListChannelConnectionsRequest, ListChannelConnectionsResponse>\n listChannelConnectionsTransportSettings =\n HttpJsonCallSettings\n .<ListChannelConnectionsRequest, ListChannelConnectionsResponse>newBuilder()\n .setMethodDescriptor(listChannelConnectionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateChannelConnectionRequest, Operation>\n createChannelConnectionTransportSettings =\n HttpJsonCallSettings.<CreateChannelConnectionRequest, Operation>newBuilder()\n .setMethodDescriptor(createChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteChannelConnectionRequest, Operation>\n deleteChannelConnectionTransportSettings =\n HttpJsonCallSettings.<DeleteChannelConnectionRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetGoogleChannelConfigRequest, GoogleChannelConfig>\n getGoogleChannelConfigTransportSettings =\n HttpJsonCallSettings.<GetGoogleChannelConfigRequest, GoogleChannelConfig>newBuilder()\n .setMethodDescriptor(getGoogleChannelConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateGoogleChannelConfigRequest, GoogleChannelConfig>\n updateGoogleChannelConfigTransportSettings =\n HttpJsonCallSettings.<UpdateGoogleChannelConfigRequest, GoogleChannelConfig>newBuilder()\n .setMethodDescriptor(updateGoogleChannelConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"google_channel_config.name\",\n String.valueOf(request.getGoogleChannelConfig().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetLocationRequest, Location> getLocationTransportSettings =\n HttpJsonCallSettings.<GetLocationRequest, Location>newBuilder()\n .setMethodDescriptor(getLocationMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =\n HttpJsonCallSettings.<SetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(setIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =\n HttpJsonCallSettings.<GetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(getIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>\n testIamPermissionsTransportSettings =\n HttpJsonCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()\n .setMethodDescriptor(testIamPermissionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n\n this.getTriggerCallable =\n callableFactory.createUnaryCallable(\n getTriggerTransportSettings, settings.getTriggerSettings(), clientContext);\n this.listTriggersCallable =\n callableFactory.createUnaryCallable(\n listTriggersTransportSettings, settings.listTriggersSettings(), clientContext);\n this.listTriggersPagedCallable =\n callableFactory.createPagedCallable(\n listTriggersTransportSettings, settings.listTriggersSettings(), clientContext);\n this.createTriggerCallable =\n callableFactory.createUnaryCallable(\n createTriggerTransportSettings, settings.createTriggerSettings(), clientContext);\n this.createTriggerOperationCallable =\n callableFactory.createOperationCallable(\n createTriggerTransportSettings,\n settings.createTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateTriggerCallable =\n callableFactory.createUnaryCallable(\n updateTriggerTransportSettings, settings.updateTriggerSettings(), clientContext);\n this.updateTriggerOperationCallable =\n callableFactory.createOperationCallable(\n updateTriggerTransportSettings,\n settings.updateTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteTriggerCallable =\n callableFactory.createUnaryCallable(\n deleteTriggerTransportSettings, settings.deleteTriggerSettings(), clientContext);\n this.deleteTriggerOperationCallable =\n callableFactory.createOperationCallable(\n deleteTriggerTransportSettings,\n settings.deleteTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getChannelCallable =\n callableFactory.createUnaryCallable(\n getChannelTransportSettings, settings.getChannelSettings(), clientContext);\n this.listChannelsCallable =\n callableFactory.createUnaryCallable(\n listChannelsTransportSettings, settings.listChannelsSettings(), clientContext);\n this.listChannelsPagedCallable =\n callableFactory.createPagedCallable(\n listChannelsTransportSettings, settings.listChannelsSettings(), clientContext);\n this.createChannelCallable =\n callableFactory.createUnaryCallable(\n createChannelTransportSettings, settings.createChannelSettings(), clientContext);\n this.createChannelOperationCallable =\n callableFactory.createOperationCallable(\n createChannelTransportSettings,\n settings.createChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateChannelCallable =\n callableFactory.createUnaryCallable(\n updateChannelTransportSettings, settings.updateChannelSettings(), clientContext);\n this.updateChannelOperationCallable =\n callableFactory.createOperationCallable(\n updateChannelTransportSettings,\n settings.updateChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteChannelCallable =\n callableFactory.createUnaryCallable(\n deleteChannelTransportSettings, settings.deleteChannelSettings(), clientContext);\n this.deleteChannelOperationCallable =\n callableFactory.createOperationCallable(\n deleteChannelTransportSettings,\n settings.deleteChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getProviderCallable =\n callableFactory.createUnaryCallable(\n getProviderTransportSettings, settings.getProviderSettings(), clientContext);\n this.listProvidersCallable =\n callableFactory.createUnaryCallable(\n listProvidersTransportSettings, settings.listProvidersSettings(), clientContext);\n this.listProvidersPagedCallable =\n callableFactory.createPagedCallable(\n listProvidersTransportSettings, settings.listProvidersSettings(), clientContext);\n this.getChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n getChannelConnectionTransportSettings,\n settings.getChannelConnectionSettings(),\n clientContext);\n this.listChannelConnectionsCallable =\n callableFactory.createUnaryCallable(\n listChannelConnectionsTransportSettings,\n settings.listChannelConnectionsSettings(),\n clientContext);\n this.listChannelConnectionsPagedCallable =\n callableFactory.createPagedCallable(\n listChannelConnectionsTransportSettings,\n settings.listChannelConnectionsSettings(),\n clientContext);\n this.createChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n createChannelConnectionTransportSettings,\n settings.createChannelConnectionSettings(),\n clientContext);\n this.createChannelConnectionOperationCallable =\n callableFactory.createOperationCallable(\n createChannelConnectionTransportSettings,\n settings.createChannelConnectionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n deleteChannelConnectionTransportSettings,\n settings.deleteChannelConnectionSettings(),\n clientContext);\n this.deleteChannelConnectionOperationCallable =\n callableFactory.createOperationCallable(\n deleteChannelConnectionTransportSettings,\n settings.deleteChannelConnectionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getGoogleChannelConfigCallable =\n callableFactory.createUnaryCallable(\n getGoogleChannelConfigTransportSettings,\n settings.getGoogleChannelConfigSettings(),\n clientContext);\n this.updateGoogleChannelConfigCallable =\n callableFactory.createUnaryCallable(\n updateGoogleChannelConfigTransportSettings,\n settings.updateGoogleChannelConfigSettings(),\n clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.getLocationCallable =\n callableFactory.createUnaryCallable(\n getLocationTransportSettings, settings.getLocationSettings(), clientContext);\n this.setIamPolicyCallable =\n callableFactory.createUnaryCallable(\n setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);\n this.getIamPolicyCallable =\n callableFactory.createUnaryCallable(\n getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);\n this.testIamPermissionsCallable =\n callableFactory.createUnaryCallable(\n testIamPermissionsTransportSettings,\n settings.testIamPermissionsSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public interface IRoutingDomainsServiceAsync extends RemoteService {\n\t/**\n\t * Returns the routing domains.\n\t * @param callback Callback for processing the returned routing domains.\n\t */\n\tvoid getDomains(AsyncCallback<List<RoutingDomainSelDTO>> callback);\n\n\t/**\n\t * Returns the detail of a routing domain.\n\t * @param id Routing domain id.\n\t * @param callback Callback for processing the requested routing domain.\n\t */\n\tvoid get(String id, AsyncCallback<RoutingDomainDTO> callback);\n\n\t/**\n\t * Saves a routing domain. If the id is {@code null} it is considered an insert, otherwise it is an update.\n\t * @param dto Routing domain to save.\n\t * @param callback Callback for processing the saved routing domain.\n\t */\n\tvoid save(RoutingDomainDTO dto, AsyncCallback<RoutingDomainDTO> callback);\n\n\t/**\n\t * Deletes a routing domain.\n\t * @param id Routing domain id.\n\t * @param callback Callback.\n\t */\n\tvoid delete(String id, AsyncCallback<Void> callback);\n\n\t/**\n\t * Returns the default routing domain.<br/>\n\t * @param callback Callback for processing the returned default routing domain.\n\t */\n\tvoid getDefault(AsyncCallback<RoutingDomainDTO> callback);\n\n\t/**\n\t * Sets the default routing domain.<br/>\n\t * @param dto The default routing domain.\n\t * @param callback Callback for processing the returned default routing domain.\n\t */\n\tvoid setDefault(RoutingDomainDTO dto, AsyncCallback<RoutingDomainDTO> callback);\n}", "protected HttpJsonFunctionServiceStub(\n FunctionServiceStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v2/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v2/{name=projects/*/locations/*}/operations\")\n .build())\n .build());\n\n HttpJsonCallSettings<GetFunctionRequest, Function> getFunctionTransportSettings =\n HttpJsonCallSettings.<GetFunctionRequest, Function>newBuilder()\n .setMethodDescriptor(getFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListFunctionsRequest, ListFunctionsResponse>\n listFunctionsTransportSettings =\n HttpJsonCallSettings.<ListFunctionsRequest, ListFunctionsResponse>newBuilder()\n .setMethodDescriptor(listFunctionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateFunctionRequest, Operation> createFunctionTransportSettings =\n HttpJsonCallSettings.<CreateFunctionRequest, Operation>newBuilder()\n .setMethodDescriptor(createFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateFunctionRequest, Operation> updateFunctionTransportSettings =\n HttpJsonCallSettings.<UpdateFunctionRequest, Operation>newBuilder()\n .setMethodDescriptor(updateFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"function.name\", String.valueOf(request.getFunction().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteFunctionRequest, Operation> deleteFunctionTransportSettings =\n HttpJsonCallSettings.<DeleteFunctionRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GenerateUploadUrlRequest, GenerateUploadUrlResponse>\n generateUploadUrlTransportSettings =\n HttpJsonCallSettings.<GenerateUploadUrlRequest, GenerateUploadUrlResponse>newBuilder()\n .setMethodDescriptor(generateUploadUrlMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GenerateDownloadUrlRequest, GenerateDownloadUrlResponse>\n generateDownloadUrlTransportSettings =\n HttpJsonCallSettings\n .<GenerateDownloadUrlRequest, GenerateDownloadUrlResponse>newBuilder()\n .setMethodDescriptor(generateDownloadUrlMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListRuntimesRequest, ListRuntimesResponse> listRuntimesTransportSettings =\n HttpJsonCallSettings.<ListRuntimesRequest, ListRuntimesResponse>newBuilder()\n .setMethodDescriptor(listRuntimesMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =\n HttpJsonCallSettings.<SetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(setIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =\n HttpJsonCallSettings.<GetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(getIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>\n testIamPermissionsTransportSettings =\n HttpJsonCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()\n .setMethodDescriptor(testIamPermissionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n\n this.getFunctionCallable =\n callableFactory.createUnaryCallable(\n getFunctionTransportSettings, settings.getFunctionSettings(), clientContext);\n this.listFunctionsCallable =\n callableFactory.createUnaryCallable(\n listFunctionsTransportSettings, settings.listFunctionsSettings(), clientContext);\n this.listFunctionsPagedCallable =\n callableFactory.createPagedCallable(\n listFunctionsTransportSettings, settings.listFunctionsSettings(), clientContext);\n this.createFunctionCallable =\n callableFactory.createUnaryCallable(\n createFunctionTransportSettings, settings.createFunctionSettings(), clientContext);\n this.createFunctionOperationCallable =\n callableFactory.createOperationCallable(\n createFunctionTransportSettings,\n settings.createFunctionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateFunctionCallable =\n callableFactory.createUnaryCallable(\n updateFunctionTransportSettings, settings.updateFunctionSettings(), clientContext);\n this.updateFunctionOperationCallable =\n callableFactory.createOperationCallable(\n updateFunctionTransportSettings,\n settings.updateFunctionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteFunctionCallable =\n callableFactory.createUnaryCallable(\n deleteFunctionTransportSettings, settings.deleteFunctionSettings(), clientContext);\n this.deleteFunctionOperationCallable =\n callableFactory.createOperationCallable(\n deleteFunctionTransportSettings,\n settings.deleteFunctionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.generateUploadUrlCallable =\n callableFactory.createUnaryCallable(\n generateUploadUrlTransportSettings,\n settings.generateUploadUrlSettings(),\n clientContext);\n this.generateDownloadUrlCallable =\n callableFactory.createUnaryCallable(\n generateDownloadUrlTransportSettings,\n settings.generateDownloadUrlSettings(),\n clientContext);\n this.listRuntimesCallable =\n callableFactory.createUnaryCallable(\n listRuntimesTransportSettings, settings.listRuntimesSettings(), clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.setIamPolicyCallable =\n callableFactory.createUnaryCallable(\n setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);\n this.getIamPolicyCallable =\n callableFactory.createUnaryCallable(\n getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);\n this.testIamPermissionsCallable =\n callableFactory.createUnaryCallable(\n testIamPermissionsTransportSettings,\n settings.testIamPermissionsSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public interface AsyncOperationHelper {\n\t\n\t/**\n\t * Inserisce l'operazione asincrona e restituisce il risultato dell'invocazione.\n\t * \n\t * @param account l'account relativo alla richiesta\n\t * @param azioneRichiesta l'azione richiesta\n\t * @param ente l'ente\n\t * @param richiedente il richiedente\n\t * \n\t * @return la response del servizio di {@link InserisciOperazioneAsinc}\n\t * \n\t * @throws WebServiceInvocationFailureException nel caso in cui l'invocazione del WebService restituisca un'eccezione\n\t */\n\tInserisciOperazioneAsincResponse inserisciOperazioneAsincrona(Account account, AzioneRichiesta azioneRichiesta, Ente ente, Richiedente richiedente)\n\t\tthrows WebServiceInvocationFailureException;\n\t\n\t/**\n\t * Effettua il polling dell'operazione asincrona.\n\t * \n\t * @param idAzioneAsync l'id dell'azione asincrona\n\t * @param richiedente il richiedente\n\t * \n\t * @return la response del servizio di {@link GetOperazioneAsincResponse}\n\t * \n\t * @throws WebServiceInvocationFailureException nel caso in cui l'invocazione del WebService restituisca un'eccezione\n\t */\n\tGetOperazioneAsincResponse getOperazioneAsinc(Integer idAzioneAsync, Richiedente richiedente) throws WebServiceInvocationFailureException;\n\t\n}", "public static BookServicesFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new BookServicesFutureStub(channel);\n }", "@ThriftService(\"ThriftTaskService\")\npublic interface ThriftTaskClient\n{\n @ThriftMethod\n ListenableFuture<ThriftBufferResult> getResults(TaskId taskId, OutputBufferId bufferId, long token, long maxSizeInBytes);\n\n @ThriftMethod\n ListenableFuture<Void> acknowledgeResults(TaskId taskId, OutputBufferId bufferId, long token);\n\n @ThriftMethod\n ListenableFuture<Void> abortResults(TaskId taskId, OutputBufferId bufferId);\n}", "public interface AsyncService {\n\n /**\n * <pre>\n * Creates or removes asset group signals. Operation statuses are\n * returned.\n * </pre>\n */\n default void mutateAssetGroupSignals(com.google.ads.googleads.v14.services.MutateAssetGroupSignalsRequest request,\n io.grpc.stub.StreamObserver<com.google.ads.googleads.v14.services.MutateAssetGroupSignalsResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMutateAssetGroupSignalsMethod(), responseObserver);\n }\n }", "public static TpuFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<TpuFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<TpuFutureStub>() {\n @java.lang.Override\n public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new TpuFutureStub(channel, callOptions);\n }\n };\n return TpuFutureStub.newStub(factory, channel);\n }", "public static interface ApplicationManagerFutureClient {\n\n /**\n * <pre>\n * Applications should first be registered to the Handler with the `RegisterApplication` method\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> registerApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * GetApplication returns the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Application> getApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * SetApplication updates the settings for the application. All fields must be supplied.\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> setApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.Application request);\n\n /**\n * <pre>\n * DeleteApplication deletes the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * GetDevice returns the device with the given identifier (app_id and dev_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);\n\n /**\n * <pre>\n * SetDevice creates or updates a device. All fields must be supplied.\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> setDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);\n\n /**\n * <pre>\n * DeleteDevice deletes the device with the given identifier (app_id and dev_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);\n\n /**\n * <pre>\n * GetDevicesForApplication returns all devices that belong to the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> getDevicesForApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * DryUplink simulates processing a downlink message and returns the result\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DryDownlinkResult> dryDownlink(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DryDownlinkMessage request);\n\n /**\n * <pre>\n * DryUplink simulates processing an uplink message and returns the result\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DryUplinkResult> dryUplink(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DryUplinkMessage request);\n\n /**\n * <pre>\n * SimulateUplink simulates an uplink message\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> simulateUplink(\n org.thethingsnetwork.management.proto.HandlerOuterClass.SimulatedUplinkMessage request);\n }", "public static RaftServerProtocolServiceStub newStub(org.apache.ratis.shaded.io.grpc.Channel channel) {\n return new RaftServerProtocolServiceStub(channel);\n }", "public static JwtAuthTestServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<JwtAuthTestServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<JwtAuthTestServiceFutureStub>() {\n @java.lang.Override\n public JwtAuthTestServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new JwtAuthTestServiceFutureStub(channel, callOptions);\n }\n };\n return JwtAuthTestServiceFutureStub.newStub(factory, channel);\n }", "public interface AsynService {\n void asynMethod();\n}", "public interface BankOfficeGWTServiceAsync {\n\tpublic void findById(Integer id, AsyncCallback<BankOfficeDTO> callback);\n\tpublic void saveOrUpdate(BankOfficeDTO entity, AsyncCallback<Integer> callback);\n\tpublic void getMyOffice(AsyncCallback<BankOfficeDTO> callback);\n\tpublic void findByExternalId(Long midasId, AsyncCallback<BankOfficeDTO> callback);\n\tpublic void findAll(AsyncCallback<ArrayList<BankOfficeDTO>> callback);\n\tpublic void findAllShort(AsyncCallback<ArrayList<ListBoxDTO>> asyncCallback);\n}", "protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new GrpcAssetServiceCallableFactory());\n }", "protected HttpJsonServicesStub(ServicesStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new HttpJsonServicesCallableFactory());\n }", "public static RoutesFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<RoutesFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<RoutesFutureStub>() {\n @java.lang.Override\n public RoutesFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new RoutesFutureStub(channel, callOptions);\n }\n };\n return RoutesFutureStub.newStub(factory, channel);\n }", "public interface StubGenerator {\n\n\t/**\n\t * @param fileName - file name\n\t * @return {@code true} if the converter can handle the file to convert it into a\n\t * stub.\n\t */\n\tdefault boolean canHandleFileName(String fileName) {\n\t\treturn fileName.endsWith(fileExtension());\n\t}\n\n\t/**\n\t * @param rootName - root name of the contract\n\t * @param content - metadata of the contract\n\t * @return the collection of converted contracts into stubs. One contract can result\n\t * in multiple stubs.\n\t */\n\tMap<Contract, String> convertContents(String rootName, ContractMetadata content);\n\n\t/**\n\t * @param inputFileName - name of the input file\n\t * @return the name of the converted stub file. If you have multiple contracts in a\n\t * single file then a prefix will be added to the generated file. If you provide the\n\t * {@link Contract#name} field then that field will override the generated file name.\n\t *\n\t * Example: name of file with 2 contracts is {@code foo.groovy}, it will be converted\n\t * by the implementation to {@code foo.json}. The recursive file converter will create\n\t * two files {@code 0_foo.json} and {@code 1_foo.json}\n\t */\n\tString generateOutputFileNameForInput(String inputFileName);\n\n\t/**\n\t * Describes the file extension that this stub generator can handle.\n\t * @return string describing the file extension\n\t */\n\tdefault String fileExtension() {\n\t\treturn \".json\";\n\t}\n\n}", "@NonNull\n @MainThread\n protected abstract LiveData<ApiResponse<RequestType>> createCall();", "public static ProductServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ProductServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ProductServiceFutureStub>() {\n @java.lang.Override\n public ProductServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ProductServiceFutureStub(channel, callOptions);\n }\n };\n return ProductServiceFutureStub.newStub(factory, channel);\n }", "public interface ICommunicationService\n extends IInterface\n{\n public static abstract class Stub extends Binder\n implements ICommunicationService\n {\n\n static final int TRANSACTION_acquireConnection = 1;\n static final int TRANSACTION_acquireConnectionEx = 8;\n static final int TRANSACTION_deregisterMessageHandler = 3;\n static final int TRANSACTION_getGatewayConnectivity = 9;\n static final int TRANSACTION_getIdentityResolver = 6;\n static final int TRANSACTION_isInitialized = 7;\n static final int TRANSACTION_registerMessageHandler = 2;\n static final int TRANSACTION_removeAckHandler = 11;\n static final int TRANSACTION_routeMessage = 4;\n static final int TRANSACTION_routeMessageFragment = 5;\n static final int TRANSACTION_setAckHandler = 10;\n\n public static ICommunicationService asInterface(IBinder ibinder)\n {\n if (ibinder == null)\n {\n return null;\n }\n IInterface iinterface = ibinder.queryLocalInterface(\"com.amazon.communication.ICommunicationService\");\n if (iinterface != null && (iinterface instanceof ICommunicationService))\n {\n return (ICommunicationService)iinterface;\n } else\n {\n return new Proxy(ibinder);\n }\n }\n\n public IBinder asBinder()\n {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j)\n throws RemoteException\n {\n Object obj1 = null;\n ParcelableStatus parcelablestatus2 = null;\n Object obj = null;\n Object obj2 = null;\n boolean flag = false;\n switch (i)\n {\n default:\n return super.onTransact(i, parcel, parcel1, j);\n\n case 1598968902: \n parcel1.writeString(\"com.amazon.communication.ICommunicationService\");\n return true;\n\n case 1: // '\\001'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n if (parcel.readInt() != 0)\n {\n obj = (ParcelableEndpointIdentity)ParcelableEndpointIdentity.CREATOR.createFromParcel(parcel);\n } else\n {\n obj = null;\n }\n if (parcel.readInt() != 0)\n {\n obj1 = (ParcelableConnectionPolicy)ParcelableConnectionPolicy.CREATOR.createFromParcel(parcel);\n } else\n {\n obj1 = null;\n }\n parcel = IConnectionListener.Stub.asInterface(parcel.readStrongBinder());\n parcelablestatus2 = new ParcelableStatus();\n obj = acquireConnection(((ParcelableEndpointIdentity) (obj)), ((ParcelableConnectionPolicy) (obj1)), parcel, parcelablestatus2);\n parcel1.writeNoException();\n parcel = obj2;\n if (obj != null)\n {\n parcel = ((IConnection) (obj)).asBinder();\n }\n parcel1.writeStrongBinder(parcel);\n if (parcelablestatus2 != null)\n {\n parcel1.writeInt(1);\n parcelablestatus2.writeToParcel(parcel1, 1);\n return true;\n } else\n {\n parcel1.writeInt(0);\n return true;\n }\n\n case 2: // '\\002'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n i = registerMessageHandler(parcel.readInt(), IMessageHandler.Stub.asInterface(parcel.readStrongBinder()));\n parcel1.writeNoException();\n parcel1.writeInt(i);\n return true;\n\n case 3: // '\\003'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n deregisterMessageHandler(parcel.readInt());\n parcel1.writeNoException();\n return true;\n\n case 4: // '\\004'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n if (parcel.readInt() != 0)\n {\n obj = (ParcelableEndpointIdentity)ParcelableEndpointIdentity.CREATOR.createFromParcel(parcel);\n } else\n {\n obj = null;\n }\n if (parcel.readInt() != 0)\n {\n obj1 = (MessageEnvelope)MessageEnvelope.CREATOR.createFromParcel(parcel);\n } else\n {\n obj1 = null;\n }\n routeMessage(((ParcelableEndpointIdentity) (obj)), ((MessageEnvelope) (obj1)), parcel.readInt());\n parcel1.writeNoException();\n return true;\n\n case 5: // '\\005'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n boolean flag1;\n if (parcel.readInt() != 0)\n {\n obj = (ParcelableEndpointIdentity)ParcelableEndpointIdentity.CREATOR.createFromParcel(parcel);\n } else\n {\n obj = null;\n }\n i = parcel.readInt();\n if (parcel.readInt() != 0)\n {\n obj1 = (MessageEnvelope)MessageEnvelope.CREATOR.createFromParcel(parcel);\n } else\n {\n obj1 = null;\n }\n if (parcel.readInt() != 0)\n {\n flag1 = true;\n } else\n {\n flag1 = false;\n }\n routeMessageFragment(((ParcelableEndpointIdentity) (obj)), i, ((MessageEnvelope) (obj1)), flag1, parcel.readInt());\n parcel1.writeNoException();\n return true;\n\n case 6: // '\\006'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n obj = getIdentityResolver();\n parcel1.writeNoException();\n parcel = ((Parcel) (obj1));\n if (obj != null)\n {\n parcel = ((IIdentityResolver) (obj)).asBinder();\n }\n parcel1.writeStrongBinder(parcel);\n return true;\n\n case 7: // '\\007'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n boolean flag2 = isInitialized();\n parcel1.writeNoException();\n i = ((flag) ? 1 : 0);\n if (flag2)\n {\n i = 1;\n }\n parcel1.writeInt(i);\n return true;\n\n case 8: // '\\b'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n ParcelablePolicy parcelablepolicy;\n ParcelableStatus parcelablestatus1;\n if (parcel.readInt() != 0)\n {\n obj = (ParcelableEndpointIdentity)ParcelableEndpointIdentity.CREATOR.createFromParcel(parcel);\n } else\n {\n obj = null;\n }\n if (parcel.readInt() != 0)\n {\n parcelablepolicy = (ParcelablePolicy)ParcelablePolicy.CREATOR.createFromParcel(parcel);\n } else\n {\n parcelablepolicy = null;\n }\n parcel = IConnectionListener.Stub.asInterface(parcel.readStrongBinder());\n parcelablestatus1 = new ParcelableStatus();\n obj = acquireConnectionEx(((ParcelableEndpointIdentity) (obj)), parcelablepolicy, parcel, parcelablestatus1);\n parcel1.writeNoException();\n parcel = parcelablestatus2;\n if (obj != null)\n {\n parcel = ((IConnection) (obj)).asBinder();\n }\n parcel1.writeStrongBinder(parcel);\n if (parcelablestatus1 != null)\n {\n parcel1.writeInt(1);\n parcelablestatus1.writeToParcel(parcel1, 1);\n return true;\n } else\n {\n parcel1.writeInt(0);\n return true;\n }\n\n case 9: // '\\t'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n parcel = IConnectionListener.Stub.asInterface(parcel.readStrongBinder());\n ParcelableStatus parcelablestatus = new ParcelableStatus();\n IGatewayConnectivity igatewayconnectivity = getGatewayConnectivity(parcel, parcelablestatus);\n parcel1.writeNoException();\n parcel = ((Parcel) (obj));\n if (igatewayconnectivity != null)\n {\n parcel = igatewayconnectivity.asBinder();\n }\n parcel1.writeStrongBinder(parcel);\n if (parcelablestatus != null)\n {\n parcel1.writeInt(1);\n parcelablestatus.writeToParcel(parcel1, 1);\n return true;\n } else\n {\n parcel1.writeInt(0);\n return true;\n }\n\n case 10: // '\\n'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n i = setAckHandler(com.amazon.communication.rlm.IAckHandler.Stub.asInterface(parcel.readStrongBinder()));\n parcel1.writeNoException();\n parcel1.writeInt(i);\n return true;\n\n case 11: // '\\013'\n parcel.enforceInterface(\"com.amazon.communication.ICommunicationService\");\n removeAckHandler();\n parcel1.writeNoException();\n return true;\n }\n }\n\n public Stub()\n {\n attachInterface(this, \"com.amazon.communication.ICommunicationService\");\n }\n }\n\n private static class Stub.Proxy\n implements ICommunicationService\n {\n\n private IBinder mRemote;\n\n public IConnection acquireConnection(ParcelableEndpointIdentity parcelableendpointidentity, ParcelableConnectionPolicy parcelableconnectionpolicy, IConnectionListener iconnectionlistener, ParcelableStatus parcelablestatus)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n if (parcelableendpointidentity == null) goto _L2; else goto _L1\n_L1:\n parcel.writeInt(1);\n parcelableendpointidentity.writeToParcel(parcel, 0);\n_L5:\n if (parcelableconnectionpolicy == null) goto _L4; else goto _L3\n_L3:\n parcel.writeInt(1);\n parcelableconnectionpolicy.writeToParcel(parcel, 0);\n_L6:\n if (iconnectionlistener == null)\n {\n break MISSING_BLOCK_LABEL_156;\n }\n parcelableendpointidentity = iconnectionlistener.asBinder();\n_L7:\n parcel.writeStrongBinder(parcelableendpointidentity);\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n parcelableendpointidentity = IConnection.Stub.asInterface(parcel1.readStrongBinder());\n if (parcel1.readInt() != 0)\n {\n parcelablestatus.readFromParcel(parcel1);\n }\n parcel1.recycle();\n parcel.recycle();\n return parcelableendpointidentity;\n_L2:\n parcel.writeInt(0);\n goto _L5\n parcelableendpointidentity;\n parcel1.recycle();\n parcel.recycle();\n throw parcelableendpointidentity;\n_L4:\n parcel.writeInt(0);\n goto _L6\n parcelableendpointidentity = null;\n goto _L7\n }\n\n public IConnection acquireConnectionEx(ParcelableEndpointIdentity parcelableendpointidentity, ParcelablePolicy parcelablepolicy, IConnectionListener iconnectionlistener, ParcelableStatus parcelablestatus)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n if (parcelableendpointidentity == null) goto _L2; else goto _L1\n_L1:\n parcel.writeInt(1);\n parcelableendpointidentity.writeToParcel(parcel, 0);\n_L5:\n if (parcelablepolicy == null) goto _L4; else goto _L3\n_L3:\n parcel.writeInt(1);\n parcelablepolicy.writeToParcel(parcel, 0);\n_L6:\n if (iconnectionlistener == null)\n {\n break MISSING_BLOCK_LABEL_157;\n }\n parcelableendpointidentity = iconnectionlistener.asBinder();\n_L7:\n parcel.writeStrongBinder(parcelableendpointidentity);\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n parcelableendpointidentity = IConnection.Stub.asInterface(parcel1.readStrongBinder());\n if (parcel1.readInt() != 0)\n {\n parcelablestatus.readFromParcel(parcel1);\n }\n parcel1.recycle();\n parcel.recycle();\n return parcelableendpointidentity;\n_L2:\n parcel.writeInt(0);\n goto _L5\n parcelableendpointidentity;\n parcel1.recycle();\n parcel.recycle();\n throw parcelableendpointidentity;\n_L4:\n parcel.writeInt(0);\n goto _L6\n parcelableendpointidentity = null;\n goto _L7\n }\n\n public IBinder asBinder()\n {\n return mRemote;\n }\n\n public void deregisterMessageHandler(int i)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n parcel.writeInt(i);\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n parcel1.recycle();\n parcel.recycle();\n return;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IGatewayConnectivity getGatewayConnectivity(IConnectionListener iconnectionlistener, ParcelableStatus parcelablestatus)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n if (iconnectionlistener == null)\n {\n break MISSING_BLOCK_LABEL_86;\n }\n iconnectionlistener = iconnectionlistener.asBinder();\n_L1:\n parcel.writeStrongBinder(iconnectionlistener);\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n iconnectionlistener = IGatewayConnectivity.Stub.asInterface(parcel1.readStrongBinder());\n if (parcel1.readInt() != 0)\n {\n parcelablestatus.readFromParcel(parcel1);\n }\n parcel1.recycle();\n parcel.recycle();\n return iconnectionlistener;\n iconnectionlistener = null;\n goto _L1\n iconnectionlistener;\n parcel1.recycle();\n parcel.recycle();\n throw iconnectionlistener;\n }\n\n public IIdentityResolver getIdentityResolver()\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n IIdentityResolver iidentityresolver;\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n iidentityresolver = com.amazon.communication.ir.IIdentityResolver.Stub.asInterface(parcel1.readStrongBinder());\n parcel1.recycle();\n parcel.recycle();\n return iidentityresolver;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor()\n {\n return \"com.amazon.communication.ICommunicationService\";\n }\n\n public boolean isInitialized()\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n boolean flag;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if (i != 0)\n {\n flag = true;\n }\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int registerMessageHandler(int i, IMessageHandler imessagehandler)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n parcel.writeInt(i);\n if (imessagehandler == null)\n {\n break MISSING_BLOCK_LABEL_73;\n }\n imessagehandler = imessagehandler.asBinder();\n_L1:\n parcel.writeStrongBinder(imessagehandler);\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n imessagehandler = null;\n goto _L1\n imessagehandler;\n parcel1.recycle();\n parcel.recycle();\n throw imessagehandler;\n }\n\n public void removeAckHandler()\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n parcel1.recycle();\n parcel.recycle();\n return;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public void routeMessage(ParcelableEndpointIdentity parcelableendpointidentity, MessageEnvelope messageenvelope, int i)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n if (parcelableendpointidentity == null) goto _L2; else goto _L1\n_L1:\n parcel.writeInt(1);\n parcelableendpointidentity.writeToParcel(parcel, 0);\n_L3:\n if (messageenvelope == null)\n {\n break MISSING_BLOCK_LABEL_111;\n }\n parcel.writeInt(1);\n messageenvelope.writeToParcel(parcel, 0);\n_L4:\n parcel.writeInt(i);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n parcel1.recycle();\n parcel.recycle();\n return;\n_L2:\n parcel.writeInt(0);\n goto _L3\n parcelableendpointidentity;\n parcel1.recycle();\n parcel.recycle();\n throw parcelableendpointidentity;\n parcel.writeInt(0);\n goto _L4\n }\n\n public void routeMessageFragment(ParcelableEndpointIdentity parcelableendpointidentity, int i, MessageEnvelope messageenvelope, boolean flag, int j)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n boolean flag1;\n flag1 = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n if (parcelableendpointidentity == null) goto _L2; else goto _L1\n_L1:\n parcel.writeInt(1);\n parcelableendpointidentity.writeToParcel(parcel, 0);\n_L6:\n parcel.writeInt(i);\n if (messageenvelope == null) goto _L4; else goto _L3\n_L3:\n parcel.writeInt(1);\n messageenvelope.writeToParcel(parcel, 0);\n goto _L5\n_L7:\n parcel.writeInt(i);\n parcel.writeInt(j);\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n parcel1.recycle();\n parcel.recycle();\n return;\n_L2:\n parcel.writeInt(0);\n goto _L6\n parcelableendpointidentity;\n parcel1.recycle();\n parcel.recycle();\n throw parcelableendpointidentity;\n_L4:\n parcel.writeInt(0);\n goto _L5\n_L9:\n i = 0;\n goto _L7\n_L5:\n if (!flag) goto _L9; else goto _L8\n_L8:\n i = ((flag1) ? 1 : 0);\n goto _L7\n }\n\n public int setAckHandler(IAckHandler iackhandler)\n throws RemoteException\n {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"com.amazon.communication.ICommunicationService\");\n if (iackhandler == null)\n {\n break MISSING_BLOCK_LABEL_66;\n }\n iackhandler = iackhandler.asBinder();\n_L1:\n int i;\n parcel.writeStrongBinder(iackhandler);\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n iackhandler = null;\n goto _L1\n iackhandler;\n parcel1.recycle();\n parcel.recycle();\n throw iackhandler;\n }\n\n Stub.Proxy(IBinder ibinder)\n {\n mRemote = ibinder;\n }\n }\n\n\n public abstract IConnection acquireConnection(ParcelableEndpointIdentity parcelableendpointidentity, ParcelableConnectionPolicy parcelableconnectionpolicy, IConnectionListener iconnectionlistener, ParcelableStatus parcelablestatus)\n throws RemoteException;\n\n public abstract IConnection acquireConnectionEx(ParcelableEndpointIdentity parcelableendpointidentity, ParcelablePolicy parcelablepolicy, IConnectionListener iconnectionlistener, ParcelableStatus parcelablestatus)\n throws RemoteException;\n\n public abstract void deregisterMessageHandler(int i)\n throws RemoteException;\n\n public abstract IGatewayConnectivity getGatewayConnectivity(IConnectionListener iconnectionlistener, ParcelableStatus parcelablestatus)\n throws RemoteException;\n\n public abstract IIdentityResolver getIdentityResolver()\n throws RemoteException;\n\n public abstract boolean isInitialized()\n throws RemoteException;\n\n public abstract int registerMessageHandler(int i, IMessageHandler imessagehandler)\n throws RemoteException;\n\n public abstract void removeAckHandler()\n throws RemoteException;\n\n public abstract void routeMessage(ParcelableEndpointIdentity parcelableendpointidentity, MessageEnvelope messageenvelope, int i)\n throws RemoteException;\n\n public abstract void routeMessageFragment(ParcelableEndpointIdentity parcelableendpointidentity, int i, MessageEnvelope messageenvelope, boolean flag, int j)\n throws RemoteException;\n\n public abstract int setAckHandler(IAckHandler iackhandler)\n throws RemoteException;\n}", "public static MovieRPCFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MovieRPCFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MovieRPCFutureStub>() {\n @java.lang.Override\n public MovieRPCFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MovieRPCFutureStub(channel, callOptions);\n }\n };\n return MovieRPCFutureStub.newStub(factory, channel);\n }", "public interface HealthServiceClient extends ClientProxy {\n\n /**\n * Register a service with the health system\n *\n * @param name name of the service\n * @param ttl ttl on how long before the service timeout.\n * @param timeUnit time unit for the ttl.\n */\n default void register(String name, long ttl, TimeUnit timeUnit) {\n }\n\n\n /**\n * Check in the service so it passes it TTL\n *\n * @param name name of service.\n */\n default void checkInOk(String name) {\n }\n\n /**\n * Check in with a certain TTL.\n *\n * @param name name of service (PASS, WARN, FAIL, UNKNOWN)\n * @param status status\n */\n default void checkIn(String name, HealthStatus status) {\n }\n\n\n /**\n * Checks to see if all services registered with the health system are ok.\n *\n * @return ok\n */\n default Promise<Boolean> ok() {\n final Promise<Boolean> promise = Promises.promise();\n promise.resolve(true);\n return promise;\n }\n\n /**\n * Returns list of healthy nodes.\n *\n * @return promise\n */\n default Promise<List<String>> findHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }\n\n /**\n * Find all nodes\n *\n * @return promise\n */\n default Promise<List<String>> findAllNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }\n\n /**\n * Find all nodes with a certain status.\n *\n * @param queryStatus status you are looking for.\n * @return promise\n */\n default Promise<List<String>> findAllNodesWithStatus(HealthStatus queryStatus) {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n\n }\n\n /**\n * Find all healthy nodes\n *\n * @return promise\n */\n default Promise<List<String>> findNotHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n\n }\n\n\n /**\n * Load all nodes no matter the status.\n *\n * @return promise\n */\n default Promise<List<NodeHealthStat>> loadNodes() {\n final Promise<List<NodeHealthStat>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }\n\n /**\n * Unregister the service\n *\n * @param serviceName name of service\n */\n default void unregister(String serviceName) {\n }\n\n /**\n * Fail with a particular reason.\n *\n * @param name name\n * @param reason reason\n */\n default void failWithReason(final String name, final HealthFailReason reason) {\n }\n\n\n /**\n * Fail with error\n *\n * @param name name\n * @param error error\n */\n default void failWithError(final String name, final Throwable error) {\n }\n\n /**\n * warn with reason\n *\n * @param name name\n * @param reason reason\n */\n default void warnWithReason(final String name, final HealthFailReason reason) {\n }\n\n\n /**\n * warn with error\n *\n * @param name name\n * @param error error\n */\n default void warnWithError(final String name, final Throwable error) {\n }\n\n\n /**\n * Register a service but don't specify a check in TTL.\n *\n * @param name name\n */\n default void registerNoTtl(String name) {\n }\n\n}", "public static MovieRPCStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MovieRPCStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MovieRPCStub>() {\n @java.lang.Override\n public MovieRPCStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MovieRPCStub(channel, callOptions);\n }\n };\n return MovieRPCStub.newStub(factory, channel);\n }", "public static MetadataServiceFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MetadataServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MetadataServiceFutureStub>() {\n @java.lang.Override\n public MetadataServiceFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MetadataServiceFutureStub(channel, callOptions);\n }\n };\n return MetadataServiceFutureStub.newStub(factory, channel);\n }", "protected HttpJsonAzureClustersStub(\n AzureClustersStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.CancelOperation\",\n HttpRule.newBuilder()\n .setPost(\"/v1/{name=projects/*/locations/*/operations/*}:cancel\")\n .build())\n .put(\n \"google.longrunning.Operations.DeleteOperation\",\n HttpRule.newBuilder()\n .setDelete(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*}/operations\")\n .build())\n .build());\n\n HttpJsonCallSettings<CreateAzureClientRequest, Operation> createAzureClientTransportSettings =\n HttpJsonCallSettings.<CreateAzureClientRequest, Operation>newBuilder()\n .setMethodDescriptor(createAzureClientMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAzureClientRequest, AzureClient> getAzureClientTransportSettings =\n HttpJsonCallSettings.<GetAzureClientRequest, AzureClient>newBuilder()\n .setMethodDescriptor(getAzureClientMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListAzureClientsRequest, ListAzureClientsResponse>\n listAzureClientsTransportSettings =\n HttpJsonCallSettings.<ListAzureClientsRequest, ListAzureClientsResponse>newBuilder()\n .setMethodDescriptor(listAzureClientsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteAzureClientRequest, Operation> deleteAzureClientTransportSettings =\n HttpJsonCallSettings.<DeleteAzureClientRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteAzureClientMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateAzureClusterRequest, Operation> createAzureClusterTransportSettings =\n HttpJsonCallSettings.<CreateAzureClusterRequest, Operation>newBuilder()\n .setMethodDescriptor(createAzureClusterMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateAzureClusterRequest, Operation> updateAzureClusterTransportSettings =\n HttpJsonCallSettings.<UpdateAzureClusterRequest, Operation>newBuilder()\n .setMethodDescriptor(updateAzureClusterMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"azure_cluster.name\", String.valueOf(request.getAzureCluster().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAzureClusterRequest, AzureCluster> getAzureClusterTransportSettings =\n HttpJsonCallSettings.<GetAzureClusterRequest, AzureCluster>newBuilder()\n .setMethodDescriptor(getAzureClusterMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListAzureClustersRequest, ListAzureClustersResponse>\n listAzureClustersTransportSettings =\n HttpJsonCallSettings.<ListAzureClustersRequest, ListAzureClustersResponse>newBuilder()\n .setMethodDescriptor(listAzureClustersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteAzureClusterRequest, Operation> deleteAzureClusterTransportSettings =\n HttpJsonCallSettings.<DeleteAzureClusterRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteAzureClusterMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GenerateAzureAccessTokenRequest, GenerateAzureAccessTokenResponse>\n generateAzureAccessTokenTransportSettings =\n HttpJsonCallSettings\n .<GenerateAzureAccessTokenRequest, GenerateAzureAccessTokenResponse>newBuilder()\n .setMethodDescriptor(generateAzureAccessTokenMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"azure_cluster\", String.valueOf(request.getAzureCluster()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateAzureNodePoolRequest, Operation>\n createAzureNodePoolTransportSettings =\n HttpJsonCallSettings.<CreateAzureNodePoolRequest, Operation>newBuilder()\n .setMethodDescriptor(createAzureNodePoolMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateAzureNodePoolRequest, Operation>\n updateAzureNodePoolTransportSettings =\n HttpJsonCallSettings.<UpdateAzureNodePoolRequest, Operation>newBuilder()\n .setMethodDescriptor(updateAzureNodePoolMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"azure_node_pool.name\",\n String.valueOf(request.getAzureNodePool().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAzureNodePoolRequest, AzureNodePool> getAzureNodePoolTransportSettings =\n HttpJsonCallSettings.<GetAzureNodePoolRequest, AzureNodePool>newBuilder()\n .setMethodDescriptor(getAzureNodePoolMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListAzureNodePoolsRequest, ListAzureNodePoolsResponse>\n listAzureNodePoolsTransportSettings =\n HttpJsonCallSettings.<ListAzureNodePoolsRequest, ListAzureNodePoolsResponse>newBuilder()\n .setMethodDescriptor(listAzureNodePoolsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteAzureNodePoolRequest, Operation>\n deleteAzureNodePoolTransportSettings =\n HttpJsonCallSettings.<DeleteAzureNodePoolRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteAzureNodePoolMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAzureServerConfigRequest, AzureServerConfig>\n getAzureServerConfigTransportSettings =\n HttpJsonCallSettings.<GetAzureServerConfigRequest, AzureServerConfig>newBuilder()\n .setMethodDescriptor(getAzureServerConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n\n this.createAzureClientCallable =\n callableFactory.createUnaryCallable(\n createAzureClientTransportSettings,\n settings.createAzureClientSettings(),\n clientContext);\n this.createAzureClientOperationCallable =\n callableFactory.createOperationCallable(\n createAzureClientTransportSettings,\n settings.createAzureClientOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getAzureClientCallable =\n callableFactory.createUnaryCallable(\n getAzureClientTransportSettings, settings.getAzureClientSettings(), clientContext);\n this.listAzureClientsCallable =\n callableFactory.createUnaryCallable(\n listAzureClientsTransportSettings, settings.listAzureClientsSettings(), clientContext);\n this.listAzureClientsPagedCallable =\n callableFactory.createPagedCallable(\n listAzureClientsTransportSettings, settings.listAzureClientsSettings(), clientContext);\n this.deleteAzureClientCallable =\n callableFactory.createUnaryCallable(\n deleteAzureClientTransportSettings,\n settings.deleteAzureClientSettings(),\n clientContext);\n this.deleteAzureClientOperationCallable =\n callableFactory.createOperationCallable(\n deleteAzureClientTransportSettings,\n settings.deleteAzureClientOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.createAzureClusterCallable =\n callableFactory.createUnaryCallable(\n createAzureClusterTransportSettings,\n settings.createAzureClusterSettings(),\n clientContext);\n this.createAzureClusterOperationCallable =\n callableFactory.createOperationCallable(\n createAzureClusterTransportSettings,\n settings.createAzureClusterOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateAzureClusterCallable =\n callableFactory.createUnaryCallable(\n updateAzureClusterTransportSettings,\n settings.updateAzureClusterSettings(),\n clientContext);\n this.updateAzureClusterOperationCallable =\n callableFactory.createOperationCallable(\n updateAzureClusterTransportSettings,\n settings.updateAzureClusterOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getAzureClusterCallable =\n callableFactory.createUnaryCallable(\n getAzureClusterTransportSettings, settings.getAzureClusterSettings(), clientContext);\n this.listAzureClustersCallable =\n callableFactory.createUnaryCallable(\n listAzureClustersTransportSettings,\n settings.listAzureClustersSettings(),\n clientContext);\n this.listAzureClustersPagedCallable =\n callableFactory.createPagedCallable(\n listAzureClustersTransportSettings,\n settings.listAzureClustersSettings(),\n clientContext);\n this.deleteAzureClusterCallable =\n callableFactory.createUnaryCallable(\n deleteAzureClusterTransportSettings,\n settings.deleteAzureClusterSettings(),\n clientContext);\n this.deleteAzureClusterOperationCallable =\n callableFactory.createOperationCallable(\n deleteAzureClusterTransportSettings,\n settings.deleteAzureClusterOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.generateAzureAccessTokenCallable =\n callableFactory.createUnaryCallable(\n generateAzureAccessTokenTransportSettings,\n settings.generateAzureAccessTokenSettings(),\n clientContext);\n this.createAzureNodePoolCallable =\n callableFactory.createUnaryCallable(\n createAzureNodePoolTransportSettings,\n settings.createAzureNodePoolSettings(),\n clientContext);\n this.createAzureNodePoolOperationCallable =\n callableFactory.createOperationCallable(\n createAzureNodePoolTransportSettings,\n settings.createAzureNodePoolOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateAzureNodePoolCallable =\n callableFactory.createUnaryCallable(\n updateAzureNodePoolTransportSettings,\n settings.updateAzureNodePoolSettings(),\n clientContext);\n this.updateAzureNodePoolOperationCallable =\n callableFactory.createOperationCallable(\n updateAzureNodePoolTransportSettings,\n settings.updateAzureNodePoolOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getAzureNodePoolCallable =\n callableFactory.createUnaryCallable(\n getAzureNodePoolTransportSettings, settings.getAzureNodePoolSettings(), clientContext);\n this.listAzureNodePoolsCallable =\n callableFactory.createUnaryCallable(\n listAzureNodePoolsTransportSettings,\n settings.listAzureNodePoolsSettings(),\n clientContext);\n this.listAzureNodePoolsPagedCallable =\n callableFactory.createPagedCallable(\n listAzureNodePoolsTransportSettings,\n settings.listAzureNodePoolsSettings(),\n clientContext);\n this.deleteAzureNodePoolCallable =\n callableFactory.createUnaryCallable(\n deleteAzureNodePoolTransportSettings,\n settings.deleteAzureNodePoolSettings(),\n clientContext);\n this.deleteAzureNodePoolOperationCallable =\n callableFactory.createOperationCallable(\n deleteAzureNodePoolTransportSettings,\n settings.deleteAzureNodePoolOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getAzureServerConfigCallable =\n callableFactory.createUnaryCallable(\n getAzureServerConfigTransportSettings,\n settings.getAzureServerConfigSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public static ApplicationManagerFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new ApplicationManagerFutureStub(channel);\n }", "public interface InviteService extends Service, ActorService {\r\n\r\n @AsyncInvocation\r\n void save();\r\n @AsyncInvocation\r\n void insert(DbRow dbRow);\r\n @AsyncInvocation\r\n void update(DbRow dbRow);\r\n @AsyncInvocation\r\n void bindInviteCode(RoleInvitePo roleInvitePoFrom, RoleBeInvitePo roleBeInvitePo);\r\n\r\n}", "public interface IOngoingStubbing {}", "protected HttpJsonFunctionServiceStub(\n FunctionServiceStubSettings settings, ClientContext clientContext) throws IOException {\n this(settings, clientContext, new HttpJsonFunctionServiceCallableFactory());\n }", "public Object getStubHandler() {\n return new RMIStubHandler(); \n }", "public interface DBServiceAsync {\r\n\tvoid greetServer(String input, AsyncCallback<String> callback);\r\n\r\n\tvoid startDB(AsyncCallback<String> callback);\r\n\r\n\tvoid stopDB(AsyncCallback<String> callback);\r\n\r\n\tvoid createDB(AsyncCallback<String> callback);\r\n}", "IMember getServerStub();", "public interface Future<T> extends AsyncResult<T> {\n\n final class Factory {\n\n public static <T> Future<T> failedFuture(String failureMessage) {\n return new FutureImpl<>(failureMessage, false);\n }\n\n public static <T> Future<T> failedFuture(Throwable t) {\n return new FutureImpl<>(t);\n }\n\n public static <T> Future<T> future() {\n return new FutureImpl<>();\n }\n\n public static <T> Future<T> succeededFuture() {\n return new FutureImpl<>((Throwable) null);\n }\n\n public static <T> Future<T> succeededFuture(T result) {\n return new FutureImpl<>(result);\n }\n }\n\n void complete();\n\n void complete(T result);\n\n void fail(String failureMessage);\n\n void fail(Throwable throwable);\n\n boolean isComplete();\n\n void setHandler(Handler<AsyncResult<T>> handler);\n}", "@VertxGen\n@ProxyGen\npublic interface IOrderHandler {\n\n String ORDER_SERVICE_ADDRESS = \"order_service_address\";\n\n @Fluent\n IOrderHandler insertOrder(long orderId, long userId, String price, String freight, long shippingInformationId, String leaveMessage, JsonArray orderDetails, Handler<AsyncResult<Integer>> handler);\n\n @Fluent\n IOrderHandler findPageOrder(long userId, Integer status, int size, int offset, Handler<AsyncResult<List<JsonObject>>> handler);\n\n @Fluent\n IOrderHandler findOrderRowNum(long userId, Integer status, Handler<AsyncResult<JsonObject>> handler);\n\n @Fluent\n IOrderHandler preparedInsertOrder(JsonArray params, Handler<AsyncResult<String>> handler);\n\n @Fluent\n IOrderHandler findPreparedOrder(String id, Handler<AsyncResult<JsonObject>> handler);\n\n @Fluent\n IOrderHandler getOrderById(long orderId, long userId, Handler<AsyncResult<JsonObject>> handler);\n\n @Fluent\n IOrderHandler payOrder(long orderId, int versions, Handler<AsyncResult<Integer>> handler);\n\n @Fluent\n IOrderHandler refund(long orderId, long userId, int refundType, String refundReason, String refundMoney, String refundDescription, Handler<AsyncResult<UpdateResult>> handler);\n\n @Fluent\n IOrderHandler undoRefund(long orderId, long userId, Handler<AsyncResult<UpdateResult>> handler);\n}", "public static AvroreposFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AvroreposFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AvroreposFutureStub>() {\n @java.lang.Override\n public AvroreposFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AvroreposFutureStub(channel, callOptions);\n }\n };\n return AvroreposFutureStub.newStub(factory, channel);\n }", "public static ShippingServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ShippingServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ShippingServiceFutureStub>() {\n @java.lang.Override\n public ShippingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ShippingServiceFutureStub(channel, callOptions);\n }\n };\n return ShippingServiceFutureStub.newStub(factory, channel);\n }", "public static ImageServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ImageServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ImageServiceStub>() {\n @java.lang.Override\n public ImageServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ImageServiceStub(channel, callOptions);\n }\n };\n return ImageServiceStub.newStub(factory, channel);\n }", "public static LightningFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new LightningFutureStub(channel);\n }", "public interface PendingContactUpdateExtMethods\r\n extends PendingContactUpdateExtMethodsStubI\r\n{\r\n\r\n\r\n}", "public interface ConnectionServiceAsync {\n void searchSynonyms(String input, AsyncCallback<List<String>> callback) throws IllegalArgumentException;;\n void callMaplabelsToSynonyms(AsyncCallback<Boolean> callback) throws IllegalArgumentException;;\n\n\n}", "<T extends Response> Future<T> sendAsync(Request request, Class<T> responseType);", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public GenericServiceConnection(final Class<AIDLInterface> aidl)\n\t{\n\n\t\t//System.out.println(\"---- GenericServiceConnection -----\");\n\n\t\tClass<?> stub = null;\n\t\tMethod method = null;\n\t\tfor (final Class<?> c : aidl.getDeclaredClasses())\n\t\t{\n\t\t\tif (c.getSimpleName().equals(STUB))\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\n\t\t\t\t\t//System.out.println(\"---- GenericServiceConnection -----\"\n\t\t\t\t\t\t//\t+ c.getSimpleName());\n\n\t\t\t\t\tstub = c;\n\t\t\t\t\tmethod = stub.getMethod(AS_INTERFACE, AI_PARAMS);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (final NoSuchMethodException e)\n\t\t\t\t{ // Should not be possible\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmStub = stub;\n\t\tmAsInterface = method;\n\t}", "@Headers(keys = \"x-ms-version\", values = \"2012-03-01\")\npublic interface OSImageAsyncApi {\n\n /**\n * @see OSImageApi#list()\n */\n @Named(\"ListOsImages\")\n @GET\n @Path(\"/services/images\")\n @XMLResponseParser(ListOSImagesHandler.class)\n @Fallback(EmptySetOnNotFoundOr404.class)\n @Consumes(MediaType.APPLICATION_XML)\n ListenableFuture<Set<OSImage>> list();\n\n /**\n * @see OSImageApi#add(String)\n */\n @Named(\"AddOsImage\")\n @POST\n @Path(\"/services/images\")\n @Produces(MediaType.APPLICATION_XML)\n ListenableFuture<Void> add(@BinderParam(BindOSImageParamsToXmlPayload.class) OSImageParams params);\n\n /**\n * @see OSImageApi#update(String)\n */\n @Named(\"UpdateOsImage\")\n @PUT\n @Path(\"/services/images/{imageName}\")\n @Produces(MediaType.APPLICATION_XML)\n ListenableFuture<Void> update(\n @PathParam(\"imageName\") @ParamParser(OSImageParamsName.class) @BinderParam(BindOSImageParamsToXmlPayload.class) OSImageParams params);\n\n /**\n * @see OSImageApi#delete(String)\n */\n @Named(\"DeleteOsImage\")\n @DELETE\n @Path(\"/services/images/{imageName}\")\n @Fallback(VoidOnNotFoundOr404.class)\n ListenableFuture<Void> delete(@PathParam(\"imageName\") String imageName);\n\n}", "public static SubscriptionServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SubscriptionServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SubscriptionServiceFutureStub>() {\n @java.lang.Override\n public SubscriptionServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SubscriptionServiceFutureStub(channel, callOptions);\n }\n };\n return SubscriptionServiceFutureStub.newStub(factory, channel);\n }", "public static ProductServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ProductServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ProductServiceStub>() {\n @java.lang.Override\n public ProductServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ProductServiceStub(channel, callOptions);\n }\n };\n return ProductServiceStub.newStub(factory, channel);\n }", "public RpcClient(ManagedChannelBuilder<?> channelBuilder) {\n channel = channelBuilder.build();\n blockingStub = PredictionServiceGrpc.newBlockingStub(channel);\n asyncStub = PredictionServiceGrpc.newStub(channel);\n modelServiceBlockingStub = ModelServiceGrpc.newBlockingStub(channel);\n modelServiceStub = ModelServiceGrpc.newStub(channel);\n channelzBlockingStub = ChannelzGrpc.newBlockingStub(channel);\n }", "void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);", "public interface IBugReportRpcAsync {\r\n\r\n /**\r\n * Submit a bug report.\r\n * @param bugReport Bug report to submit\r\n * @param callback Callback to be invoked after method call completes\r\n */\r\n void submitBugReport(BugReport bugReport, AsyncCallback<Void> callback);\r\n\r\n}", "default void createAzureClient(\n com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClientMethod(), responseObserver);\n }", "void stubNextResponse(HttpExecuteResponse nextResponse);", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "protected HttpJsonTasksStub(TasksStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new HttpJsonTasksCallableFactory());\n }", "public Stub() {\n attachInterface(this, DESCRIPTOR);\n }", "public static GreetingServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new GreetingServiceFutureStub(channel);\n }", "public interface HubProxy {\n\n /**\n * Invokes a server side hub method asynchronously.\n * \n * @param methodName The method name.\n * @param returnType The return type.\n * @param arguments The arguments.\n * @return The invocation result.\n */\n <R> Promise<R> invoke(String methodName, Class<R> returnType, Object... arguments);\n\n /**\n * Registers a client side hub callback.\n * \n * @param methodName The method name.\n * @param callback The hub callback.\n */\n void register(String methodName, HubCallback<JsonElement> callback);\n\n /**\n * Registers a client side hub callback.\n * \n * @param methodName The method name.\n * @param argumentType The argument type.\n * @param callback The hub callback.\n */\n <T> void register(String methodName, Class<T> argumentType, HubCallback<T> callback);\n\n /**\n * Unregisters a client side hub callback.\n * \n * @param methodName The method name.\n */\n void unregister(String methodName);\n}", "public static AssetGroupSignalServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceFutureStub>() {\n @java.lang.Override\n public AssetGroupSignalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AssetGroupSignalServiceFutureStub(channel, callOptions);\n }\n };\n return AssetGroupSignalServiceFutureStub.newStub(factory, channel);\n }", "public static OrganizationServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<OrganizationServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<OrganizationServiceFutureStub>() {\n @java.lang.Override\n public OrganizationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new OrganizationServiceFutureStub(channel, callOptions);\n }\n };\n return OrganizationServiceFutureStub.newStub(factory, channel);\n }", "@Async @Endpoint(\"http://0.0.0.0:8080\")\npublic interface AsyncEndpoint {\n\t\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler}.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @return {@code null}, since the request is processed asynchronously\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncsuccess\")\n\tString asyncSuccess(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler} which returns response \n\t * code that signifies a failure. This should invoke {@link AsyncHandler#onFailure(HttpResponse)} on the \n\t * provided callback.</p> \n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncfailure\")\n\tvoid asyncFailure(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler} whose execution is \n\t * expected to fail with an exception and hence handled by the callback {@link AsyncHandler#onError(Exception)}.</p>\n\t * \n\t * <p>The error is caused by the deserializer which attempts to parse the response content, which is \n\t * not JSON, into the {@link User} model.</p> \n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @since 1.3.4\n\t */\n\t@Deserialize(JSON)\n\t@GET(\"/asyncerror\")\n\tvoid asyncError(AsyncHandler<User> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} but does not expect the response to be \n\t * handled using an {@link AsyncHandler}.</p>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncnohandling\")\n\tvoid asyncNoHandling();\n\t\n\t/**\n\t * <p>Processes a successful execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onSuccess(HttpResponse, Object)} throws an exception.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onSuccess</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/successcallbackerror\")\n\tvoid asyncSuccessCallbackError(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Processes a failed execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onFailure(HttpResponse)} throws an exception.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onFailure</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/failurecallbackerror\")\n\tvoid asyncFailureCallbackError(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Processes an erroneous execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onError(Exception)} throws an exception itself.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onError</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@Deserialize(JSON)\n\t@GET(\"/errorcallbackerror\")\n\tvoid asyncErrorCallbackError(AsyncHandler<User> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request <b>synchronously</b> by detaching the inherited @{@link Async} annotation.</p> \n\t * \n\t * @return the response string which indicated a synchronous request\n\t * \n\t * @since 1.3.0\n\t */\n\t@Detach(Async.class) \n\t@GET(\"/asyncdetached\")\n\tString asyncDetached();\n}", "public static S3InternalServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceStub>() {\n @java.lang.Override\n public S3InternalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceStub(channel, callOptions);\n }\n };\n return S3InternalServiceStub.newStub(factory, channel);\n }" ]
[ "0.6892434", "0.6467239", "0.6211053", "0.60550624", "0.58448124", "0.5826248", "0.58191776", "0.5696866", "0.5648306", "0.55342954", "0.55286705", "0.5512426", "0.5510817", "0.5508667", "0.54999334", "0.54982334", "0.546741", "0.5460062", "0.5459664", "0.5436188", "0.54325175", "0.5430662", "0.5414752", "0.54106337", "0.5402307", "0.53977644", "0.53952056", "0.5394361", "0.5384344", "0.5378525", "0.53784996", "0.53668857", "0.5365112", "0.5358567", "0.53515", "0.5341371", "0.53329724", "0.53245246", "0.5319282", "0.53167367", "0.53059435", "0.53051347", "0.5300577", "0.5298286", "0.52924985", "0.5290797", "0.52806884", "0.5279439", "0.5270424", "0.5258987", "0.52544516", "0.52492434", "0.5241549", "0.5239092", "0.52385944", "0.523672", "0.521222", "0.5211992", "0.5197618", "0.5195408", "0.51884866", "0.5183115", "0.51818454", "0.5179374", "0.51740146", "0.5170586", "0.5168091", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.5159182", "0.51572084", "0.51488954", "0.51481146", "0.51443535", "0.5142627", "0.5135692", "0.5132226", "0.5123487", "0.51221776", "0.5121168", "0.5121168", "0.5121168", "0.5121168", "0.5121168", "0.51201606", "0.51159906", "0.5110202", "0.5097174", "0.5085313", "0.5081177", "0.50809103", "0.50777197" ]
0.0
-1
Creates a new blockingstyle stub that supports unary and streaming output calls on the service
public static RegistrationServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<RegistrationServiceBlockingStub> factory = new io.grpc.stub.AbstractStub.StubFactory<RegistrationServiceBlockingStub>() { @java.lang.Override public RegistrationServiceBlockingStub newStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RegistrationServiceBlockingStub(channel, callOptions); } }; return RegistrationServiceBlockingStub.newStub(factory, channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n private final int requestId;\n\n private final SettableFuture<com.baichen.jraft.transport.RpcResult> future;\n\n private RepeatableTimer.TimerTask timeout;\n\n private long startTime;\n\n public PendingRequest(T request, int requestId, SettableFuture<com.baichen.jraft.transport.RpcResult> future) {\n this.request = request;\n this.requestId = requestId;\n this.future = future;\n }\n\n public long getStartTime() {\n return startTime;\n }\n\n public void setStartTime(long startTime) {\n this.startTime = startTime;\n }\n\n public void setTimeout(RepeatableTimer.TimerTask timeout) {\n this.timeout = timeout;\n }\n\n public RepeatableTimer.TimerTask getTimeout() {\n return timeout;\n }\n\n public T getRequest() {\n return request;\n }\n\n public int getRequestId() {\n return requestId;\n }\n\n public SettableFuture<com.baichen.jraft.transport.RpcResult> getFuture() {\n return future;\n }\n }\n}", "public interface IOngoingStubbing {}", "public static S3InternalServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceBlockingStub>() {\n @java.lang.Override\n public S3InternalServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceBlockingStub(channel, callOptions);\n }\n };\n return S3InternalServiceBlockingStub.newStub(factory, channel);\n }", "public static SinkServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SinkServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SinkServiceBlockingStub>() {\n @java.lang.Override\n public SinkServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SinkServiceBlockingStub(channel, callOptions);\n }\n };\n return SinkServiceBlockingStub.newStub(factory, channel);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "@ThriftService(\"ThriftTaskService\")\npublic interface ThriftTaskClient\n{\n @ThriftMethod\n ListenableFuture<ThriftBufferResult> getResults(TaskId taskId, OutputBufferId bufferId, long token, long maxSizeInBytes);\n\n @ThriftMethod\n ListenableFuture<Void> acknowledgeResults(TaskId taskId, OutputBufferId bufferId, long token);\n\n @ThriftMethod\n ListenableFuture<Void> abortResults(TaskId taskId, OutputBufferId bufferId);\n}", "public static RaftServerProtocolServiceBlockingStub newBlockingStub(\n org.apache.ratis.shaded.io.grpc.Channel channel) {\n return new RaftServerProtocolServiceBlockingStub(channel);\n }", "IMember getServerStub();", "public interface IMountService extends IInterface {\n /** Local-side IPC implementation stub class. */\n public static abstract class Stub extends Binder implements IMountService {\n private static class Proxy implements IMountService {\n private final IBinder mRemote;\n\n Proxy(IBinder remote) {\n mRemote = remote;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public String getInterfaceDescriptor() {\n return DESCRIPTOR;\n }\n\n /**\n * Registers an IMountServiceListener for receiving async\n * notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_registerListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_unregisterListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageConnected, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Enables / disables USB mass storage. The caller should check\n * actual status of enabling/disabling USB mass storage via\n * StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt((enable ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_setUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is enabled (media is\n * shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Mount external storage at given mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_mountVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Safely unmount external storage at given mount point. The unmount\n * is an asynchronous operation. Applications should register\n * StorageEventListener for storage related status changes.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n _data.writeInt((force ? 1 : 0));\n _data.writeInt((removeEncryption ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Format external storage given a mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_formatVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_getStorageUsers, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createIntArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_getVolumeState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns\n * an int consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(fstype);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(external ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Destroy a secure container, and free up all resources associated\n * with it. NOTE: Ensure all references are released prior to\n * deleting. Returns an int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_destroySecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Finalize a container which has just been created and populated.\n * After finalization, the container is immutable. Returns an int\n * consistent with MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_finalizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Mount a secure container with the specified key and owner UID.\n * Returns an int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(readOnly ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_mountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_isSecureContainerMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Rename an unmounted secure container. Returns an int consistent\n * with MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(oldId);\n _data.writeString(newId);\n mRemote.transact(Stub.TRANSACTION_renameSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Shuts down the MountService and gracefully unmounts all external\n * media. Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((observer != null ? observer.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_shutdown, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_finishMediaUpdate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption\n * key and only allows the calling process's UID access to the\n * contents. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeString(canonicalPath);\n _data.writeString(key);\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_mountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is\n * specified, any program using it will be forcibly killed to\n * unmount the image. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void unmountObb(\n String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeInt((force ? 1 : 0));\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_unmountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_isObbMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_getMountedObbPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns whether the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isExternalStorageEmulated, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getEncryptionState() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getEncryptionState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int decryptStorage(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_decryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int encryptStorage(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_encryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int changeEncryptionPassword(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_changeEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int verifyEncryptionPassword(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getPasswordType() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPasswordType, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public String getPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public void clearPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_clearPassword, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public void setField(String field, String data) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n _data.writeString(data);\n mRemote.transact(Stub.TRANSACTION_setField, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public String getField(String field) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n mRemote.transact(Stub.TRANSACTION_getField, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public boolean isConvertibleToFBE() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt() != 0;\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n StorageVolume[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(uid);\n _data.writeString(packageName);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(StorageVolume.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerFilesystemPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerFilesystemPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Fix permissions in a container which has just been created and\n * populated. Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(gid);\n _data.writeString(filename);\n mRemote.transact(Stub.TRANSACTION_fixPermissionsSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int mkdirs(String callingPkg, String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(callingPkg);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_mkdirs, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int resizeSecureContainer(String id, int sizeMb, String key)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(key);\n mRemote.transact(Stub.TRANSACTION_resizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public long lastMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n long _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_lastMaintenance, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void runMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_runMaintenance, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public void waitForAsecScan() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_waitForAsecScan, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public DiskInfo[] getDisks() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n DiskInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getDisks, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(DiskInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeInfo[] getVolumes(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumes, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeRecord[] getVolumeRecords(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeRecord[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeRecords, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeRecord.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void mount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_mount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unmount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_unmount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void format(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_format, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public long benchmark(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_benchmark, _data, _reply, 0);\n _reply.readException();\n return _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPublic(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPublic, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPrivate(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPrivate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionMixed(String diskId, int ratio) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n _data.writeInt(ratio);\n mRemote.transact(Stub.TRANSACTION_partitionMixed, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeString(nickname);\n mRemote.transact(Stub.TRANSACTION_setVolumeNickname, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeInt(flags);\n _data.writeInt(mask);\n mRemote.transact(Stub.TRANSACTION_setVolumeUserFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetVolume(String fsUuid) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n mRemote.transact(Stub.TRANSACTION_forgetVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetAllVolumes() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_forgetAllVolumes, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setDebugFlags(int _flags, int _mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n _data.writeInt(_mask);\n mRemote.transact(Stub.TRANSACTION_setDebugFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public String getPrimaryStorageUuid() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeStrongBinder((callback != null ? callback.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_setPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(ephemeral ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_destroyUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_addUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_fixateNewestUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_unlockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void lockUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_lockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public boolean isUserKeyUnlocked(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_isUserKeyUnlocked, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void prepareUserStorage(\n String volumeUuid, int userId, int serialNumber, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_prepareUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserStorage(String volumeUuid, int userId, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_destroyUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n ParcelFileDescriptor _result = null;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(name);\n mRemote.transact(Stub.TRANSACTION_mountAppFuse, _data, _reply, 0);\n _reply.readException();\n _result = _reply.<ParcelFileDescriptor>readParcelable(\n ClassLoader.getSystemClassLoader());\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n }\n\n private static final String DESCRIPTOR = \"IMountService\";\n\n static final int TRANSACTION_registerListener = IBinder.FIRST_CALL_TRANSACTION + 0;\n\n static final int TRANSACTION_unregisterListener = IBinder.FIRST_CALL_TRANSACTION + 1;\n\n static final int TRANSACTION_isUsbMassStorageConnected = IBinder.FIRST_CALL_TRANSACTION + 2;\n\n static final int TRANSACTION_setUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 3;\n\n static final int TRANSACTION_isUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 4;\n\n static final int TRANSACTION_mountVolume = IBinder.FIRST_CALL_TRANSACTION + 5;\n\n static final int TRANSACTION_unmountVolume = IBinder.FIRST_CALL_TRANSACTION + 6;\n\n static final int TRANSACTION_formatVolume = IBinder.FIRST_CALL_TRANSACTION + 7;\n\n static final int TRANSACTION_getStorageUsers = IBinder.FIRST_CALL_TRANSACTION + 8;\n\n static final int TRANSACTION_getVolumeState = IBinder.FIRST_CALL_TRANSACTION + 9;\n\n static final int TRANSACTION_createSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 10;\n\n static final int TRANSACTION_finalizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 11;\n\n static final int TRANSACTION_destroySecureContainer = IBinder.FIRST_CALL_TRANSACTION + 12;\n\n static final int TRANSACTION_mountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 13;\n\n static final int TRANSACTION_unmountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 14;\n\n static final int TRANSACTION_isSecureContainerMounted = IBinder.FIRST_CALL_TRANSACTION + 15;\n\n static final int TRANSACTION_renameSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 16;\n\n static final int TRANSACTION_getSecureContainerPath = IBinder.FIRST_CALL_TRANSACTION + 17;\n\n static final int TRANSACTION_getSecureContainerList = IBinder.FIRST_CALL_TRANSACTION + 18;\n\n static final int TRANSACTION_shutdown = IBinder.FIRST_CALL_TRANSACTION + 19;\n\n static final int TRANSACTION_finishMediaUpdate = IBinder.FIRST_CALL_TRANSACTION + 20;\n\n static final int TRANSACTION_mountObb = IBinder.FIRST_CALL_TRANSACTION + 21;\n\n static final int TRANSACTION_unmountObb = IBinder.FIRST_CALL_TRANSACTION + 22;\n\n static final int TRANSACTION_isObbMounted = IBinder.FIRST_CALL_TRANSACTION + 23;\n\n static final int TRANSACTION_getMountedObbPath = IBinder.FIRST_CALL_TRANSACTION + 24;\n\n static final int TRANSACTION_isExternalStorageEmulated = IBinder.FIRST_CALL_TRANSACTION + 25;\n\n static final int TRANSACTION_decryptStorage = IBinder.FIRST_CALL_TRANSACTION + 26;\n\n static final int TRANSACTION_encryptStorage = IBinder.FIRST_CALL_TRANSACTION + 27;\n\n static final int TRANSACTION_changeEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 28;\n\n static final int TRANSACTION_getVolumeList = IBinder.FIRST_CALL_TRANSACTION + 29;\n\n static final int TRANSACTION_getSecureContainerFilesystemPath = IBinder.FIRST_CALL_TRANSACTION + 30;\n\n static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31;\n\n static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32;\n\n static final int TRANSACTION_fixPermissionsSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 33;\n\n static final int TRANSACTION_mkdirs = IBinder.FIRST_CALL_TRANSACTION + 34;\n\n static final int TRANSACTION_getPasswordType = IBinder.FIRST_CALL_TRANSACTION + 35;\n\n static final int TRANSACTION_getPassword = IBinder.FIRST_CALL_TRANSACTION + 36;\n\n static final int TRANSACTION_clearPassword = IBinder.FIRST_CALL_TRANSACTION + 37;\n\n static final int TRANSACTION_setField = IBinder.FIRST_CALL_TRANSACTION + 38;\n\n static final int TRANSACTION_getField = IBinder.FIRST_CALL_TRANSACTION + 39;\n\n static final int TRANSACTION_resizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 40;\n\n static final int TRANSACTION_lastMaintenance = IBinder.FIRST_CALL_TRANSACTION + 41;\n\n static final int TRANSACTION_runMaintenance = IBinder.FIRST_CALL_TRANSACTION + 42;\n\n static final int TRANSACTION_waitForAsecScan = IBinder.FIRST_CALL_TRANSACTION + 43;\n\n static final int TRANSACTION_getDisks = IBinder.FIRST_CALL_TRANSACTION + 44;\n static final int TRANSACTION_getVolumes = IBinder.FIRST_CALL_TRANSACTION + 45;\n static final int TRANSACTION_getVolumeRecords = IBinder.FIRST_CALL_TRANSACTION + 46;\n\n static final int TRANSACTION_mount = IBinder.FIRST_CALL_TRANSACTION + 47;\n static final int TRANSACTION_unmount = IBinder.FIRST_CALL_TRANSACTION + 48;\n static final int TRANSACTION_format = IBinder.FIRST_CALL_TRANSACTION + 49;\n\n static final int TRANSACTION_partitionPublic = IBinder.FIRST_CALL_TRANSACTION + 50;\n static final int TRANSACTION_partitionPrivate = IBinder.FIRST_CALL_TRANSACTION + 51;\n static final int TRANSACTION_partitionMixed = IBinder.FIRST_CALL_TRANSACTION + 52;\n\n static final int TRANSACTION_setVolumeNickname = IBinder.FIRST_CALL_TRANSACTION + 53;\n static final int TRANSACTION_setVolumeUserFlags = IBinder.FIRST_CALL_TRANSACTION + 54;\n static final int TRANSACTION_forgetVolume = IBinder.FIRST_CALL_TRANSACTION + 55;\n static final int TRANSACTION_forgetAllVolumes = IBinder.FIRST_CALL_TRANSACTION + 56;\n\n static final int TRANSACTION_getPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 57;\n static final int TRANSACTION_setPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 58;\n\n static final int TRANSACTION_benchmark = IBinder.FIRST_CALL_TRANSACTION + 59;\n static final int TRANSACTION_setDebugFlags = IBinder.FIRST_CALL_TRANSACTION + 60;\n\n static final int TRANSACTION_createUserKey = IBinder.FIRST_CALL_TRANSACTION + 61;\n static final int TRANSACTION_destroyUserKey = IBinder.FIRST_CALL_TRANSACTION + 62;\n\n static final int TRANSACTION_unlockUserKey = IBinder.FIRST_CALL_TRANSACTION + 63;\n static final int TRANSACTION_lockUserKey = IBinder.FIRST_CALL_TRANSACTION + 64;\n static final int TRANSACTION_isUserKeyUnlocked = IBinder.FIRST_CALL_TRANSACTION + 65;\n\n static final int TRANSACTION_prepareUserStorage = IBinder.FIRST_CALL_TRANSACTION + 66;\n static final int TRANSACTION_destroyUserStorage = IBinder.FIRST_CALL_TRANSACTION + 67;\n\n static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 68;\n\n static final int TRANSACTION_mountAppFuse = IBinder.FIRST_CALL_TRANSACTION + 69;\n\n static final int TRANSACTION_addUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 70;\n\n static final int TRANSACTION_fixateNewestUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 71;\n\n /**\n * Cast an IBinder object into an IMountService interface, generating a\n * proxy if needed.\n */\n public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }\n\n /** Construct the stub at attach it to the interface. */\n public Stub() {\n attachInterface(this, DESCRIPTOR);\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n @Override\n public boolean onTransact(int code, Parcel data, Parcel reply,\n int flags) throws RemoteException {\n switch (code) {\n case INTERFACE_TRANSACTION: {\n reply.writeString(DESCRIPTOR);\n return true;\n }\n case TRANSACTION_registerListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n registerListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unregisterListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n unregisterListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageConnected: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageConnected();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_setUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean enable;\n enable = 0 != data.readInt();\n setUsbMassStorageEnabled(enable);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageEnabled();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_mountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int resultCode = mountVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n boolean force = 0 != data.readInt();\n boolean removeEncrypt = 0 != data.readInt();\n unmountVolume(mountPoint, force, removeEncrypt);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_formatVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int result = formatVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getStorageUsers: {\n data.enforceInterface(DESCRIPTOR);\n String path;\n path = data.readString();\n int[] pids = getStorageUsers(path);\n reply.writeNoException();\n reply.writeIntArray(pids);\n return true;\n }\n case TRANSACTION_getVolumeState: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n String state = getVolumeState(mountPoint);\n reply.writeNoException();\n reply.writeString(state);\n return true;\n }\n case TRANSACTION_createSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String fstype;\n fstype = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean external;\n external = 0 != data.readInt();\n int resultCode = createSecureContainer(id, sizeMb, fstype, key, ownerUid,\n external);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_finalizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int resultCode = finalizeSecureContainer(id);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_destroySecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = destroySecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean readOnly;\n readOnly = data.readInt() != 0;\n int resultCode = mountSecureContainer(id, key, ownerUid, readOnly);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = unmountSecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_isSecureContainerMounted: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean status = isSecureContainerMounted(id);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_renameSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String oldId;\n oldId = data.readString();\n String newId;\n newId = data.readString();\n int resultCode = renameSecureContainer(oldId, newId);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_getSecureContainerPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getSecureContainerList: {\n data.enforceInterface(DESCRIPTOR);\n String[] ids = getSecureContainerList();\n reply.writeNoException();\n reply.writeStringArray(ids);\n return true;\n }\n case TRANSACTION_shutdown: {\n data.enforceInterface(DESCRIPTOR);\n IMountShutdownObserver observer;\n observer = IMountShutdownObserver.Stub.asInterface(data\n .readStrongBinder());\n shutdown(observer);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_finishMediaUpdate: {\n data.enforceInterface(DESCRIPTOR);\n finishMediaUpdate();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountObb: {\n data.enforceInterface(DESCRIPTOR);\n final String rawPath = data.readString();\n final String canonicalPath = data.readString();\n final String key = data.readString();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n mountObb(rawPath, canonicalPath, key, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmountObb: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean force;\n force = 0 != data.readInt();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n unmountObb(filename, force, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isObbMounted: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean status = isObbMounted(filename);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_getMountedObbPath: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n String mountedPath = getMountedObbPath(filename);\n reply.writeNoException();\n reply.writeString(mountedPath);\n return true;\n }\n case TRANSACTION_isExternalStorageEmulated: {\n data.enforceInterface(DESCRIPTOR);\n boolean emulated = isExternalStorageEmulated();\n reply.writeNoException();\n reply.writeInt(emulated ? 1 : 0);\n return true;\n }\n case TRANSACTION_decryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n String password = data.readString();\n int result = decryptStorage(password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_encryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = encryptStorage(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_changeEncryptionPassword: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = changeEncryptionPassword(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getVolumeList: {\n data.enforceInterface(DESCRIPTOR);\n int uid = data.readInt();\n String packageName = data.readString();\n int _flags = data.readInt();\n StorageVolume[] result = getVolumeList(uid, packageName, _flags);\n reply.writeNoException();\n reply.writeTypedArray(result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getSecureContainerFilesystemPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerFilesystemPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getEncryptionState: {\n data.enforceInterface(DESCRIPTOR);\n int result = getEncryptionState();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_fixPermissionsSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int gid;\n gid = data.readInt();\n String filename;\n filename = data.readString();\n int resultCode = fixPermissionsSecureContainer(id, gid, filename);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mkdirs: {\n data.enforceInterface(DESCRIPTOR);\n String callingPkg = data.readString();\n String path = data.readString();\n int result = mkdirs(callingPkg, path);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPasswordType: {\n data.enforceInterface(DESCRIPTOR);\n int result = getPasswordType();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPassword: {\n data.enforceInterface(DESCRIPTOR);\n String result = getPassword();\n reply.writeNoException();\n reply.writeString(result);\n return true;\n }\n case TRANSACTION_clearPassword: {\n data.enforceInterface(DESCRIPTOR);\n clearPassword();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = data.readString();\n setField(field, contents);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = getField(field);\n reply.writeNoException();\n reply.writeString(contents);\n return true;\n }\n case TRANSACTION_isConvertibleToFBE: {\n data.enforceInterface(DESCRIPTOR);\n int resultCode = isConvertibleToFBE() ? 1 : 0;\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_resizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String key;\n key = data.readString();\n int resultCode = resizeSecureContainer(id, sizeMb, key);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_lastMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n long lastMaintenance = lastMaintenance();\n reply.writeNoException();\n reply.writeLong(lastMaintenance);\n return true;\n }\n case TRANSACTION_runMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n runMaintenance();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_waitForAsecScan: {\n data.enforceInterface(DESCRIPTOR);\n waitForAsecScan();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getDisks: {\n data.enforceInterface(DESCRIPTOR);\n DiskInfo[] disks = getDisks();\n reply.writeNoException();\n reply.writeTypedArray(disks, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumes: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeInfo[] volumes = getVolumes(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumeRecords: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeRecord[] volumes = getVolumeRecords(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_mount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n mount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n unmount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_format: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n format(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_benchmark: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n long res = benchmark(volId);\n reply.writeNoException();\n reply.writeLong(res);\n return true;\n }\n case TRANSACTION_partitionPublic: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPublic(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionPrivate: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPrivate(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionMixed: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n int ratio = data.readInt();\n partitionMixed(diskId, ratio);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeNickname: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n String nickname = data.readString();\n setVolumeNickname(volId, nickname);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeUserFlags: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n int _flags = data.readInt();\n int _mask = data.readInt();\n setVolumeUserFlags(volId, _flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetVolume: {\n data.enforceInterface(DESCRIPTOR);\n String fsUuid = data.readString();\n forgetVolume(fsUuid);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetAllVolumes: {\n data.enforceInterface(DESCRIPTOR);\n forgetAllVolumes();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setDebugFlags: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n int _mask = data.readInt();\n setDebugFlags(_flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = getPrimaryStorageUuid();\n reply.writeNoException();\n reply.writeString(volumeUuid);\n return true;\n }\n case TRANSACTION_setPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n IPackageMoveObserver listener = IPackageMoveObserver.Stub.asInterface(\n data.readStrongBinder());\n setPrimaryStorageUuid(volumeUuid, listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_createUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n boolean ephemeral = data.readInt() != 0;\n createUserKey(userId, serialNumber, ephemeral);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n destroyUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_addUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n addUserKeyAuth(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_fixateNewestUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n fixateNewestUserKeyAuth(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unlockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n unlockUserKey(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_lockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n lockUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUserKeyUnlocked: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n boolean result = isUserKeyUnlocked(userId);\n reply.writeNoException();\n reply.writeInt(result ? 1 : 0);\n return true;\n }\n case TRANSACTION_prepareUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int serialNumber = data.readInt();\n int _flags = data.readInt();\n prepareUserStorage(volumeUuid, userId, serialNumber, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int _flags = data.readInt();\n destroyUserStorage(volumeUuid, userId, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountAppFuse: {\n data.enforceInterface(DESCRIPTOR);\n String name = data.readString();\n ParcelFileDescriptor fd = mountAppFuse(name);\n reply.writeNoException();\n reply.writeParcelable(fd, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n }\n return super.onTransact(code, data, reply, flags);\n }\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns an int\n * consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException;\n\n /*\n * Destroy a secure container, and free up all resources associated with it.\n * NOTE: Ensure all references are released prior to deleting. Returns an\n * int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException;\n\n /*\n * Finalize a container which has just been created and populated. After\n * finalization, the container is immutable. Returns an int consistent with\n * MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException;\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException;\n\n /**\n * Format external storage given a mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException;\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException;\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException;\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException;\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException;\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException;\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException;\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is enabled (media is shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException;\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and\n * only allows the calling process's UID access to the contents.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException;\n\n /*\n * Mount a secure container with the specified key and owner UID. Returns an\n * int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException;\n\n /**\n * Mount external storage at given mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException;\n\n /**\n * Registers an IMountServiceListener for receiving async notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException;\n\n /*\n * Rename an unmounted secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException;\n\n /**\n * Enables / disables USB mass storage. The caller should check actual\n * status of enabling/disabling USB mass storage via StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException;\n\n /**\n * Shuts down the MountService and gracefully unmounts all external media.\n * Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer) throws RemoteException;\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified,\n * any program using it will be forcibly killed to unmount the image.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException;\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException;\n\n /**\n * Safely unmount external storage at given mount point. The unmount is an\n * asynchronous operation. Applications should register StorageEventListener\n * for storage related status changes.\n * @param mountPoint the mount point\n * @param force whether or not to forcefully unmount it (e.g. even if programs are using this\n * data currently)\n * @param removeEncryption whether or not encryption mapping should be removed from the volume.\n * This value implies {@code force}.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException;\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException;\n\n /**\n * Returns whether or not the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException;\n\n /** The volume is not encrypted. */\n static final int ENCRYPTION_STATE_NONE = 1;\n /** The volume has been encrypted succesfully. */\n static final int ENCRYPTION_STATE_OK = 0;\n /** The volume is in a bad state.*/\n static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;\n /** Encryption is incomplete */\n static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;\n /** Encryption is incomplete and irrecoverable */\n static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;\n /** Underlying data is corrupt */\n static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;\n\n /**\n * Determines the encryption state of the volume.\n * @return a numerical value. See {@code ENCRYPTION_STATE_*} for possible\n * values.\n * Note that this has been replaced in most cases by the APIs in\n * StorageManager (see isEncryptable and below)\n * This is still useful to get the error state when encryption has failed\n * and CryptKeeper needs to throw up a screen advising the user what to do\n */\n public int getEncryptionState() throws RemoteException;\n\n /**\n * Decrypts any encrypted volumes.\n */\n public int decryptStorage(String password) throws RemoteException;\n\n /**\n * Encrypts storage.\n */\n public int encryptStorage(int type, String password) throws RemoteException;\n\n /**\n * Changes the encryption password.\n */\n public int changeEncryptionPassword(int type, String password)\n throws RemoteException;\n\n /**\n * Verify the encryption password against the stored volume. This method\n * may only be called by the system process.\n */\n public int verifyEncryptionPassword(String password) throws RemoteException;\n\n /**\n * Returns list of all mountable volumes.\n */\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException;\n\n /**\n * Gets the path on the filesystem for the ASEC container itself.\n *\n * @param cid ASEC container ID\n * @return path to filesystem or {@code null} if it's not found\n * @throws RemoteException\n */\n public String getSecureContainerFilesystemPath(String cid) throws RemoteException;\n\n /*\n * Fix permissions in a container which has just been created and populated.\n * Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException;\n\n /**\n * Ensure that all directories along given path exist, creating parent\n * directories as needed. Validates that given path is absolute and that it\n * contains no relative \".\" or \"..\" paths or symlinks. Also ensures that\n * path belongs to a volume managed by vold, and that path is either\n * external storage data or OBB directory belonging to calling app.\n */\n public int mkdirs(String callingPkg, String path) throws RemoteException;\n\n /**\n * Determines the type of the encryption password\n * @return PasswordType\n */\n public int getPasswordType() throws RemoteException;\n\n /**\n * Get password from vold\n * @return password or empty string\n */\n public String getPassword() throws RemoteException;\n\n /**\n * Securely clear password from vold\n */\n public void clearPassword() throws RemoteException;\n\n /**\n * Set a field in the crypto header.\n * @param field field to set\n * @param contents contents to set in field\n */\n public void setField(String field, String contents) throws RemoteException;\n\n /**\n * Gets a field from the crypto header.\n * @param field field to get\n * @return contents of field\n */\n public String getField(String field) throws RemoteException;\n\n public boolean isConvertibleToFBE() throws RemoteException;\n\n public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException;\n\n /**\n * Report the time of the last maintenance operation such as fstrim.\n * @return Timestamp of the last maintenance operation, in the\n * System.currentTimeMillis() time base\n * @throws RemoteException\n */\n public long lastMaintenance() throws RemoteException;\n\n /**\n * Kick off an immediate maintenance operation\n * @throws RemoteException\n */\n public void runMaintenance() throws RemoteException;\n\n public void waitForAsecScan() throws RemoteException;\n\n public DiskInfo[] getDisks() throws RemoteException;\n public VolumeInfo[] getVolumes(int flags) throws RemoteException;\n public VolumeRecord[] getVolumeRecords(int flags) throws RemoteException;\n\n public void mount(String volId) throws RemoteException;\n public void unmount(String volId) throws RemoteException;\n public void format(String volId) throws RemoteException;\n public long benchmark(String volId) throws RemoteException;\n\n public void partitionPublic(String diskId) throws RemoteException;\n public void partitionPrivate(String diskId) throws RemoteException;\n public void partitionMixed(String diskId, int ratio) throws RemoteException;\n\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException;\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException;\n public void forgetVolume(String fsUuid) throws RemoteException;\n public void forgetAllVolumes() throws RemoteException;\n public void setDebugFlags(int flags, int mask) throws RemoteException;\n\n public String getPrimaryStorageUuid() throws RemoteException;\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException;\n\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException;\n public void destroyUserKey(int userId) throws RemoteException;\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException;\n\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void lockUserKey(int userId) throws RemoteException;\n public boolean isUserKeyUnlocked(int userId) throws RemoteException;\n\n public void prepareUserStorage(String volumeUuid, int userId, int serialNumber,\n int flags) throws RemoteException;\n public void destroyUserStorage(String volumeUuid, int userId, int flags) throws RemoteException;\n\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException;\n}", "public static MovieRPCBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MovieRPCBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MovieRPCBlockingStub>() {\n @java.lang.Override\n public MovieRPCBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MovieRPCBlockingStub(channel, callOptions);\n }\n };\n return MovieRPCBlockingStub.newStub(factory, channel);\n }", "public static SinkServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SinkServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SinkServiceFutureStub>() {\n @java.lang.Override\n public SinkServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SinkServiceFutureStub(channel, callOptions);\n }\n };\n return SinkServiceFutureStub.newStub(factory, channel);\n }", "public Stub() {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub() {\n this.attachInterface(this, DESCRIPTOR);\n }", "public static homeLightsBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new homeLightsBlockingStub(channel);\n }", "public StreamResponseRequestBuilder<akka.stream.javadsl.Source<io.cloudstate.protocol.CrdtProto.CrdtStreamIn, akka.NotUsed>, io.cloudstate.protocol.CrdtProto.CrdtStreamOut> handle()\n \n {\n throw new UnsupportedOperationException();\n }", "public Stub() {\n attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public static ExtractionServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceBlockingStub>() {\n @Override\n public ExtractionServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ExtractionServiceBlockingStub(channel, callOptions);\n }\n };\n return ExtractionServiceBlockingStub.newStub(factory, channel);\n }", "public static S3InternalServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub>() {\n @java.lang.Override\n public S3InternalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceFutureStub(channel, callOptions);\n }\n };\n return S3InternalServiceFutureStub.newStub(factory, channel);\n }", "VoidOperation createVoidOperation();", "public static RaftServerProtocolServiceFutureStub newFutureStub(\n org.apache.ratis.shaded.io.grpc.Channel channel) {\n return new RaftServerProtocolServiceFutureStub(channel);\n }", "public static TpuBlockingStub newBlockingStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<TpuBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<TpuBlockingStub>() {\n @java.lang.Override\n public TpuBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new TpuBlockingStub(channel, callOptions);\n }\n };\n return TpuBlockingStub.newStub(factory, channel);\n }", "public static S3InternalServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceStub>() {\n @java.lang.Override\n public S3InternalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceStub(channel, callOptions);\n }\n };\n return S3InternalServiceStub.newStub(factory, channel);\n }", "long createBidirectionalStream(CronetBidirectionalStream caller,\n long urlRequestContextAdapter, boolean sendRequestHeadersAutomatically,\n boolean trafficStatsTagSet, int trafficStatsTag, boolean trafficStatsUidSet,\n int trafficStatsUid, long networkHandle);", "public interface NettyProxyService {\n /**\n * 心跳\n *\n * @param msg\n * @throws Exception\n */\n void processHeartbeatMsg(HeartbeatMsg msg) throws Exception;\n\n /**\n * 上传位置\n *\n * @param msg\n * @throws Exception\n */\n void processLocationMsg(LocationMsg msg) throws Exception;\n\n /**\n * 离线\n *\n * @param deviceNumber\n */\n void processInactive(String deviceNumber);\n}", "@Test(description = \"2.1.1.2\", enabled = false)\n public void httpEndpointViaCallMediatorBlockingMode() throws\n Exception {\n String proxyServiceUrl = getProxyServiceURLHttp(\"2_1_1_2_Proxy_httpEndpointViaCallMediatorBlockingMode\");\n HTTPUtils.invokeSoapActionAndCheckContains(proxyServiceUrl, GET_QUOTE_REQUEST, header, expectedResponse,\n HttpConstants.HTTP_SC_SUCCESS, \"urn:mediate\",\n \"httpEndpointViaCallMediatorBlockingMode\");\n }", "public static ImageServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ImageServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ImageServiceBlockingStub>() {\n @java.lang.Override\n public ImageServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ImageServiceBlockingStub(channel, callOptions);\n }\n };\n return ImageServiceBlockingStub.newStub(factory, channel);\n }", "@Override\n\tpublic Future<RpcResult<Void>> noinputOutput() {\n\t\tLOG.info(\"noinputOutput is called.\");\n\t\treturn Futures.immediateFuture( RpcResultBuilder.<Void> success().build() );\n\t}", "public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}", "public interface SystemService {\n /**\n * Gets unique service identifier.\n *\n * @return unique String service identifier\n */\n public String getServiceID();\n\n /**\n * Starts service. Called when service is about to be\n * requested for the first time. Thus, services can be\n * initialized lazily, only when they are really needed.\n */\n public void start();\n\n /**\n * Shutdowns service.\n */\n public void stop();\n\n /**\n * Accepts connection. When client requests a service, first,\n * a connection between client and service is created, and then\n * it is passed to service via this method to accept it and\n * start doing its thing. Note: you shouldn't block in this\n * method.\n *\n * @param connection connection between client and service\n */\n public void acceptConnection(SystemServiceConnection connection);\n}", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Lists nodes.\n * </pre>\n */\n default void listNodes(\n com.google.cloud.tpu.v2alpha1.ListNodesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListNodesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the details of a node.\n * </pre>\n */\n default void getNode(\n com.google.cloud.tpu.v2alpha1.GetNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.Node> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a node.\n * </pre>\n */\n default void createNode(\n com.google.cloud.tpu.v2alpha1.CreateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a node.\n * </pre>\n */\n default void deleteNode(\n com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Stops a node. This operation is only available with single TPU nodes.\n * </pre>\n */\n default void stopNode(\n com.google.cloud.tpu.v2alpha1.StopNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Starts a node.\n * </pre>\n */\n default void startNode(\n com.google.cloud.tpu.v2alpha1.StartNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the configurations of a node.\n * </pre>\n */\n default void updateNode(\n com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists queued resources.\n * </pre>\n */\n default void listQueuedResources(\n com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListQueuedResourcesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets details of a queued resource.\n * </pre>\n */\n default void getQueuedResource(\n com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.QueuedResource>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a QueuedResource TPU instance.\n * </pre>\n */\n default void createQueuedResource(\n com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a QueuedResource TPU instance.\n * </pre>\n */\n default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Resets a QueuedResource TPU instance\n * </pre>\n */\n default void resetQueuedResource(\n com.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getResetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates the Cloud TPU service identity for the project.\n * </pre>\n */\n default void generateServiceIdentity(\n com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateServiceIdentityMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists accelerator types supported by this API.\n * </pre>\n */\n default void listAcceleratorTypes(\n com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAcceleratorTypesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets AcceleratorType.\n * </pre>\n */\n default void getAcceleratorType(\n com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.AcceleratorType>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAcceleratorTypeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists runtime versions supported by this API.\n * </pre>\n */\n default void listRuntimeVersions(\n com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListRuntimeVersionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a runtime version.\n * </pre>\n */\n default void getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetRuntimeVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves the guest attributes for the node.\n * </pre>\n */\n default void getGuestAttributes(\n com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetGuestAttributesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Simulates a maintenance event.\n * </pre>\n */\n default void simulateMaintenanceEvent(\n com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSimulateMaintenanceEventMethod(), responseObserver);\n }\n }", "protected static <T> ServiceOutBuilder<T> doPipeServiceOut() {\n\t\treturn new ServiceOutBuilder<>();\n\t}", "InOut createInOut();", "void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);", "public SingleOperationMarshallingTest() {\n }", "public static GreetingServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new GreetingServiceBlockingStub(channel);\n }", "public static LightningStub newStub(io.grpc.Channel channel) {\n return new LightningStub(channel);\n }", "public static ShippingServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ShippingServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ShippingServiceBlockingStub>() {\n @java.lang.Override\n public ShippingServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ShippingServiceBlockingStub(channel, callOptions);\n }\n };\n return ShippingServiceBlockingStub.newStub(factory, channel);\n }", "public abstract IOpipeService service();", "public interface DataStreamClient {\n\n Logger LOG = LoggerFactory.getLogger(DataStreamClient.class);\n\n /** Return Client id. */\n ClientId getId();\n\n /** Return Streamer Api instance. */\n DataStreamApi getDataStreamApi();\n\n /**\n * send to server via streaming.\n * Return a completable future.\n */\n\n /** To build {@link DataStreamClient} objects */\n class Builder {\n private ClientId clientId;\n private DataStreamClientRpc dataStreamClientRpc;\n private RaftProperties properties;\n private Parameters parameters;\n\n private Builder() {}\n\n public DataStreamClientImpl build(){\n if (clientId == null) {\n clientId = ClientId.randomId();\n }\n if (properties != null) {\n if (dataStreamClientRpc == null) {\n final SupportedDataStreamType type = RaftConfigKeys.DataStream.type(properties, LOG::info);\n dataStreamClientRpc = DataStreamClientFactory.cast(type.newFactory(parameters))\n .newDataStreamClientRpc(clientId, properties);\n }\n }\n return new DataStreamClientImpl(clientId, properties, dataStreamClientRpc);\n }\n\n public Builder setClientId(ClientId clientId) {\n this.clientId = clientId;\n return this;\n }\n\n public Builder setParameters(Parameters parameters) {\n this.parameters = parameters;\n return this;\n }\n\n public Builder setDataStreamClientRpc(DataStreamClientRpc dataStreamClientRpc){\n this.dataStreamClientRpc = dataStreamClientRpc;\n return this;\n }\n\n public Builder setProperties(RaftProperties properties) {\n this.properties = properties;\n return this;\n }\n }\n\n}", "public static SinkServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SinkServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SinkServiceStub>() {\n @java.lang.Override\n public SinkServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SinkServiceStub(channel, callOptions);\n }\n };\n return SinkServiceStub.newStub(factory, channel);\n }", "public static LightningFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new LightningFutureStub(channel);\n }", "public RpcClient(ManagedChannelBuilder<?> channelBuilder) {\n channel = channelBuilder.build();\n blockingStub = PredictionServiceGrpc.newBlockingStub(channel);\n asyncStub = PredictionServiceGrpc.newStub(channel);\n modelServiceBlockingStub = ModelServiceGrpc.newBlockingStub(channel);\n modelServiceStub = ModelServiceGrpc.newStub(channel);\n channelzBlockingStub = ChannelzGrpc.newBlockingStub(channel);\n }", "@RemoteServiceClient(SimpleHttpService.class)\npublic interface ISimpleHttpServiceClient extends IServiceClient {\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_START)\n void bootup(int port);\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_STOP)\n void shutdown();\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_INFO)\n void info(int port);\n}", "public interface AsynService {\n void asynMethod();\n}", "public interface UdpReceiverService {\n\n public void start() throws IOException, TimeoutException;\n\n public void setCompress(boolean compress);\n}", "public void start() {\n/* 255 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void constructStartAndStop() {\n kit.setBlockingStartup(false);\n kit.startAsync();\n kit.awaitRunning();\n kit.stopAsync();\n kit.awaitTerminated();\n }", "public static EmployeeServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new EmployeeServiceBlockingStub(channel);\n }", "public interface BackPressuredWriteStream<T> extends WriteStream<T> {\n\n static <T> BackPressuredWriteStream create(Handler<T> writeHandler) {\n return new BackPressuredWriteStreamImpl<T>(writeHandler);\n }\n\n static <T> BackPressuredWriteStream createThrottled(Handler<T> writeHandler, long quotaPeriod, int quota, String persistentQuotaTimeFile, Vertx vertx) {\n return new ThrottleStreamImpl(writeHandler, quotaPeriod, quota, persistentQuotaTimeFile, vertx);\n }\n\n void drop();\n\n long getQueueSize();\n}", "void stubNextResponse(HttpExecuteResponse nextResponse);", "public static LightningBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new LightningBlockingStub(channel);\n }", "public interface PseudoOperation {\n\t/**\n\t * Performs pre-processing for a pseudo-operation, such as setting up outbound transport headers.\n\t * @param serviceDesc the service description for the associated service\n\t * @param reqMetaCtx the request meta-information such as transport headers and query parameters\n\t * @param respMetaCtx a holder for response information such as the transport headers and output stream\n\t * @throws ServiceException if an error is detected, such as inconsistent query information\n\t */\n\tpublic void preinvoke(ServerServiceDesc serviceDesc, RequestMetaContext reqMetaCtx, ResponseMetaContext respMetaCtx) throws ServiceException;\n\n\t/**\n\t * Processes the pseudo-operation and pushes the result into the output stream. \n\t * @param serviceDesc the service description for the associated service\n\t * @param reqMetaCtx the request meta-information such as transport headers and query parameters\n\t * @param respMetaCtx a holder for response information such as the transport headers\n\t * @throws ServiceException if an error is encountered during processing\n\t */\n\tpublic void invoke(ServerServiceDesc serviceDesc, RequestMetaContext reqMetaCtx, ResponseMetaContext respMetaCtx) throws ServiceException;\n}", "public Object call() throws Exception {\n\t\t\t\t\t\tProducerSimpleNettyResponseFuture future;\n\t\t\t\t\t\tProducerSimpleNettyResponse responseFuture;\n\t\t\t\t\t\tfuture = clientProxy.request(message);\n\t\t\t\t\t\tresponseFuture = future\n\t\t\t\t\t\t\t\t.get(3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\t\treturn responseFuture.getResponse();\n\t\t\t\t\t}", "public interface Http2Client extends Closeable {\n\n /**\n * connect to remote address asynchronously\n * @return CompletableFuture contains {@link Void}\n */\n CompletableFuture<Void> connect();\n\n /**\n * send http request to remote address asynchronously\n * @param request http2 request\n * @return CompletableFuture contains response\n */\n CompletableFuture<HttpResponse> sendRequest(HttpRequest request);\n\n /**\n * send http request to remote address asynchronously,\n * and not wait far response\n * @param request http2 request\n * @return CompletableFuture contains nothing\n */\n CompletableFuture<Void> sendRequestOneWay(HttpRequest request);\n\n /**\n * send server-push ack to remote address asynchronously\n * @param pushAck server-push ack\n * @param streamId http2 streamId\n * @return CompletableFuture contains nothing\n */\n CompletableFuture<Void> sendPushAck(HttpPushAck pushAck, int streamId);\n}", "public interface LongProcessOperations \n{\n ServoConRemote.LongProcessPackage.Status Completed ();\n\n //message is empty on success\n String Message ();\n double Progress ();\n void Detach ();\n}", "public abstract @Nullable SerializableSupplier<PublisherServiceStub> stubSupplier();", "private static void bidiStreamService(ManagedChannel channel){\n CalculatorServiceGrpc.CalculatorServiceStub asynClient = CalculatorServiceGrpc.newStub(channel);\n CountDownLatch latch = new CountDownLatch(1);\n StreamObserver<FindMaximumRequest> streamObserver = asynClient.findMaximum(new StreamObserver<FindMaximumResponse>() {\n @Override\n public void onNext(FindMaximumResponse value) {\n System.out.println(\"Got new maxium from server: \"+ value.getMaximum());\n }\n\n @Override\n public void onError(Throwable t) {\n latch.countDown();\n }\n\n @Override\n public void onCompleted() {\n System.out.println(\"Server is done sending data\");\n latch.countDown();\n }\n });\n\n Arrays.asList(1,5,3,6,2,20).forEach(\n number -> {\n System.out.println(\"Sending number: \"+ number);\n streamObserver.onNext(FindMaximumRequest.newBuilder()\n .setNumber(number)\n .build());\n }\n );\n\n streamObserver.onCompleted();\n try {\n latch.await(3L, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\t * @param request\n\t * @return\n\t * @throws Http2Exception\n\t */\n\t Http2Response request(Http2Request request) throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean isRuning() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean shutdown() throws Http2Exception;\n\n}", "public static GreeterBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new GreeterBlockingStub(channel);\n }", "public static homeLightsFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new homeLightsFutureStub(channel);\n }", "public static CommunicationServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new CommunicationServiceBlockingStub(channel);\n }", "public static BookServicesBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new BookServicesBlockingStub(channel);\n }", "@Test\n void runWithBroadcastMessageTest() throws Exception {\n\n Prattle.startUp();\n\n\n\n Field initialized = client1.getClass().getDeclaredField(\"initialized\");\n Field input = client1.getClass().getDeclaredField(\"input\");\n Field output = client1.getClass().getDeclaredField(\"output\");\n\n initialized.setAccessible(true);\n input.setAccessible(true);\n output.setAccessible(true);\n\n initialized.set(client1, false);\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n Message msg = Message.makeBroadcastMessage(\"Mandy\", \"test\");\n when(scanNetNB.nextMessage()).thenReturn(msg);\n\n input.set(client1, scanNetNB);\n\n\n client1.run();\n assertEquals(true, client1.isInitialized());\n client1.run();\n Message msgLogOff = Message.makeBroadcastMessage(\"Mandy\", \"Prattle says everyone log off\");\n when(scanNetNB.nextMessage()).thenReturn(msgLogOff);\n client1.run();\n\n Message msgWithDiffName = Message.makeBroadcastMessage(\"Noodle\", \"Hello from Noodle\");\n client1.setName(\"Mandy\");\n System.out.print(client1.getName());\n System.out.print(msgWithDiffName.getName());\n client1.run();\n\n assertEquals(true, client1.isInitialized());\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n when(scanNetNB.nextMessage()).thenReturn(msgWithDiffName);\n input.set(client1, scanNetNB);\n output.set(client1, printNetNB);\n\n ClientRunnable clientRunnable = spy(client1);\n Mockito.doNothing().when(clientRunnable).terminateClient();\n clientRunnable.run();\n\n\n\n\n\n }", "public static ProductServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ProductServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ProductServiceBlockingStub>() {\n @java.lang.Override\n public ProductServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ProductServiceBlockingStub(channel, callOptions);\n }\n };\n return ProductServiceBlockingStub.newStub(factory, channel);\n }", "public static TransferBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new TransferBlockingStub(channel);\n }", "public interface RpcClient {\r\n\r\n\t/**\r\n\t * Initializes this RpcClient\r\n\t */\r\n\tpublic void initialize();\r\n\t\r\n\t/**\r\n\t * Sends the specified object and waits for a response message (or) the specified timeout to occur. Keeps the connection open for further \r\n\t * send requests. Note that clients of this RPCClient must call {@link RPCClient#closeConnections()} when done using this RPCClient.\r\n\t * This method performs to-and-from conversion of the specified object to a raw byte array when publishing it to the queue / consuming off it. \r\n\t * @param message the message to be sent\r\n\t * @param timeout the timeout duration in milliseconds\r\n\t * @return response Object from the RPC message call\r\n\t * @throws MessagingTimeoutException in case the specified timeout occurs\r\n\t * @throws MessagingException in case of errors in message publishing\r\n\t */\r\n\tpublic Object send(Object message, int timeout) throws MessagingTimeoutException, MessagingException;\r\n\r\n\t/**\r\n\t * Sends the specified String and waits for a response message (or) the specified timeout to occur. Keeps the connection open for further \r\n\t * send requests. Note that clients of this RPCClient must call {@link RPCClient#closeConnections()} when done using this RPCClient.\r\n\t * This method performs to-and-from conversion of the specified object to UTF-8 encoded byte array when publishing it to the queue / consuming off it. \r\n\t * @param message the String message to be sent\r\n\t * @param timeout the timeout duration in milliseconds\r\n\t * @return response String from the RPC message call\r\n\t * @throws MessagingTimeoutException in case the specified timeout occurs\r\n\t * @throws MessagingException in case of errors in message publishing\r\n\t */\r\n\tpublic String sendString(String message , int timeout) throws MessagingTimeoutException, MessagingException;\r\n\t\r\n\t/**\r\n\t * Closes connection related objects used by this RpcClient.\r\n\t * @throws MessagingException in case of errors closing connections to the underlying messaging system.\r\n\t */\r\n\tpublic void closeConnections() throws MessagingException;\r\n\t\r\n}", "public interface Spy<T> {\n /**\n * Request processing\n *\n * @param request\n * @return\n */\n T in(T request);\n\n /**\n * Response processing\n *\n * @param response\n * @return\n */\n T out(T response);\n}", "private static void unaryService(ManagedChannel channel){\n CalculatorServiceBlockingStub calculatorClient = newBlockingStub(channel);\n\n //Create a Greet Request\n SumRequest sumRequest = SumRequest\n .newBuilder()\n .setFirstNumber(1)\n .setSecondNumber(2)\n .build();\n\n //Call the RPC and get back a GreetResponse\n SumResponse sumResponse = calculatorClient.sum(sumRequest);\n System.out.println(sumRequest.getFirstNumber() +\"+\" + sumRequest.getSecondNumber() +\"=\"+ sumResponse.getSumResult());\n }", "Optional<String> invokeRpc(@Nonnull String uriPath, Optional<String> input) throws OperationFailedException;", "public static LogBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n return new LogBlockingStub(channel);\n }", "public static JwtAuthTestServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<JwtAuthTestServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<JwtAuthTestServiceBlockingStub>() {\n @java.lang.Override\n public JwtAuthTestServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new JwtAuthTestServiceBlockingStub(channel, callOptions);\n }\n };\n return JwtAuthTestServiceBlockingStub.newStub(factory, channel);\n }", "public static SubscriptionServiceBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SubscriptionServiceBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SubscriptionServiceBlockingStub>() {\n @java.lang.Override\n public SubscriptionServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SubscriptionServiceBlockingStub(channel, callOptions);\n }\n };\n return SubscriptionServiceBlockingStub.newStub(factory, channel);\n }", "public static RaftServerProtocolServiceStub newStub(org.apache.ratis.shaded.io.grpc.Channel channel) {\n return new RaftServerProtocolServiceStub(channel);\n }", "public static AvroreposBlockingStub newBlockingStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AvroreposBlockingStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AvroreposBlockingStub>() {\n @java.lang.Override\n public AvroreposBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AvroreposBlockingStub(channel, callOptions);\n }\n };\n return AvroreposBlockingStub.newStub(factory, channel);\n }", "public interface UsbCommunicationInterface extends Runnable\n{\n byte get();\n\n void send(byte data) throws IOException;\n\n void cancel();\n}", "public interface IBeltApi extends ICloseable {\r\n /**\r\n * Start the belt vibrating in the indicated direction for the specified duration.\r\n * @param radiansFromNorth radians left of north in which the belt should indicate.\r\n * @param radiansOfArch an arch with with its mid point centered on the radiansFromNorth which should be include in the indication.\r\n * This provides the ability to have a fine or bord direction indication.\r\n * @param durationInMS duration in milliseconds the indication should last.\r\n * @throws IOException\r\n */\r\n void vibrate(double radiansFromNorth, double radiansOfArch, double durationInMS) throws IOException;\r\n\r\n /**\r\n * Stops any current indication the device is communicating.\r\n * @throws IOException\r\n */\r\n void stop() throws IOException;\r\n}", "public ApplicationStub() {\n }", "public interface P2LOutputStream extends AutoCloseable {\n /** Internal use only. */\n void receivedReceipt(P2LMessage rawReceipt);\n /** Internal use only. */\n InetSocketAddress getRawFrom();\n /** Internal use only. */\n short getType();\n /** Internal use only. */\n short getConversationId();\n /** Internal use only. */\n short getStep();\n\n /**\n * Blocking method to obtain the guarantee that all data written AND subsequently flushed has been received by the peer.\n * When the method returns all data has been correctly received by the peer.\n * However no guarantee can be made whether the client has read and interpreted the data.\n *\n * @param timeout_ms timeout after which to throw a timeout exception - if the timeout is 0 the method will block potentially forever\n * @throws IOException if the underlying socket has an error\n * @return whether confirmation has been received within the given timeout\n */\n boolean waitForConfirmationOnAll(int timeout_ms) throws IOException;\n\n /**\n * Closes the stream and cleans internal data structures.\n * Before this is done however, close completes the current write(for example using flush) and waits until all send messages have been received using {@link #waitForConfirmationOnAll(int)}.\n * In other words this method is blocking, potentially forever.\n * @throws IOException if flush fails\n */\n default void close() throws IOException { close(0); }\n /**\n * Closes the stream and cleans internal data structures.\n * Before this is done however, close completes the current write(for example using flush) and waits until all send messages have been received using {@link #waitForConfirmationOnAll(int)}.\n * After the given timeout the internal data structures are cleaned even without confirmation.\n *\n * This method is idempotent, i.e. calling it multiple times will not yield different results or change the internal state again. Or .. it isn't?\n *\n * @param timeout_ms timeout after which to force the stream to close - if the timeout is 0 the method will blocking until confirmation is received.\n * @return whether confirmation was received before the timeout\n * @throws IOException if flush fails\n */\n boolean close(int timeout_ms) throws IOException;\n\n /**\n * Closes the stream and cleans internal data structures.\n * Before this is done however, close completes the current write(for example using flush) and will resent messages if required.\n * After the given timeout the internal data structures are cleaned even without confirmation.\n *\n * Canceling this future will cancel the stream. i.e. there will not be hope of it ever completing.\n *\n * @return whether confirmation was received - and THAT confirmation was received\n */\n P2LFuture<Boolean> closeAsync();\n\n /**\n * @return whether {@link #close()} was ever called, or the receiving input stream informed us that they have closed the stream on their side.\n */\n boolean isClosed();\n}", "@MatchStatement\r\n public T stub() {\r\n MatchingInvocationHandler matchingInvocationHandler = createAlwaysMatchingBehaviorDefiningMatchingInvocationHandler(new StubMockBehavior());\r\n return startMatchingInvocation(matchingInvocationHandler);\r\n }", "public interface GeneralService {\n\n /**\n * Returns general server data\n */\n Request getGeneralData(AsyncCallback<GeneralData> callback);\n\n}", "org.omg.CORBA.portable.OutputStream try_invoke(java.lang.String method, org.omg.CORBA.portable.InputStream input,\r\n org.omg.CORBA.portable.ResponseHandler handler) throws X;", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();" ]
[ "0.64577496", "0.57187194", "0.5505287", "0.5441702", "0.54370403", "0.5416198", "0.5416198", "0.5416198", "0.5416198", "0.5416198", "0.5415596", "0.5408881", "0.5389577", "0.5361891", "0.5344934", "0.53106624", "0.53044236", "0.53044236", "0.5292175", "0.5265943", "0.52608323", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5252381", "0.5248391", "0.5223187", "0.5217213", "0.5185573", "0.51664937", "0.5151434", "0.51469916", "0.51469034", "0.51452005", "0.51219046", "0.5119682", "0.5115126", "0.51061815", "0.5105935", "0.5105903", "0.5098822", "0.5098473", "0.5096362", "0.50912225", "0.5089692", "0.5081121", "0.50809383", "0.5078869", "0.50744706", "0.5065774", "0.50385386", "0.5030161", "0.50293064", "0.50292546", "0.5011006", "0.50044936", "0.5002487", "0.50014937", "0.49798495", "0.49776426", "0.4976224", "0.4976003", "0.49715495", "0.49696818", "0.4966006", "0.4961851", "0.496027", "0.49564862", "0.49468234", "0.49425158", "0.4937071", "0.4936505", "0.4933325", "0.49310574", "0.49225947", "0.49202487", "0.49196598", "0.49114487", "0.49041167", "0.4881967", "0.48819417", "0.4878702", "0.48657328", "0.48643896", "0.48627898", "0.48613212", "0.48572677", "0.48560157", "0.48475188", "0.4840598", "0.48369583", "0.48369583", "0.48369583" ]
0.0
-1
Creates a new ListenableFuturestyle stub that supports unary calls on the service
public static RegistrationServiceFutureStub newFutureStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<RegistrationServiceFutureStub> factory = new io.grpc.stub.AbstractStub.StubFactory<RegistrationServiceFutureStub>() { @java.lang.Override public RegistrationServiceFutureStub newStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RegistrationServiceFutureStub(channel, callOptions); } }; return RegistrationServiceFutureStub.newStub(factory, channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ExtractionServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub>() {\n @Override\n public ExtractionServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ExtractionServiceFutureStub(channel, callOptions);\n }\n };\n return ExtractionServiceFutureStub.newStub(factory, channel);\n }", "public static ShippingServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ShippingServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ShippingServiceFutureStub>() {\n @java.lang.Override\n public ShippingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ShippingServiceFutureStub(channel, callOptions);\n }\n };\n return ShippingServiceFutureStub.newStub(factory, channel);\n }", "public interface ListenableFutureCallback\n\textends SuccessCallback, FailureCallback\n{\n}", "default void accept(ListenableFuture<? extends T> listenableFuture) {\n Futures.addCallback(listenableFuture, new FutureCallback<T>() {\n @Override\n public void onSuccess(T result) {\n success(result);\n }\n\n @Override\n public void onFailure(Throwable t) {\n error(t);\n }\n });\n }", "public static S3InternalServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub>() {\n @java.lang.Override\n public S3InternalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceFutureStub(channel, callOptions);\n }\n };\n return S3InternalServiceFutureStub.newStub(factory, channel);\n }", "public static ProductServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ProductServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ProductServiceFutureStub>() {\n @java.lang.Override\n public ProductServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ProductServiceFutureStub(channel, callOptions);\n }\n };\n return ProductServiceFutureStub.newStub(factory, channel);\n }", "public static TpuFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<TpuFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<TpuFutureStub>() {\n @java.lang.Override\n public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new TpuFutureStub(channel, callOptions);\n }\n };\n return TpuFutureStub.newStub(factory, channel);\n }", "public static SubscriptionServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SubscriptionServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SubscriptionServiceFutureStub>() {\n @java.lang.Override\n public SubscriptionServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SubscriptionServiceFutureStub(channel, callOptions);\n }\n };\n return SubscriptionServiceFutureStub.newStub(factory, channel);\n }", "public interface ChefService {\n\n ListenableFuture<ResponseChefsEvent> requestChefs(final RequestChefsEvent event);\n\n ListenableFuture<ResponseChefEvent> createChef(final CreateChefEvent event);\n\n ListenableFuture<ResponseChefEvent> registerChef(final RegisterChefEvent event);\n\n ListenableFuture<ResponseChefEvent> requestChef(final RequestChefEvent event);\n\n ListenableFuture<ResponseChefEvent> updateChef(final UpdateChefEvent event);\n\n ListenableFuture<ResponseChefEvent> deleteChef(final DeleteChefEvent event);\n}", "public static AzureClustersFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AzureClustersFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AzureClustersFutureStub>() {\n @java.lang.Override\n public AzureClustersFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AzureClustersFutureStub(channel, callOptions);\n }\n };\n return AzureClustersFutureStub.newStub(factory, channel);\n }", "public static ClusterServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ClusterServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ClusterServiceFutureStub>() {\n @java.lang.Override\n public ClusterServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ClusterServiceFutureStub(channel, callOptions);\n }\n };\n return ClusterServiceFutureStub.newStub(factory, channel);\n }", "public static SinkServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<SinkServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<SinkServiceFutureStub>() {\n @java.lang.Override\n public SinkServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new SinkServiceFutureStub(channel, callOptions);\n }\n };\n return SinkServiceFutureStub.newStub(factory, channel);\n }", "public static LightningFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new LightningFutureStub(channel);\n }", "public static ImageServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ImageServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ImageServiceFutureStub>() {\n @java.lang.Override\n public ImageServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ImageServiceFutureStub(channel, callOptions);\n }\n };\n return ImageServiceFutureStub.newStub(factory, channel);\n }", "public static EntityServantFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new EntityServantFutureStub(channel);\n }", "@ThriftService(\"ThriftTaskService\")\npublic interface ThriftTaskClient\n{\n @ThriftMethod\n ListenableFuture<ThriftBufferResult> getResults(TaskId taskId, OutputBufferId bufferId, long token, long maxSizeInBytes);\n\n @ThriftMethod\n ListenableFuture<Void> acknowledgeResults(TaskId taskId, OutputBufferId bufferId, long token);\n\n @ThriftMethod\n ListenableFuture<Void> abortResults(TaskId taskId, OutputBufferId bufferId);\n}", "public static EmployeeServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new EmployeeServiceFutureStub(channel);\n }", "public static MetadataServiceFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MetadataServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MetadataServiceFutureStub>() {\n @java.lang.Override\n public MetadataServiceFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MetadataServiceFutureStub(channel, callOptions);\n }\n };\n return MetadataServiceFutureStub.newStub(factory, channel);\n }", "public static WebSocketFrameServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<WebSocketFrameServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<WebSocketFrameServiceFutureStub>() {\n @java.lang.Override\n public WebSocketFrameServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new WebSocketFrameServiceFutureStub(channel, callOptions);\n }\n };\n return WebSocketFrameServiceFutureStub.newStub(factory, channel);\n }", "public static RaftServerProtocolServiceFutureStub newFutureStub(\n org.apache.ratis.shaded.io.grpc.Channel channel) {\n return new RaftServerProtocolServiceFutureStub(channel);\n }", "public static homeLightsFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new homeLightsFutureStub(channel);\n }", "public interface Future<T> extends AsyncResult<T> {\n\n final class Factory {\n\n public static <T> Future<T> failedFuture(String failureMessage) {\n return new FutureImpl<>(failureMessage, false);\n }\n\n public static <T> Future<T> failedFuture(Throwable t) {\n return new FutureImpl<>(t);\n }\n\n public static <T> Future<T> future() {\n return new FutureImpl<>();\n }\n\n public static <T> Future<T> succeededFuture() {\n return new FutureImpl<>((Throwable) null);\n }\n\n public static <T> Future<T> succeededFuture(T result) {\n return new FutureImpl<>(result);\n }\n }\n\n void complete();\n\n void complete(T result);\n\n void fail(String failureMessage);\n\n void fail(Throwable throwable);\n\n boolean isComplete();\n\n void setHandler(Handler<AsyncResult<T>> handler);\n}", "public static DoctorServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<DoctorServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<DoctorServiceFutureStub>() {\n @java.lang.Override\n public DoctorServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new DoctorServiceFutureStub(channel, callOptions);\n }\n };\n return DoctorServiceFutureStub.newStub(factory, channel);\n }", "private static void unaryService(ManagedChannel channel){\n CalculatorServiceBlockingStub calculatorClient = newBlockingStub(channel);\n\n //Create a Greet Request\n SumRequest sumRequest = SumRequest\n .newBuilder()\n .setFirstNumber(1)\n .setSecondNumber(2)\n .build();\n\n //Call the RPC and get back a GreetResponse\n SumResponse sumResponse = calculatorClient.sum(sumRequest);\n System.out.println(sumRequest.getFirstNumber() +\"+\" + sumRequest.getSecondNumber() +\"=\"+ sumResponse.getSumResult());\n }", "public static MovieRPCFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MovieRPCFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MovieRPCFutureStub>() {\n @java.lang.Override\n public MovieRPCFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MovieRPCFutureStub(channel, callOptions);\n }\n };\n return MovieRPCFutureStub.newStub(factory, channel);\n }", "public static interface ApplicationManagerFutureClient {\n\n /**\n * <pre>\n * Applications should first be registered to the Handler with the `RegisterApplication` method\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> registerApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * GetApplication returns the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Application> getApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * SetApplication updates the settings for the application. All fields must be supplied.\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> setApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.Application request);\n\n /**\n * <pre>\n * DeleteApplication deletes the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * GetDevice returns the device with the given identifier (app_id and dev_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);\n\n /**\n * <pre>\n * SetDevice creates or updates a device. All fields must be supplied.\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> setDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);\n\n /**\n * <pre>\n * DeleteDevice deletes the device with the given identifier (app_id and dev_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);\n\n /**\n * <pre>\n * GetDevicesForApplication returns all devices that belong to the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> getDevicesForApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * DryUplink simulates processing a downlink message and returns the result\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DryDownlinkResult> dryDownlink(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DryDownlinkMessage request);\n\n /**\n * <pre>\n * DryUplink simulates processing an uplink message and returns the result\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DryUplinkResult> dryUplink(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DryUplinkMessage request);\n\n /**\n * <pre>\n * SimulateUplink simulates an uplink message\n * </pre>\n */\n public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> simulateUplink(\n org.thethingsnetwork.management.proto.HandlerOuterClass.SimulatedUplinkMessage request);\n }", "public static CommunicationServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new CommunicationServiceFutureStub(channel);\n }", "public static BookServicesFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new BookServicesFutureStub(channel);\n }", "public static PolicyServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new PolicyServiceFutureStub(channel);\n }", "public static JwtAuthTestServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<JwtAuthTestServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<JwtAuthTestServiceFutureStub>() {\n @java.lang.Override\n public JwtAuthTestServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new JwtAuthTestServiceFutureStub(channel, callOptions);\n }\n };\n return JwtAuthTestServiceFutureStub.newStub(factory, channel);\n }", "public static PeopleFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<PeopleFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<PeopleFutureStub>() {\n @java.lang.Override\n public PeopleFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new PeopleFutureStub(channel, callOptions);\n }\n };\n return PeopleFutureStub.newStub(factory, channel);\n }", "Stub createStub();", "public static RoutesFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<RoutesFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<RoutesFutureStub>() {\n @java.lang.Override\n public RoutesFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new RoutesFutureStub(channel, callOptions);\n }\n };\n return RoutesFutureStub.newStub(factory, channel);\n }", "public static GreetingServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new GreetingServiceFutureStub(channel);\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Lists nodes.\n * </pre>\n */\n default void listNodes(\n com.google.cloud.tpu.v2alpha1.ListNodesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListNodesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the details of a node.\n * </pre>\n */\n default void getNode(\n com.google.cloud.tpu.v2alpha1.GetNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.Node> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a node.\n * </pre>\n */\n default void createNode(\n com.google.cloud.tpu.v2alpha1.CreateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a node.\n * </pre>\n */\n default void deleteNode(\n com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Stops a node. This operation is only available with single TPU nodes.\n * </pre>\n */\n default void stopNode(\n com.google.cloud.tpu.v2alpha1.StopNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Starts a node.\n * </pre>\n */\n default void startNode(\n com.google.cloud.tpu.v2alpha1.StartNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the configurations of a node.\n * </pre>\n */\n default void updateNode(\n com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists queued resources.\n * </pre>\n */\n default void listQueuedResources(\n com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListQueuedResourcesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets details of a queued resource.\n * </pre>\n */\n default void getQueuedResource(\n com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.QueuedResource>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a QueuedResource TPU instance.\n * </pre>\n */\n default void createQueuedResource(\n com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a QueuedResource TPU instance.\n * </pre>\n */\n default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Resets a QueuedResource TPU instance\n * </pre>\n */\n default void resetQueuedResource(\n com.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getResetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates the Cloud TPU service identity for the project.\n * </pre>\n */\n default void generateServiceIdentity(\n com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateServiceIdentityMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists accelerator types supported by this API.\n * </pre>\n */\n default void listAcceleratorTypes(\n com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAcceleratorTypesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets AcceleratorType.\n * </pre>\n */\n default void getAcceleratorType(\n com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.AcceleratorType>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAcceleratorTypeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists runtime versions supported by this API.\n * </pre>\n */\n default void listRuntimeVersions(\n com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListRuntimeVersionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a runtime version.\n * </pre>\n */\n default void getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetRuntimeVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves the guest attributes for the node.\n * </pre>\n */\n default void getGuestAttributes(\n com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetGuestAttributesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Simulates a maintenance event.\n * </pre>\n */\n default void simulateMaintenanceEvent(\n com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSimulateMaintenanceEventMethod(), responseObserver);\n }\n }", "public static AvroreposFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AvroreposFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AvroreposFutureStub>() {\n @java.lang.Override\n public AvroreposFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AvroreposFutureStub(channel, callOptions);\n }\n };\n return AvroreposFutureStub.newStub(factory, channel);\n }", "public static CurrencyServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new CurrencyServiceFutureStub(channel);\n }", "public static CurrencyServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new CurrencyServiceFutureStub(channel);\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resource on a given Google Cloud project and region.\n * `AzureClient` resources hold client authentication\n * information needed by the Anthos Multicloud API to manage Azure resources\n * on your Azure subscription on your behalf.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureClient(\n com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.\n * </pre>\n */\n default void getAzureClient(\n com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureClient>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resources on a given Google Cloud project and region.\n * </pre>\n */\n default void listAzureClients(\n com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClientsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resource.\n * If the client is used by one or more clusters, deletion will\n * fail and a `FAILED_PRECONDITION` error will be returned.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureClient(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]\n * resource on a given Google Cloud Platform project and region.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureCluster(\n com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * </pre>\n */\n default void updateAzureCluster(\n com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * </pre>\n */\n default void getAzureCluster(\n com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureCluster>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]\n * resources on a given Google Cloud project and region.\n * </pre>\n */\n default void listAzureClusters(\n com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClustersMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * Fails if the cluster has one or more associated\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureCluster(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates a short-lived access token to authenticate to a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * </pre>\n */\n default void generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateAzureAccessTokenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool],\n * attached to a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureNodePool(\n com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].\n * </pre>\n */\n default void updateAzureNodePool(\n com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.\n * </pre>\n */\n default void getAzureNodePool(\n com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureNodePool>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]\n * resources on a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * </pre>\n */\n default void listAzureNodePools(\n com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureNodePoolsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureNodePool(\n com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Returns information, such as supported Azure regions and Kubernetes\n * versions, on a given Google Cloud location.\n * </pre>\n */\n default void getAzureServerConfig(\n com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureServerConfig>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureServerConfigMethod(), responseObserver);\n }\n }", "public static CategoryServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new CategoryServiceFutureStub(channel);\n }", "public static QueryFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<QueryFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<QueryFutureStub>() {\n @java.lang.Override\n public QueryFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new QueryFutureStub(channel, callOptions);\n }\n };\n return QueryFutureStub.newStub(factory, channel);\n }", "public static OrganizationServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<OrganizationServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<OrganizationServiceFutureStub>() {\n @java.lang.Override\n public OrganizationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new OrganizationServiceFutureStub(channel, callOptions);\n }\n };\n return OrganizationServiceFutureStub.newStub(factory, channel);\n }", "public static MsgFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MsgFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MsgFutureStub>() {\n @java.lang.Override\n public MsgFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MsgFutureStub(channel, callOptions);\n }\n };\n return MsgFutureStub.newStub(factory, channel);\n }", "V call() throws StatusRuntimeException;", "public static ForumFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ForumFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ForumFutureStub>() {\n @java.lang.Override\n public ForumFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ForumFutureStub(channel, callOptions);\n }\n };\n return ForumFutureStub.newStub(factory, channel);\n }", "public interface LightFuture<T> {\n /**\n * Returns {@code true} then task is finished.\n */\n boolean isReady();\n\n /**\n * Returns result of work.\n * @throws InterruptedException if waiting for the result to compute fails\n * @throws LightExecutionException if computation ends up with an exception\n */\n T get() throws InterruptedException, LightExecutionException;\n\n /**\n * Applies mapping to result of the task to get a new task.\n * @param mapping function to get new task from the result\n * of the previous\n * @param <U> return value of new task\n * @return new task\n * @throws InterruptedException if waiting for the result to compute fails\n * @throws LightExecutionException if computation ends up with an exception\n */\n @NotNull\n <U> LightFuture<U> thenApply(Function<? super T, U> mapping) throws InterruptedException, LightExecutionException;\n}", "public static TransferFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new TransferFutureStub(channel);\n }", "public static LanguageConstantServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new LanguageConstantServiceFutureStub(channel);\n }", "public interface OperationServiceService extends javax.xml.rpc.Service {\n public java.lang.String getOperationServiceAddress();\n\n public fr.uphf.service.OperationService getOperationService() throws javax.xml.rpc.ServiceException;\n\n public fr.uphf.service.OperationService getOperationService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;\n}", "public interface AsyncOperationHelper {\n\t\n\t/**\n\t * Inserisce l'operazione asincrona e restituisce il risultato dell'invocazione.\n\t * \n\t * @param account l'account relativo alla richiesta\n\t * @param azioneRichiesta l'azione richiesta\n\t * @param ente l'ente\n\t * @param richiedente il richiedente\n\t * \n\t * @return la response del servizio di {@link InserisciOperazioneAsinc}\n\t * \n\t * @throws WebServiceInvocationFailureException nel caso in cui l'invocazione del WebService restituisca un'eccezione\n\t */\n\tInserisciOperazioneAsincResponse inserisciOperazioneAsincrona(Account account, AzioneRichiesta azioneRichiesta, Ente ente, Richiedente richiedente)\n\t\tthrows WebServiceInvocationFailureException;\n\t\n\t/**\n\t * Effettua il polling dell'operazione asincrona.\n\t * \n\t * @param idAzioneAsync l'id dell'azione asincrona\n\t * @param richiedente il richiedente\n\t * \n\t * @return la response del servizio di {@link GetOperazioneAsincResponse}\n\t * \n\t * @throws WebServiceInvocationFailureException nel caso in cui l'invocazione del WebService restituisca un'eccezione\n\t */\n\tGetOperazioneAsincResponse getOperazioneAsinc(Integer idAzioneAsync, Richiedente richiedente) throws WebServiceInvocationFailureException;\n\t\n}", "public static GreeterFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new GreeterFutureStub(channel);\n }", "public Ice.AsyncResult begin_startService(String service, Callback_ServiceManager_startService __cb);", "public interface HealthServiceClient extends ClientProxy {\n\n /**\n * Register a service with the health system\n *\n * @param name name of the service\n * @param ttl ttl on how long before the service timeout.\n * @param timeUnit time unit for the ttl.\n */\n default void register(String name, long ttl, TimeUnit timeUnit) {\n }\n\n\n /**\n * Check in the service so it passes it TTL\n *\n * @param name name of service.\n */\n default void checkInOk(String name) {\n }\n\n /**\n * Check in with a certain TTL.\n *\n * @param name name of service (PASS, WARN, FAIL, UNKNOWN)\n * @param status status\n */\n default void checkIn(String name, HealthStatus status) {\n }\n\n\n /**\n * Checks to see if all services registered with the health system are ok.\n *\n * @return ok\n */\n default Promise<Boolean> ok() {\n final Promise<Boolean> promise = Promises.promise();\n promise.resolve(true);\n return promise;\n }\n\n /**\n * Returns list of healthy nodes.\n *\n * @return promise\n */\n default Promise<List<String>> findHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }\n\n /**\n * Find all nodes\n *\n * @return promise\n */\n default Promise<List<String>> findAllNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }\n\n /**\n * Find all nodes with a certain status.\n *\n * @param queryStatus status you are looking for.\n * @return promise\n */\n default Promise<List<String>> findAllNodesWithStatus(HealthStatus queryStatus) {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n\n }\n\n /**\n * Find all healthy nodes\n *\n * @return promise\n */\n default Promise<List<String>> findNotHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n\n }\n\n\n /**\n * Load all nodes no matter the status.\n *\n * @return promise\n */\n default Promise<List<NodeHealthStat>> loadNodes() {\n final Promise<List<NodeHealthStat>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }\n\n /**\n * Unregister the service\n *\n * @param serviceName name of service\n */\n default void unregister(String serviceName) {\n }\n\n /**\n * Fail with a particular reason.\n *\n * @param name name\n * @param reason reason\n */\n default void failWithReason(final String name, final HealthFailReason reason) {\n }\n\n\n /**\n * Fail with error\n *\n * @param name name\n * @param error error\n */\n default void failWithError(final String name, final Throwable error) {\n }\n\n /**\n * warn with reason\n *\n * @param name name\n * @param reason reason\n */\n default void warnWithReason(final String name, final HealthFailReason reason) {\n }\n\n\n /**\n * warn with error\n *\n * @param name name\n * @param error error\n */\n default void warnWithError(final String name, final Throwable error) {\n }\n\n\n /**\n * Register a service but don't specify a check in TTL.\n *\n * @param name name\n */\n default void registerNoTtl(String name) {\n }\n\n}", "InvocationResult invoke(RemoteService service, MethodInvocation invocation);", "public interface Future\n{\n\n public abstract boolean cancel(boolean flag);\n\n public abstract boolean isCancelled();\n\n public abstract boolean isDone();\n\n public abstract Object get()\n throws ExecutionException, InterruptedException;\n\n public abstract Object get(long l, TimeUnit timeunit)\n throws ExecutionException, InterruptedException, TimeoutException;\n}", "public static CatalogFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new CatalogFutureStub(channel);\n }", "public static QueryFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new QueryFutureStub(channel);\n }", "public static AssetGroupSignalServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceFutureStub>() {\n @java.lang.Override\n public AssetGroupSignalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AssetGroupSignalServiceFutureStub(channel, callOptions);\n }\n };\n return AssetGroupSignalServiceFutureStub.newStub(factory, channel);\n }", "public interface OmniProxyMethods extends JacksonRpcClient {\n Logger log = LoggerFactory.getLogger(OmniProxyMethods.class);\n AddressParser addressParser = AddressParser.getDefault();\n\n /**\n * Determine if remote server is an OmniProxy server.\n * @return true if server is OmniProxy\n */\n boolean isOmniProxyServer();\n\n private List<OmniPropertyInfo> omniProxyListPropertiesSync() throws IOException {\n JavaType javaType = getMapper().getTypeFactory().constructCollectionType(List.class, OmniPropertyInfo.class);\n return send(\"omniproxy.listproperties\", javaType);\n }\n\n default CompletableFuture<List<OmniPropertyInfo>> omniProxyListProperties() {\n return supplyAsync(this::omniProxyListPropertiesSync);\n }\n\n default CompletableFuture<TokenRichList<OmniValue, CurrencyID>> omniProxyGetRichList(CurrencyID id, int size) {\n return supplyAsync(() -> omniProxyGetRichListSync(id, size));\n }\n\n default TokenRichList<OmniValue, CurrencyID> omniProxyGetRichListSync(CurrencyID id, int size) throws IOException {\n // TODO: Can we replace JsonNode with a JavaType for TokenRichList<OmniValue, CurrencyID> ??\n // JavaType javaType = client.getMapper().getTypeFactory().constructParametricType(TokenRichList.class, OmniValue.class, CurrencyID.class);\n\n JsonNode node = send(\"omniproxy.getrichlist\", JsonNode.class, id.getValue(), size);\n if (node instanceof NullNode) {\n log.error(\"Got null node: {}\", node);\n throw new JsonRpcException(\"Got null node\");\n }\n JsonNode listNode = node.get(\"richList\");\n List<TokenRichList.TokenBalancePair<OmniValue>> listOnly =\n (listNode != null)\n ? StreamSupport.stream(listNode.spliterator(), false)\n .map(this::nodeToBalancePair)\n .collect(Collectors.toList())\n : List.of();\n return new TokenRichList<>(\n 0,\n Sha256Hash.ZERO_HASH,\n 0,\n CurrencyID.OMNI,\n listOnly,\n OmniValue.of(node.get(\"otherBalanceTotal\").asText())\n );\n }\n\n default WalletAddressBalance omniProxyGetBalance(Address address) throws IOException {\n return send(\"omniproxy.getbalance\", WalletAddressBalance.class, address);\n }\n\n default OmniJBalances omniProxyGetBalances(List<Address> addresses) throws IOException {\n return send(\"omniproxy.getbalances\", OmniJBalances.class, addresses.toArray());\n }\n\n private TokenRichList.TokenBalancePair<OmniValue> nodeToBalancePair(JsonNode node) {\n Address address = addressParser.parseAddress(node.get(\"address\").asText());\n OmniValue value = OmniValue.of(node.get(\"balance\").asText());\n return new TokenRichList.TokenBalancePair<>(address, value);\n }\n}", "public static QueryProcessGrpcFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<QueryProcessGrpcFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<QueryProcessGrpcFutureStub>() {\n @Override\n public QueryProcessGrpcFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new QueryProcessGrpcFutureStub(channel, callOptions);\n }\n };\n return QueryProcessGrpcFutureStub.newStub(factory, channel);\n }", "public static DConcurrentServerFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new DConcurrentServerFutureStub(channel);\n }", "@Override\n protected List<Invoker<T>> doList(Invocation invocation) throws RpcException {\n if (forbidden){\n throw new RpcException(RpcException.FORBIDDEN_EXCEPTION, \"No provider available from registry \"\n + getUrl().getAddress() + \" for service \" + getConsumerUrl().getServiceKey()\n + \" on consumer \" + NetUtils.getLocalHost() + \" use mandal version is \"\n + Version.getVersion() + \", may be provider disabled or not registerd\");\n }\n List<Invoker<T>> invokers = null;\n Map<String, List<Invoker<T>>> localMethodInvokerMap = this.methodsInvokerMap;\n if (!CollectionUtils.isEmpty(localMethodInvokerMap)){\n String methodName = RpcUtils.getMethodName(invocation);\n Object[] args = RpcUtils.getArgument(invocation);\n if (!Objects.isNull(args) && args.length > 0 && !Objects.isNull(args[0]) && (args[0] instanceof String || args[0].getClass().isEnum())){\n invokers = localMethodInvokerMap.get(methodName + \".\" + args[0]);\n }\n if (Objects.isNull(invokers)){\n invokers = localMethodInvokerMap.get(methodName);\n }\n if (Objects.isNull(invokers)){\n invokers = localMethodInvokerMap.get(Constants.ANY_VALUE);\n }\n if (Objects.isNull(invokers)){\n Iterator<List<Invoker<T>>> iterator = localMethodInvokerMap.values().iterator();\n if (iterator.hasNext()){\n invokers = iterator.next();\n }\n }\n }\n return Objects.isNull(invokers) ? new ArrayList<Invoker<T>>(0) : invokers;\n }", "public static ApplicationManagerFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new ApplicationManagerFutureStub(channel);\n }", "VoidOperation createVoidOperation();", "public static MetricsScopesFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MetricsScopesFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MetricsScopesFutureStub>() {\n @java.lang.Override\n public MetricsScopesFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MetricsScopesFutureStub(channel, callOptions);\n }\n };\n return MetricsScopesFutureStub.newStub(factory, channel);\n }", "public static ArtifactRegistryFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ArtifactRegistryFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ArtifactRegistryFutureStub>() {\n @java.lang.Override\n public ArtifactRegistryFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ArtifactRegistryFutureStub(channel, callOptions);\n }\n };\n return ArtifactRegistryFutureStub.newStub(factory, channel);\n }", "public OperationFutureImpl(\n RetryingFuture<OperationSnapshot> pollingFuture,\n ApiFuture<OperationSnapshot> initialFuture,\n ApiFunction<OperationSnapshot, ResponseT> responseTransformer,\n ApiFunction<OperationSnapshot, MetadataT> metadataTransformer) {\n this.pollingFuture = checkNotNull(pollingFuture);\n this.initialFuture = checkNotNull(initialFuture);\n this.resultFuture = ApiFutures.transform(pollingFuture, responseTransformer, directExecutor());\n this.metadataTransformer = checkNotNull(metadataTransformer);\n }", "public static NoiseMonitorServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new NoiseMonitorServiceFutureStub(channel);\n }", "public Ice.AsyncResult begin_startService(String service, Ice.Callback __cb);", "public static LogFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new LogFutureStub(channel);\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Creates a namespace, and returns the new namespace.\n * </pre>\n */\n default void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all namespaces.\n * </pre>\n */\n default void listNamespaces(\n com.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.servicedirectory.v1beta1.ListNamespacesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListNamespacesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a namespace.\n * </pre>\n */\n default void getNamespace(\n com.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a namespace.\n * </pre>\n */\n default void updateNamespace(\n com.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a namespace. This also deletes all services and endpoints in\n * the namespace.\n * </pre>\n */\n default void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a service, and returns the new service.\n * </pre>\n */\n default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all services belonging to a namespace.\n * </pre>\n */\n default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a service.\n * </pre>\n */\n default void getService(\n com.google.cloud.servicedirectory.v1beta1.GetServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a service.\n * </pre>\n */\n default void updateService(\n com.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a service. This also deletes all endpoints associated with\n * the service.\n * </pre>\n */\n default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an endpoint, and returns the new endpoint.\n * </pre>\n */\n default void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all endpoints.\n * </pre>\n */\n default void listEndpoints(\n com.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListEndpointsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListEndpointsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets an endpoint.\n * </pre>\n */\n default void getEndpoint(\n com.google.cloud.servicedirectory.v1beta1.GetEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an endpoint.\n * </pre>\n */\n default void updateEndpoint(\n com.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an endpoint.\n * </pre>\n */\n default void deleteEndpoint(\n com.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the IAM Policy for a resource\n * </pre>\n */\n default void getIamPolicy(\n com.google.iam.v1.GetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetIamPolicyMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Sets the IAM Policy for a resource\n * </pre>\n */\n default void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSetIamPolicyMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Tests IAM permissions for a resource (namespace, service or\n * service workload only).\n * </pre>\n */\n default void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getTestIamPermissionsMethod(), responseObserver);\n }\n }", "public Ice.AsyncResult begin_startService(String service);", "@RemoteServiceClient(SimpleHttpService.class)\npublic interface ISimpleHttpServiceClient extends IServiceClient {\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_START)\n void bootup(int port);\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_STOP)\n void shutdown();\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_INFO)\n void info(int port);\n}", "public interface StockService extends Service<Stock> {\n List<Stock> selectByDisappear();\n}", "public interface AsynService {\n void asynMethod();\n}", "public ChannelProgressivePromise unvoid()\r\n/* 141: */ {\r\n/* 142:172 */ return this;\r\n/* 143: */ }", "@Deprecated\npublic interface OrderCompanyJournalReadRpcService {\n\n\n}", "void removeFutureInstance();", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n private final int requestId;\n\n private final SettableFuture<com.baichen.jraft.transport.RpcResult> future;\n\n private RepeatableTimer.TimerTask timeout;\n\n private long startTime;\n\n public PendingRequest(T request, int requestId, SettableFuture<com.baichen.jraft.transport.RpcResult> future) {\n this.request = request;\n this.requestId = requestId;\n this.future = future;\n }\n\n public long getStartTime() {\n return startTime;\n }\n\n public void setStartTime(long startTime) {\n this.startTime = startTime;\n }\n\n public void setTimeout(RepeatableTimer.TimerTask timeout) {\n this.timeout = timeout;\n }\n\n public RepeatableTimer.TimerTask getTimeout() {\n return timeout;\n }\n\n public T getRequest() {\n return request;\n }\n\n public int getRequestId() {\n return requestId;\n }\n\n public SettableFuture<com.baichen.jraft.transport.RpcResult> getFuture() {\n return future;\n }\n }\n}", "public static ABCIApplicationFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new ABCIApplicationFutureStub(channel);\n }", "public static void forward()\n {\n throw new UnsupportedOperationException();\n }", "public interface ListenerableFuture<T> extends Future<T> {\n\tpublic void addListener(Runnable runnable);\n}", "public ChannelFuture method_4097() {\n return null;\n }", "public interface RLatitudeServiceAsync {\r\n\r\n\tvoid sayHello(AsyncCallback<String> callback);\r\n\r\n\tvoid publishUser(String name, String firstName, String dateNaissance,\r\n\t\t\tAsyncCallback< String > callback );\r\n\t\r\n\tvoid checkPasswordLoginValidity( String login, String password, AsyncCallback< Boolean > callback );\r\n\t\r\n\tvoid publishAuthentication( String uid, String login, String password, AsyncCallback</*IUser*/Void> callback );\r\n\t\r\n\tvoid connect(String login, String password, AsyncCallback< String > callback);\r\n\t\r\n\tvoid disconnect(String uid, AsyncCallback< Boolean > callback);\r\n\t\r\n\tvoid changeMyVisibility(String uid, boolean visibility,\r\n\t\t\tAsyncCallback<Boolean> callback);\r\n\r\n\tvoid getVisibility(String uid, AsyncCallback<Boolean> callback);\r\n\t\r\n\tvoid setCurrentPostion(String uid, Position position,\r\n\t\t\tAsyncCallback<Void> callback);\r\n\t\r\n\tvoid addContact( String uidUser, String uidContact, AsyncCallback< Void > callback );\r\n\t\r\n\tvoid getContact( String uid,\r\n\t\t\tAsyncCallback< List< ResolvedContact > > callback );\r\n\t\r\n\tvoid getUser( String name, String lastName, AsyncCallback<ResolvedUser> callback );\r\n\t\r\n\tvoid getUser(String uid,AsyncCallback<ResolvedUser> callback);\r\n\r\n\tvoid getPosition( String uidUser, AsyncCallback< Position > callback );\r\n\r\n}", "public static ExtractionServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceStub>() {\n @Override\n public ExtractionServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ExtractionServiceStub(channel, callOptions);\n }\n };\n return ExtractionServiceStub.newStub(factory, channel);\n }", "public AsyncService() {\n super(2, 2);\n }", "@Test\n public void testAddSynchronousResponseHandler() {\n System.out.println(\"addSynchronousResponseHandler\");\n String sa = \"testhandler\";\n SynchronousResponseHandler h = (SpineSOAPRequest r) -> {\n };\n instance.addSynchronousResponseHandler(sa, h);\n }", "@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}", "@RemoteServiceRelativePath(\"greet\")\npublic interface MyBitService extends RemoteService {\n OrderInfoList getOrderInfoList() throws IllegalArgumentException;\n\n CoinInfoList getCoinInfoList() throws IllegalArgumentException;\n\n ExchangeInfoList getExchangeInfoList() throws IllegalArgumentException;\n\n CompareInfoList getCompareInfoList() throws IllegalArgumentException;\n\n String toggleBot() throws IllegalArgumentException;\n\n String setThreshold(Double threshold) throws IllegalArgumentException;\n\n String getThreshold() throws IllegalArgumentException;\n\n public static class App {\n private static MyBitServiceAsync ourInstance = GWT.create(MyBitService.class);\n\n public static synchronized MyBitServiceAsync getInstance() {\n return ourInstance;\n }\n }\n}", "private <T> Future<T> newFuture(final T response) {\n FutureTask<T> t = new FutureTask<T>(new Callable<T>() {\n @Override\n public T call() {\n return response;\n }\n });\n t.run();\n return t;\n }", "OperationContinuation createOperationContinuation();", "public interface AbstractScheduledFutureC02560jD<V> extends ScheduledFuture<V>, AnonymousClass1XI<V> {\n}", "public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}", "public interface OnStart extends FuncUnit0 {\n \n public static final OnStart DoNothing = ()->{};\n \n public static OnStart run(FuncUnit0 runnable) {\n if (runnable == null)\n return null;\n \n return runnable::run;\n }\n \n}", "public Ice.AsyncResult begin_stopService(String service, Callback_ServiceManager_stopService __cb);", "public abstract @Nullable SerializableSupplier<PublisherServiceStub> stubSupplier();", "public ULocale build() {\n/* 1725 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public ChannelFuture method_4120() {\n return null;\n }", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "public interface IMountService extends IInterface {\n /** Local-side IPC implementation stub class. */\n public static abstract class Stub extends Binder implements IMountService {\n private static class Proxy implements IMountService {\n private final IBinder mRemote;\n\n Proxy(IBinder remote) {\n mRemote = remote;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public String getInterfaceDescriptor() {\n return DESCRIPTOR;\n }\n\n /**\n * Registers an IMountServiceListener for receiving async\n * notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_registerListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_unregisterListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageConnected, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Enables / disables USB mass storage. The caller should check\n * actual status of enabling/disabling USB mass storage via\n * StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt((enable ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_setUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is enabled (media is\n * shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Mount external storage at given mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_mountVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Safely unmount external storage at given mount point. The unmount\n * is an asynchronous operation. Applications should register\n * StorageEventListener for storage related status changes.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n _data.writeInt((force ? 1 : 0));\n _data.writeInt((removeEncryption ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Format external storage given a mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_formatVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_getStorageUsers, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createIntArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_getVolumeState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns\n * an int consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(fstype);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(external ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Destroy a secure container, and free up all resources associated\n * with it. NOTE: Ensure all references are released prior to\n * deleting. Returns an int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_destroySecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Finalize a container which has just been created and populated.\n * After finalization, the container is immutable. Returns an int\n * consistent with MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_finalizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Mount a secure container with the specified key and owner UID.\n * Returns an int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(readOnly ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_mountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_isSecureContainerMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Rename an unmounted secure container. Returns an int consistent\n * with MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(oldId);\n _data.writeString(newId);\n mRemote.transact(Stub.TRANSACTION_renameSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Shuts down the MountService and gracefully unmounts all external\n * media. Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((observer != null ? observer.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_shutdown, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_finishMediaUpdate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption\n * key and only allows the calling process's UID access to the\n * contents. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeString(canonicalPath);\n _data.writeString(key);\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_mountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is\n * specified, any program using it will be forcibly killed to\n * unmount the image. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void unmountObb(\n String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeInt((force ? 1 : 0));\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_unmountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_isObbMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_getMountedObbPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns whether the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isExternalStorageEmulated, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getEncryptionState() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getEncryptionState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int decryptStorage(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_decryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int encryptStorage(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_encryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int changeEncryptionPassword(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_changeEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int verifyEncryptionPassword(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getPasswordType() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPasswordType, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public String getPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public void clearPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_clearPassword, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public void setField(String field, String data) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n _data.writeString(data);\n mRemote.transact(Stub.TRANSACTION_setField, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public String getField(String field) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n mRemote.transact(Stub.TRANSACTION_getField, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public boolean isConvertibleToFBE() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt() != 0;\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n StorageVolume[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(uid);\n _data.writeString(packageName);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(StorageVolume.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerFilesystemPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerFilesystemPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Fix permissions in a container which has just been created and\n * populated. Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(gid);\n _data.writeString(filename);\n mRemote.transact(Stub.TRANSACTION_fixPermissionsSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int mkdirs(String callingPkg, String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(callingPkg);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_mkdirs, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int resizeSecureContainer(String id, int sizeMb, String key)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(key);\n mRemote.transact(Stub.TRANSACTION_resizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public long lastMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n long _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_lastMaintenance, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void runMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_runMaintenance, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public void waitForAsecScan() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_waitForAsecScan, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public DiskInfo[] getDisks() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n DiskInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getDisks, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(DiskInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeInfo[] getVolumes(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumes, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeRecord[] getVolumeRecords(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeRecord[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeRecords, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeRecord.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void mount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_mount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unmount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_unmount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void format(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_format, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public long benchmark(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_benchmark, _data, _reply, 0);\n _reply.readException();\n return _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPublic(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPublic, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPrivate(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPrivate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionMixed(String diskId, int ratio) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n _data.writeInt(ratio);\n mRemote.transact(Stub.TRANSACTION_partitionMixed, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeString(nickname);\n mRemote.transact(Stub.TRANSACTION_setVolumeNickname, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeInt(flags);\n _data.writeInt(mask);\n mRemote.transact(Stub.TRANSACTION_setVolumeUserFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetVolume(String fsUuid) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n mRemote.transact(Stub.TRANSACTION_forgetVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetAllVolumes() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_forgetAllVolumes, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setDebugFlags(int _flags, int _mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n _data.writeInt(_mask);\n mRemote.transact(Stub.TRANSACTION_setDebugFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public String getPrimaryStorageUuid() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeStrongBinder((callback != null ? callback.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_setPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(ephemeral ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_destroyUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_addUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_fixateNewestUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_unlockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void lockUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_lockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public boolean isUserKeyUnlocked(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_isUserKeyUnlocked, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void prepareUserStorage(\n String volumeUuid, int userId, int serialNumber, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_prepareUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserStorage(String volumeUuid, int userId, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_destroyUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n ParcelFileDescriptor _result = null;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(name);\n mRemote.transact(Stub.TRANSACTION_mountAppFuse, _data, _reply, 0);\n _reply.readException();\n _result = _reply.<ParcelFileDescriptor>readParcelable(\n ClassLoader.getSystemClassLoader());\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n }\n\n private static final String DESCRIPTOR = \"IMountService\";\n\n static final int TRANSACTION_registerListener = IBinder.FIRST_CALL_TRANSACTION + 0;\n\n static final int TRANSACTION_unregisterListener = IBinder.FIRST_CALL_TRANSACTION + 1;\n\n static final int TRANSACTION_isUsbMassStorageConnected = IBinder.FIRST_CALL_TRANSACTION + 2;\n\n static final int TRANSACTION_setUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 3;\n\n static final int TRANSACTION_isUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 4;\n\n static final int TRANSACTION_mountVolume = IBinder.FIRST_CALL_TRANSACTION + 5;\n\n static final int TRANSACTION_unmountVolume = IBinder.FIRST_CALL_TRANSACTION + 6;\n\n static final int TRANSACTION_formatVolume = IBinder.FIRST_CALL_TRANSACTION + 7;\n\n static final int TRANSACTION_getStorageUsers = IBinder.FIRST_CALL_TRANSACTION + 8;\n\n static final int TRANSACTION_getVolumeState = IBinder.FIRST_CALL_TRANSACTION + 9;\n\n static final int TRANSACTION_createSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 10;\n\n static final int TRANSACTION_finalizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 11;\n\n static final int TRANSACTION_destroySecureContainer = IBinder.FIRST_CALL_TRANSACTION + 12;\n\n static final int TRANSACTION_mountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 13;\n\n static final int TRANSACTION_unmountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 14;\n\n static final int TRANSACTION_isSecureContainerMounted = IBinder.FIRST_CALL_TRANSACTION + 15;\n\n static final int TRANSACTION_renameSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 16;\n\n static final int TRANSACTION_getSecureContainerPath = IBinder.FIRST_CALL_TRANSACTION + 17;\n\n static final int TRANSACTION_getSecureContainerList = IBinder.FIRST_CALL_TRANSACTION + 18;\n\n static final int TRANSACTION_shutdown = IBinder.FIRST_CALL_TRANSACTION + 19;\n\n static final int TRANSACTION_finishMediaUpdate = IBinder.FIRST_CALL_TRANSACTION + 20;\n\n static final int TRANSACTION_mountObb = IBinder.FIRST_CALL_TRANSACTION + 21;\n\n static final int TRANSACTION_unmountObb = IBinder.FIRST_CALL_TRANSACTION + 22;\n\n static final int TRANSACTION_isObbMounted = IBinder.FIRST_CALL_TRANSACTION + 23;\n\n static final int TRANSACTION_getMountedObbPath = IBinder.FIRST_CALL_TRANSACTION + 24;\n\n static final int TRANSACTION_isExternalStorageEmulated = IBinder.FIRST_CALL_TRANSACTION + 25;\n\n static final int TRANSACTION_decryptStorage = IBinder.FIRST_CALL_TRANSACTION + 26;\n\n static final int TRANSACTION_encryptStorage = IBinder.FIRST_CALL_TRANSACTION + 27;\n\n static final int TRANSACTION_changeEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 28;\n\n static final int TRANSACTION_getVolumeList = IBinder.FIRST_CALL_TRANSACTION + 29;\n\n static final int TRANSACTION_getSecureContainerFilesystemPath = IBinder.FIRST_CALL_TRANSACTION + 30;\n\n static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31;\n\n static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32;\n\n static final int TRANSACTION_fixPermissionsSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 33;\n\n static final int TRANSACTION_mkdirs = IBinder.FIRST_CALL_TRANSACTION + 34;\n\n static final int TRANSACTION_getPasswordType = IBinder.FIRST_CALL_TRANSACTION + 35;\n\n static final int TRANSACTION_getPassword = IBinder.FIRST_CALL_TRANSACTION + 36;\n\n static final int TRANSACTION_clearPassword = IBinder.FIRST_CALL_TRANSACTION + 37;\n\n static final int TRANSACTION_setField = IBinder.FIRST_CALL_TRANSACTION + 38;\n\n static final int TRANSACTION_getField = IBinder.FIRST_CALL_TRANSACTION + 39;\n\n static final int TRANSACTION_resizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 40;\n\n static final int TRANSACTION_lastMaintenance = IBinder.FIRST_CALL_TRANSACTION + 41;\n\n static final int TRANSACTION_runMaintenance = IBinder.FIRST_CALL_TRANSACTION + 42;\n\n static final int TRANSACTION_waitForAsecScan = IBinder.FIRST_CALL_TRANSACTION + 43;\n\n static final int TRANSACTION_getDisks = IBinder.FIRST_CALL_TRANSACTION + 44;\n static final int TRANSACTION_getVolumes = IBinder.FIRST_CALL_TRANSACTION + 45;\n static final int TRANSACTION_getVolumeRecords = IBinder.FIRST_CALL_TRANSACTION + 46;\n\n static final int TRANSACTION_mount = IBinder.FIRST_CALL_TRANSACTION + 47;\n static final int TRANSACTION_unmount = IBinder.FIRST_CALL_TRANSACTION + 48;\n static final int TRANSACTION_format = IBinder.FIRST_CALL_TRANSACTION + 49;\n\n static final int TRANSACTION_partitionPublic = IBinder.FIRST_CALL_TRANSACTION + 50;\n static final int TRANSACTION_partitionPrivate = IBinder.FIRST_CALL_TRANSACTION + 51;\n static final int TRANSACTION_partitionMixed = IBinder.FIRST_CALL_TRANSACTION + 52;\n\n static final int TRANSACTION_setVolumeNickname = IBinder.FIRST_CALL_TRANSACTION + 53;\n static final int TRANSACTION_setVolumeUserFlags = IBinder.FIRST_CALL_TRANSACTION + 54;\n static final int TRANSACTION_forgetVolume = IBinder.FIRST_CALL_TRANSACTION + 55;\n static final int TRANSACTION_forgetAllVolumes = IBinder.FIRST_CALL_TRANSACTION + 56;\n\n static final int TRANSACTION_getPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 57;\n static final int TRANSACTION_setPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 58;\n\n static final int TRANSACTION_benchmark = IBinder.FIRST_CALL_TRANSACTION + 59;\n static final int TRANSACTION_setDebugFlags = IBinder.FIRST_CALL_TRANSACTION + 60;\n\n static final int TRANSACTION_createUserKey = IBinder.FIRST_CALL_TRANSACTION + 61;\n static final int TRANSACTION_destroyUserKey = IBinder.FIRST_CALL_TRANSACTION + 62;\n\n static final int TRANSACTION_unlockUserKey = IBinder.FIRST_CALL_TRANSACTION + 63;\n static final int TRANSACTION_lockUserKey = IBinder.FIRST_CALL_TRANSACTION + 64;\n static final int TRANSACTION_isUserKeyUnlocked = IBinder.FIRST_CALL_TRANSACTION + 65;\n\n static final int TRANSACTION_prepareUserStorage = IBinder.FIRST_CALL_TRANSACTION + 66;\n static final int TRANSACTION_destroyUserStorage = IBinder.FIRST_CALL_TRANSACTION + 67;\n\n static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 68;\n\n static final int TRANSACTION_mountAppFuse = IBinder.FIRST_CALL_TRANSACTION + 69;\n\n static final int TRANSACTION_addUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 70;\n\n static final int TRANSACTION_fixateNewestUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 71;\n\n /**\n * Cast an IBinder object into an IMountService interface, generating a\n * proxy if needed.\n */\n public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }\n\n /** Construct the stub at attach it to the interface. */\n public Stub() {\n attachInterface(this, DESCRIPTOR);\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n @Override\n public boolean onTransact(int code, Parcel data, Parcel reply,\n int flags) throws RemoteException {\n switch (code) {\n case INTERFACE_TRANSACTION: {\n reply.writeString(DESCRIPTOR);\n return true;\n }\n case TRANSACTION_registerListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n registerListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unregisterListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n unregisterListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageConnected: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageConnected();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_setUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean enable;\n enable = 0 != data.readInt();\n setUsbMassStorageEnabled(enable);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageEnabled();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_mountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int resultCode = mountVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n boolean force = 0 != data.readInt();\n boolean removeEncrypt = 0 != data.readInt();\n unmountVolume(mountPoint, force, removeEncrypt);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_formatVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int result = formatVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getStorageUsers: {\n data.enforceInterface(DESCRIPTOR);\n String path;\n path = data.readString();\n int[] pids = getStorageUsers(path);\n reply.writeNoException();\n reply.writeIntArray(pids);\n return true;\n }\n case TRANSACTION_getVolumeState: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n String state = getVolumeState(mountPoint);\n reply.writeNoException();\n reply.writeString(state);\n return true;\n }\n case TRANSACTION_createSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String fstype;\n fstype = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean external;\n external = 0 != data.readInt();\n int resultCode = createSecureContainer(id, sizeMb, fstype, key, ownerUid,\n external);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_finalizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int resultCode = finalizeSecureContainer(id);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_destroySecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = destroySecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean readOnly;\n readOnly = data.readInt() != 0;\n int resultCode = mountSecureContainer(id, key, ownerUid, readOnly);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = unmountSecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_isSecureContainerMounted: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean status = isSecureContainerMounted(id);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_renameSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String oldId;\n oldId = data.readString();\n String newId;\n newId = data.readString();\n int resultCode = renameSecureContainer(oldId, newId);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_getSecureContainerPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getSecureContainerList: {\n data.enforceInterface(DESCRIPTOR);\n String[] ids = getSecureContainerList();\n reply.writeNoException();\n reply.writeStringArray(ids);\n return true;\n }\n case TRANSACTION_shutdown: {\n data.enforceInterface(DESCRIPTOR);\n IMountShutdownObserver observer;\n observer = IMountShutdownObserver.Stub.asInterface(data\n .readStrongBinder());\n shutdown(observer);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_finishMediaUpdate: {\n data.enforceInterface(DESCRIPTOR);\n finishMediaUpdate();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountObb: {\n data.enforceInterface(DESCRIPTOR);\n final String rawPath = data.readString();\n final String canonicalPath = data.readString();\n final String key = data.readString();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n mountObb(rawPath, canonicalPath, key, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmountObb: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean force;\n force = 0 != data.readInt();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n unmountObb(filename, force, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isObbMounted: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean status = isObbMounted(filename);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_getMountedObbPath: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n String mountedPath = getMountedObbPath(filename);\n reply.writeNoException();\n reply.writeString(mountedPath);\n return true;\n }\n case TRANSACTION_isExternalStorageEmulated: {\n data.enforceInterface(DESCRIPTOR);\n boolean emulated = isExternalStorageEmulated();\n reply.writeNoException();\n reply.writeInt(emulated ? 1 : 0);\n return true;\n }\n case TRANSACTION_decryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n String password = data.readString();\n int result = decryptStorage(password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_encryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = encryptStorage(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_changeEncryptionPassword: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = changeEncryptionPassword(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getVolumeList: {\n data.enforceInterface(DESCRIPTOR);\n int uid = data.readInt();\n String packageName = data.readString();\n int _flags = data.readInt();\n StorageVolume[] result = getVolumeList(uid, packageName, _flags);\n reply.writeNoException();\n reply.writeTypedArray(result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getSecureContainerFilesystemPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerFilesystemPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getEncryptionState: {\n data.enforceInterface(DESCRIPTOR);\n int result = getEncryptionState();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_fixPermissionsSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int gid;\n gid = data.readInt();\n String filename;\n filename = data.readString();\n int resultCode = fixPermissionsSecureContainer(id, gid, filename);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mkdirs: {\n data.enforceInterface(DESCRIPTOR);\n String callingPkg = data.readString();\n String path = data.readString();\n int result = mkdirs(callingPkg, path);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPasswordType: {\n data.enforceInterface(DESCRIPTOR);\n int result = getPasswordType();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPassword: {\n data.enforceInterface(DESCRIPTOR);\n String result = getPassword();\n reply.writeNoException();\n reply.writeString(result);\n return true;\n }\n case TRANSACTION_clearPassword: {\n data.enforceInterface(DESCRIPTOR);\n clearPassword();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = data.readString();\n setField(field, contents);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = getField(field);\n reply.writeNoException();\n reply.writeString(contents);\n return true;\n }\n case TRANSACTION_isConvertibleToFBE: {\n data.enforceInterface(DESCRIPTOR);\n int resultCode = isConvertibleToFBE() ? 1 : 0;\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_resizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String key;\n key = data.readString();\n int resultCode = resizeSecureContainer(id, sizeMb, key);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_lastMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n long lastMaintenance = lastMaintenance();\n reply.writeNoException();\n reply.writeLong(lastMaintenance);\n return true;\n }\n case TRANSACTION_runMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n runMaintenance();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_waitForAsecScan: {\n data.enforceInterface(DESCRIPTOR);\n waitForAsecScan();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getDisks: {\n data.enforceInterface(DESCRIPTOR);\n DiskInfo[] disks = getDisks();\n reply.writeNoException();\n reply.writeTypedArray(disks, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumes: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeInfo[] volumes = getVolumes(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumeRecords: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeRecord[] volumes = getVolumeRecords(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_mount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n mount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n unmount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_format: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n format(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_benchmark: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n long res = benchmark(volId);\n reply.writeNoException();\n reply.writeLong(res);\n return true;\n }\n case TRANSACTION_partitionPublic: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPublic(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionPrivate: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPrivate(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionMixed: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n int ratio = data.readInt();\n partitionMixed(diskId, ratio);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeNickname: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n String nickname = data.readString();\n setVolumeNickname(volId, nickname);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeUserFlags: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n int _flags = data.readInt();\n int _mask = data.readInt();\n setVolumeUserFlags(volId, _flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetVolume: {\n data.enforceInterface(DESCRIPTOR);\n String fsUuid = data.readString();\n forgetVolume(fsUuid);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetAllVolumes: {\n data.enforceInterface(DESCRIPTOR);\n forgetAllVolumes();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setDebugFlags: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n int _mask = data.readInt();\n setDebugFlags(_flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = getPrimaryStorageUuid();\n reply.writeNoException();\n reply.writeString(volumeUuid);\n return true;\n }\n case TRANSACTION_setPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n IPackageMoveObserver listener = IPackageMoveObserver.Stub.asInterface(\n data.readStrongBinder());\n setPrimaryStorageUuid(volumeUuid, listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_createUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n boolean ephemeral = data.readInt() != 0;\n createUserKey(userId, serialNumber, ephemeral);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n destroyUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_addUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n addUserKeyAuth(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_fixateNewestUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n fixateNewestUserKeyAuth(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unlockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n unlockUserKey(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_lockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n lockUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUserKeyUnlocked: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n boolean result = isUserKeyUnlocked(userId);\n reply.writeNoException();\n reply.writeInt(result ? 1 : 0);\n return true;\n }\n case TRANSACTION_prepareUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int serialNumber = data.readInt();\n int _flags = data.readInt();\n prepareUserStorage(volumeUuid, userId, serialNumber, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int _flags = data.readInt();\n destroyUserStorage(volumeUuid, userId, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountAppFuse: {\n data.enforceInterface(DESCRIPTOR);\n String name = data.readString();\n ParcelFileDescriptor fd = mountAppFuse(name);\n reply.writeNoException();\n reply.writeParcelable(fd, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n }\n return super.onTransact(code, data, reply, flags);\n }\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns an int\n * consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException;\n\n /*\n * Destroy a secure container, and free up all resources associated with it.\n * NOTE: Ensure all references are released prior to deleting. Returns an\n * int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException;\n\n /*\n * Finalize a container which has just been created and populated. After\n * finalization, the container is immutable. Returns an int consistent with\n * MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException;\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException;\n\n /**\n * Format external storage given a mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException;\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException;\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException;\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException;\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException;\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException;\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException;\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is enabled (media is shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException;\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and\n * only allows the calling process's UID access to the contents.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException;\n\n /*\n * Mount a secure container with the specified key and owner UID. Returns an\n * int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException;\n\n /**\n * Mount external storage at given mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException;\n\n /**\n * Registers an IMountServiceListener for receiving async notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException;\n\n /*\n * Rename an unmounted secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException;\n\n /**\n * Enables / disables USB mass storage. The caller should check actual\n * status of enabling/disabling USB mass storage via StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException;\n\n /**\n * Shuts down the MountService and gracefully unmounts all external media.\n * Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer) throws RemoteException;\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified,\n * any program using it will be forcibly killed to unmount the image.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException;\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException;\n\n /**\n * Safely unmount external storage at given mount point. The unmount is an\n * asynchronous operation. Applications should register StorageEventListener\n * for storage related status changes.\n * @param mountPoint the mount point\n * @param force whether or not to forcefully unmount it (e.g. even if programs are using this\n * data currently)\n * @param removeEncryption whether or not encryption mapping should be removed from the volume.\n * This value implies {@code force}.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException;\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException;\n\n /**\n * Returns whether or not the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException;\n\n /** The volume is not encrypted. */\n static final int ENCRYPTION_STATE_NONE = 1;\n /** The volume has been encrypted succesfully. */\n static final int ENCRYPTION_STATE_OK = 0;\n /** The volume is in a bad state.*/\n static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;\n /** Encryption is incomplete */\n static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;\n /** Encryption is incomplete and irrecoverable */\n static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;\n /** Underlying data is corrupt */\n static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;\n\n /**\n * Determines the encryption state of the volume.\n * @return a numerical value. See {@code ENCRYPTION_STATE_*} for possible\n * values.\n * Note that this has been replaced in most cases by the APIs in\n * StorageManager (see isEncryptable and below)\n * This is still useful to get the error state when encryption has failed\n * and CryptKeeper needs to throw up a screen advising the user what to do\n */\n public int getEncryptionState() throws RemoteException;\n\n /**\n * Decrypts any encrypted volumes.\n */\n public int decryptStorage(String password) throws RemoteException;\n\n /**\n * Encrypts storage.\n */\n public int encryptStorage(int type, String password) throws RemoteException;\n\n /**\n * Changes the encryption password.\n */\n public int changeEncryptionPassword(int type, String password)\n throws RemoteException;\n\n /**\n * Verify the encryption password against the stored volume. This method\n * may only be called by the system process.\n */\n public int verifyEncryptionPassword(String password) throws RemoteException;\n\n /**\n * Returns list of all mountable volumes.\n */\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException;\n\n /**\n * Gets the path on the filesystem for the ASEC container itself.\n *\n * @param cid ASEC container ID\n * @return path to filesystem or {@code null} if it's not found\n * @throws RemoteException\n */\n public String getSecureContainerFilesystemPath(String cid) throws RemoteException;\n\n /*\n * Fix permissions in a container which has just been created and populated.\n * Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException;\n\n /**\n * Ensure that all directories along given path exist, creating parent\n * directories as needed. Validates that given path is absolute and that it\n * contains no relative \".\" or \"..\" paths or symlinks. Also ensures that\n * path belongs to a volume managed by vold, and that path is either\n * external storage data or OBB directory belonging to calling app.\n */\n public int mkdirs(String callingPkg, String path) throws RemoteException;\n\n /**\n * Determines the type of the encryption password\n * @return PasswordType\n */\n public int getPasswordType() throws RemoteException;\n\n /**\n * Get password from vold\n * @return password or empty string\n */\n public String getPassword() throws RemoteException;\n\n /**\n * Securely clear password from vold\n */\n public void clearPassword() throws RemoteException;\n\n /**\n * Set a field in the crypto header.\n * @param field field to set\n * @param contents contents to set in field\n */\n public void setField(String field, String contents) throws RemoteException;\n\n /**\n * Gets a field from the crypto header.\n * @param field field to get\n * @return contents of field\n */\n public String getField(String field) throws RemoteException;\n\n public boolean isConvertibleToFBE() throws RemoteException;\n\n public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException;\n\n /**\n * Report the time of the last maintenance operation such as fstrim.\n * @return Timestamp of the last maintenance operation, in the\n * System.currentTimeMillis() time base\n * @throws RemoteException\n */\n public long lastMaintenance() throws RemoteException;\n\n /**\n * Kick off an immediate maintenance operation\n * @throws RemoteException\n */\n public void runMaintenance() throws RemoteException;\n\n public void waitForAsecScan() throws RemoteException;\n\n public DiskInfo[] getDisks() throws RemoteException;\n public VolumeInfo[] getVolumes(int flags) throws RemoteException;\n public VolumeRecord[] getVolumeRecords(int flags) throws RemoteException;\n\n public void mount(String volId) throws RemoteException;\n public void unmount(String volId) throws RemoteException;\n public void format(String volId) throws RemoteException;\n public long benchmark(String volId) throws RemoteException;\n\n public void partitionPublic(String diskId) throws RemoteException;\n public void partitionPrivate(String diskId) throws RemoteException;\n public void partitionMixed(String diskId, int ratio) throws RemoteException;\n\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException;\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException;\n public void forgetVolume(String fsUuid) throws RemoteException;\n public void forgetAllVolumes() throws RemoteException;\n public void setDebugFlags(int flags, int mask) throws RemoteException;\n\n public String getPrimaryStorageUuid() throws RemoteException;\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException;\n\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException;\n public void destroyUserKey(int userId) throws RemoteException;\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException;\n\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void lockUserKey(int userId) throws RemoteException;\n public boolean isUserKeyUnlocked(int userId) throws RemoteException;\n\n public void prepareUserStorage(String volumeUuid, int userId, int serialNumber,\n int flags) throws RemoteException;\n public void destroyUserStorage(String volumeUuid, int userId, int flags) throws RemoteException;\n\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException;\n}" ]
[ "0.5984027", "0.59060603", "0.5868858", "0.5864889", "0.58642966", "0.5838327", "0.57681686", "0.57584965", "0.5710784", "0.5689159", "0.56864905", "0.5673113", "0.5664317", "0.56561303", "0.56532115", "0.5651111", "0.56223786", "0.5620926", "0.5574521", "0.5547793", "0.55302984", "0.55199224", "0.55011195", "0.54905593", "0.548856", "0.5482376", "0.5415882", "0.541556", "0.541347", "0.54077244", "0.54055935", "0.5397328", "0.5390857", "0.5361267", "0.531649", "0.5311108", "0.53058374", "0.53058374", "0.5298586", "0.529797", "0.52909994", "0.52806836", "0.5254635", "0.5241494", "0.5197109", "0.5188997", "0.5171927", "0.51573056", "0.5149896", "0.5149526", "0.5112041", "0.50687855", "0.5042166", "0.50419974", "0.5034974", "0.5031389", "0.50159603", "0.49961308", "0.49925235", "0.49922815", "0.49914256", "0.498809", "0.49763677", "0.4973577", "0.49558634", "0.49456996", "0.49329528", "0.49322835", "0.4930801", "0.49161702", "0.49095827", "0.48695323", "0.48659796", "0.48639074", "0.48627543", "0.4836361", "0.48351178", "0.4834627", "0.48321354", "0.48307335", "0.48213947", "0.48196256", "0.48097125", "0.4804898", "0.48009107", "0.47982582", "0.4785624", "0.47845966", "0.4771892", "0.476445", "0.47600174", "0.4756806", "0.47558242", "0.47429156", "0.4728819", "0.4721786", "0.47176313", "0.47149557", "0.47147042", "0.47103348" ]
0.55064714
22
Service Directory API for registering services. It defines the following resource model: The API has a collection of [Namespace][google.cloud.servicedirectory.v1beta1.Namespace] resources, named `projects/&42;&47;locations/&42;&47;namespaces/&42;`. Each Namespace has a collection of [Service][google.cloud.servicedirectory.v1beta1.Service] resources, named `projects/&42;&47;locations/&42;&47;namespaces/&42;&47;services/&42;`. Each Service has a collection of [Endpoint][google.cloud.servicedirectory.v1beta1.Endpoint] resources, named `projects/&42;&47;locations/&42;&47;namespaces/&42;&47;services/&42;&47;endpoints/&42;`.
public interface AsyncService { /** * * * <pre> * Creates a namespace, and returns the new namespace. * </pre> */ default void createNamespace( com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateNamespaceMethod(), responseObserver); } /** * * * <pre> * Lists all namespaces. * </pre> */ default void listNamespaces( com.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest request, io.grpc.stub.StreamObserver< com.google.cloud.servicedirectory.v1beta1.ListNamespacesResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListNamespacesMethod(), responseObserver); } /** * * * <pre> * Gets a namespace. * </pre> */ default void getNamespace( com.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetNamespaceMethod(), responseObserver); } /** * * * <pre> * Updates a namespace. * </pre> */ default void updateNamespace( com.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getUpdateNamespaceMethod(), responseObserver); } /** * * * <pre> * Deletes a namespace. This also deletes all services and endpoints in * the namespace. * </pre> */ default void deleteNamespace( com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteNamespaceMethod(), responseObserver); } /** * * * <pre> * Creates a service, and returns the new service. * </pre> */ default void createService( com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateServiceMethod(), responseObserver); } /** * * * <pre> * Lists all services belonging to a namespace. * </pre> */ default void listServices( com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListServicesMethod(), responseObserver); } /** * * * <pre> * Gets a service. * </pre> */ default void getService( com.google.cloud.servicedirectory.v1beta1.GetServiceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); } /** * * * <pre> * Updates a service. * </pre> */ default void updateService( com.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getUpdateServiceMethod(), responseObserver); } /** * * * <pre> * Deletes a service. This also deletes all endpoints associated with * the service. * </pre> */ default void deleteService( com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteServiceMethod(), responseObserver); } /** * * * <pre> * Creates an endpoint, and returns the new endpoint. * </pre> */ default void createEndpoint( com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateEndpointMethod(), responseObserver); } /** * * * <pre> * Lists all endpoints. * </pre> */ default void listEndpoints( com.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListEndpointsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListEndpointsMethod(), responseObserver); } /** * * * <pre> * Gets an endpoint. * </pre> */ default void getEndpoint( com.google.cloud.servicedirectory.v1beta1.GetEndpointRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetEndpointMethod(), responseObserver); } /** * * * <pre> * Updates an endpoint. * </pre> */ default void updateEndpoint( com.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getUpdateEndpointMethod(), responseObserver); } /** * * * <pre> * Deletes an endpoint. * </pre> */ default void deleteEndpoint( com.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteEndpointMethod(), responseObserver); } /** * * * <pre> * Gets the IAM Policy for a resource * </pre> */ default void getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetIamPolicyMethod(), responseObserver); } /** * * * <pre> * Sets the IAM Policy for a resource * </pre> */ default void setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getSetIamPolicyMethod(), responseObserver); } /** * * * <pre> * Tests IAM permissions for a resource (namespace, service or * service workload only). * </pre> */ default void testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getTestIamPermissionsMethod(), responseObserver); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Service> createServices();", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder() {\n return getServicesFieldBuilder().addBuilder(\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder() {\n return getServicesFieldBuilder().addBuilder(\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public abstract T addService(ServerServiceDefinition service);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public void registerService(String serviceName, Object service);", "List<Service> services();", "public List<CatalogService> getService(String service);", "public Set getAssignableServices() throws SMSException {\n // Get all service names, and remove the assigned services\n // Set containing service names that has organization schema\n Set orgSchemaServiceNames = new HashSet();\n try {\n for (Iterator names = getServiceNames(token).iterator(); names\n .hasNext();) {\n String serviceName = (String) names.next();\n ServiceSchemaManagerImpl ssmi = ServiceSchemaManagerImpl\n .getInstance(token, serviceName, \n ServiceManager.getVersion(serviceName));\n if (ssmi.getSchema(SchemaType.ORGANIZATION) != null) {\n // Need to check if the user has permission\n // to add/assign the service\n StringBuffer d = new StringBuffer(100);\n // Need to construct\n // \"ou=default,ou=organizationconfig,ou=1.0,ou=\"\n d.append(SMSEntry.PLACEHOLDER_RDN).append(SMSEntry.EQUALS)\n .append(SMSUtils.DEFAULT).append(SMSEntry.COMMA)\n .append(CreateServiceConfig.ORG_CONFIG_NODE)\n .append(SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS).append(\"1.0\").append(\n SMSEntry.COMMA).append(\n SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS);\n // Append service name, and org name\n d.append(serviceName);\n if (!orgDN.equalsIgnoreCase(DNMapper.serviceDN)) {\n d.append(SMSEntry.COMMA).append(SMSEntry.SERVICES_NODE);\n }\n d.append(SMSEntry.COMMA).append(orgDN);\n try {\n // The function will throw exception if\n // user does not have permissions\n SMSEntry.getDelegationPermission(token, d.toString(),\n SMSEntry.modifyActionSet);\n orgSchemaServiceNames.add(serviceName);\n } catch (SMSException smse) {\n if (smse.getExceptionCode() != \n SMSException.STATUS_NO_PERMISSION) \n {\n throw (smse);\n }\n }\n }\n }\n // Need to remove mandatory services\n // %%% TODO. Need to have SMS Service with this information\n // orgSchemaServiceNames.removeAll(getMandatoryServices());\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager.\"\n + \"getAssignableServices(): SSOException\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n // Remove assigned services\n HashSet answer = new HashSet(orgSchemaServiceNames);\n answer.removeAll(getAssignedServices());\n return (answer);\n }", "void putServiceNameServiceInfos(net.zyuiop.ovhapi.api.objects.services.Service param0, java.lang.String serviceName) throws java.io.IOException;", "public Builder addAllServices(\n java.lang.Iterable<? extends go.micro.runtime.RuntimeOuterClass.Service> values) {\n if (servicesBuilder_ == null) {\n ensureServicesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, services_);\n onChanged();\n } else {\n servicesBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Builder addAllServices(\n java.lang.Iterable<? extends go.micro.runtime.RuntimeOuterClass.Service> values) {\n if (servicesBuilder_ == null) {\n ensureServicesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, services_);\n onChanged();\n } else {\n servicesBuilder_.addAllMessages(values);\n }\n return this;\n }", "@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }", "public void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "public void registerServer() {\n log.info(\"Registering service {}\", serviceName);\n cancelDiscovery = discoveryService.register(\n ResolvingDiscoverable.of(new Discoverable(serviceName, httpService.getBindAddress())));\n }", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "public List<ServerServices> listServerServices();", "ServicesPackage getServicesPackage();", "public void addServiceEntriesToDD(String serviceName, String serviceEndpointInterface, String serviceEndpoint);", "private void registerLocalService() {\n WifiP2pDnsSdServiceInfo serviceInfo =\n WifiP2pDnsSdServiceInfo.newInstance(WifiDirectUtilities.SERVICE_NAME,\n \"_\" + WifiDirectUtilities.SERVICE_TYPE + \"._\" + WifiDirectUtilities.SERVICE_PROTOCOL,\n WifiDirectUtilities.SERVICE_RECORD);\n\n // Add the local service, sending the service info, network channel,\n // and listener that will be used to indicate success or failure of\n // the request.\n mManager.addLocalService(mChannel, serviceInfo, new WifiP2pManager.ActionListener() {\n @Override\n public void onSuccess() {\n // Command successful! Code isn't necessarily needed here,\n // Unless you want to update the UI or add logging statements.\n }\n\n @Override\n public void onFailure(int arg0) {\n // Command failed. Check for P2P_UNSUPPORTED, ERROR, or BUSY\n }\n });\n WifiDirectDnsSdListener listener = new WifiDirectDnsSdListener(this);\n mManager.setDnsSdResponseListeners(mChannel, listener, listener);\n }", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "public com.vodafone.global.er.decoupling.binding.request.CatalogPackageFullType.ServiceNamesType createCatalogPackageFullTypeServiceNamesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.CatalogPackageFullTypeImpl.ServiceNamesTypeImpl();\n }", "Collection<Service> getAllPublishedService();", "private static StandardServiceRegistry configureServiceRegistry() {\n return new StandardServiceRegistryBuilder()\n .applySettings(getProperties())\n .build();\n }", "public Map<String, List<String>> getServices();", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder(\n int index) {\n return getServicesFieldBuilder().addBuilder(\n index, go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder(\n int index) {\n return getServicesFieldBuilder().addBuilder(\n index, go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "private void buildServiceMapping(EndpointMetaData endpoint)\n {\n QName origQName = endpoint.getServiceMetaData().getServiceName();\n String serviceInterfaceName = endpoint.getServiceEndpointInterface().getPackage().getName() + \".\" + origQName.getLocalPart();\n QName serviceQName = new QName(origQName.getNamespaceURI(), origQName.getLocalPart(), \"serviceNS\");\n\n ServiceInterfaceMapping serviceMapping = new ServiceInterfaceMapping(javaWsdlMapping);\n serviceMapping.setServiceInterface(serviceInterfaceName);\n serviceMapping.setWsdlServiceName(serviceQName);\n\n String endpointName = endpoint.getPortName().getLocalPart();\n PortMapping portMapping = new PortMapping(serviceMapping);\n portMapping.setJavaPortName(endpointName);\n portMapping.setPortName(endpointName);\n serviceMapping.addPortMapping(portMapping);\n\n javaWsdlMapping.addServiceInterfaceMappings(serviceMapping);\n\n String interfaceName = endpoint.getPortTypeName().getLocalPart();\n ServiceEndpointInterfaceMapping seiMapping = new ServiceEndpointInterfaceMapping(javaWsdlMapping);\n seiMapping.setServiceEndpointInterface(endpoint.getServiceEndpointInterfaceName());\n seiMapping.setWsdlPortType(new QName(wsdl.getTargetNamespace(), interfaceName, \"portTypeNS\"));\n seiMapping.setWsdlBinding(new QName(wsdl.getTargetNamespace(), interfaceName + \"Binding\", \"bindingNS\"));\n for (OperationMetaData operation : endpoint.getOperations())\n {\n ServiceEndpointMethodMapping methodMapping = new ServiceEndpointMethodMapping(seiMapping);\n methodMapping.setJavaMethodName(operation.getJavaName());\n methodMapping.setWsdlOperation(operation.getQName().getLocalPart());\n boolean isWrapped = operation.isDocumentWrapped();\n methodMapping.setWrappedElement(isWrapped);\n int i = 0;\n for (ParameterMetaData param : operation.getParameters())\n {\n if (isWrapped && param.isInHeader() == false)\n {\n List<WrappedParameter> wrappedParameters = param.getWrappedParameters();\n for (WrappedParameter wrapped : wrappedParameters)\n {\n String type = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), endpoint.getClassLoader());\n String name = wrapped.getName().getLocalPart();\n\n buildParamMapping(methodMapping, interfaceName, operation, name, type, \"IN\", false, i++);\n }\n }\n else\n {\n String name = param.getXmlName().getLocalPart();\n String type = JavaUtils.convertJVMNameToSourceName(param.getJavaTypeName(), endpoint.getClassLoader());\n buildParamMapping(methodMapping, interfaceName, operation, name, type, param.getMode().toString(), param.isInHeader(), i++);\n }\n }\n\n ParameterMetaData returnParam = operation.getReturnParameter();\n if (returnParam != null && ((! isWrapped) || (! returnParam.getWrappedParameters().isEmpty())))\n {\n String name, type;\n if (isWrapped)\n {\n WrappedParameter wrappedParameter = returnParam.getWrappedParameters().get(0);\n name = wrappedParameter.getName().getLocalPart();\n type = wrappedParameter.getType();\n }\n else\n {\n name = returnParam.getXmlName().getLocalPart();\n type = returnParam.getJavaTypeName();\n }\n\n type = JavaUtils.convertJVMNameToSourceName(type, endpoint.getClassLoader());\n\n buildReturnParamMapping(methodMapping, interfaceName, operation, name, type);\n }\n seiMapping.addServiceEndpointMethodMapping(methodMapping);\n\n for(FaultMetaData fmd : operation.getFaults())\n {\n JavaXmlTypeMapping typeMapping = mappedTypes.get(fmd.getXmlType());\n if (typeMapping == null)\n continue;\n\n String javaTypeName = fmd.getJavaTypeName();\n if (mappedExceptions.contains(javaTypeName))\n continue;\n\n mappedExceptions.add(javaTypeName);\n\n ExceptionMapping mapping = new ExceptionMapping(javaWsdlMapping);\n\n mapping.setExceptionType(javaTypeName);\n QName name = new QName(wsdl.getTargetNamespace(), fmd.getXmlName().getLocalPart());\n mapping.setWsdlMessage(name);\n\n // Variable mappings generated from SchemaTypesCreater have their order preserved\n for (VariableMapping variableMapping : typeMapping.getVariableMappings())\n mapping.addConstructorParameter(variableMapping.getXmlElementName());\n\n javaWsdlMapping.addExceptionMappings(mapping);\n }\n }\n\n javaWsdlMapping.addServiceEndpointInterfaceMappings(seiMapping);\n\n // Add package mapping for SEI\n String name = endpoint.getServiceEndpointInterface().getPackage().getName();\n String namespace = packageNamespaceMap.get(name);\n if (namespace == null)\n namespace = WSDLUtils.getInstance().getTypeNamespace(name);\n addPackageMapping(name, namespace);\n }", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "public interface ConsulService {\n\n /**\n * Deregisters a node, service, or check\n */\n public void deregister(SvcInfo svcInfo);\n\n /**\n * Lists known datacenters\n * @return\n */\n public List<String> getDatacenters();\n\n /**\n * Lists nodes in a given DC\n * @return\n */\n public List<Node> getNodes();\n\n /**\n * Lists services in a given DC\n */\n public Map<String, List<String>> getServices();\n\n /**\n * Lists the nodes in a given service\n * @return\n */\n public List<CatalogService> getService(String service);\n\n /**\n * Lists the services provided by a node\n */\n public CatalogNode getNode(String node);\n \n\n\n /**\n * Returns the health info of a node\n */\n public List<HealthCheck> getNodeChecks(String node);\n\n /**\n * Returns the checks of a service\n */\n public List<HealthCheck> getServiceChecks(String service);\n\n /**\n * Returns the nodes and health info of a service\n */\n public List<ServiceHealth> getServiceInstances(String service);\n\n /**\n * Returns the checks in a given state\n */\n public List<HealthCheck> getChecksByState(String state);\n\n}", "public Builder addServices(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addServices(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(value);\n }\n return this;\n }", "ServiceRegistry() {\n mRegistrations = new TreeMap<String, ServiceFactory>();\n }", "private void createServiceDirectory(String serviceID){\n \n String changedServiceID = serviceID.replaceAll(\"\\\\.\",\"&\");\n changedServiceID = changedServiceID.replaceAll(\":\",\"&\");\n \n //Create directory to store output files of service\n File dir = new File(sessionDirectory.getPath()+\"/\"+changedServiceID);\n dir.mkdir();\n \n //Add created directory to map \"servicesDirectories\"\n servicesDirectories.put(serviceID,dir);\n \n }", "@Host(\"{endpoint}\")\n @ServiceInterface(name = \"SearchServiceClientD\")\n public interface DataSourcesService {\n @Put(\"/datasources('{dataSourceName}')\")\n @ExpectedResponses({200, 201})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Mono<Response<SearchIndexerDataSourceConnection>> createOrUpdate(\n @HostParam(\"endpoint\") String endpoint,\n @PathParam(\"dataSourceName\") String dataSourceName,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @HeaderParam(\"If-Match\") String ifMatch,\n @HeaderParam(\"If-None-Match\") String ifNoneMatch,\n @HeaderParam(\"Prefer\") String prefer,\n @QueryParam(\"api-version\") String apiVersion,\n @QueryParam(\"ignoreResetRequirements\") Boolean skipIndexerResetRequirementForCache,\n @HeaderParam(\"Accept\") String accept,\n @BodyParam(\"application/json\") SearchIndexerDataSourceConnection dataSource,\n Context context);\n\n @Put(\"/datasources('{dataSourceName}')\")\n @ExpectedResponses({200, 201})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Response<SearchIndexerDataSourceConnection> createOrUpdateSync(\n @HostParam(\"endpoint\") String endpoint,\n @PathParam(\"dataSourceName\") String dataSourceName,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @HeaderParam(\"If-Match\") String ifMatch,\n @HeaderParam(\"If-None-Match\") String ifNoneMatch,\n @HeaderParam(\"Prefer\") String prefer,\n @QueryParam(\"api-version\") String apiVersion,\n @QueryParam(\"ignoreResetRequirements\") Boolean skipIndexerResetRequirementForCache,\n @HeaderParam(\"Accept\") String accept,\n @BodyParam(\"application/json\") SearchIndexerDataSourceConnection dataSource,\n Context context);\n\n @Delete(\"/datasources('{dataSourceName}')\")\n @ExpectedResponses({204, 404})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Mono<Response<Void>> delete(\n @HostParam(\"endpoint\") String endpoint,\n @PathParam(\"dataSourceName\") String dataSourceName,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @HeaderParam(\"If-Match\") String ifMatch,\n @HeaderParam(\"If-None-Match\") String ifNoneMatch,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n Context context);\n\n @Delete(\"/datasources('{dataSourceName}')\")\n @ExpectedResponses({204, 404})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Response<Void> deleteSync(\n @HostParam(\"endpoint\") String endpoint,\n @PathParam(\"dataSourceName\") String dataSourceName,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @HeaderParam(\"If-Match\") String ifMatch,\n @HeaderParam(\"If-None-Match\") String ifNoneMatch,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n Context context);\n\n @Get(\"/datasources('{dataSourceName}')\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Mono<Response<SearchIndexerDataSourceConnection>> get(\n @HostParam(\"endpoint\") String endpoint,\n @PathParam(\"dataSourceName\") String dataSourceName,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n Context context);\n\n @Get(\"/datasources('{dataSourceName}')\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Response<SearchIndexerDataSourceConnection> getSync(\n @HostParam(\"endpoint\") String endpoint,\n @PathParam(\"dataSourceName\") String dataSourceName,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n Context context);\n\n @Get(\"/datasources\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Mono<Response<ListDataSourcesResult>> list(\n @HostParam(\"endpoint\") String endpoint,\n @QueryParam(\"$select\") String select,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n Context context);\n\n @Get(\"/datasources\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Response<ListDataSourcesResult> listSync(\n @HostParam(\"endpoint\") String endpoint,\n @QueryParam(\"$select\") String select,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n Context context);\n\n @Post(\"/datasources\")\n @ExpectedResponses({201})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Mono<Response<SearchIndexerDataSourceConnection>> create(\n @HostParam(\"endpoint\") String endpoint,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n @BodyParam(\"application/json\") SearchIndexerDataSourceConnection dataSource,\n Context context);\n\n @Post(\"/datasources\")\n @ExpectedResponses({201})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Response<SearchIndexerDataSourceConnection> createSync(\n @HostParam(\"endpoint\") String endpoint,\n @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId,\n @QueryParam(\"api-version\") String apiVersion,\n @HeaderParam(\"Accept\") String accept,\n @BodyParam(\"application/json\") SearchIndexerDataSourceConnection dataSource,\n Context context);\n }", "protected ServiceBundler getServices() {\n return services;\n }", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }", "Fog_Services createFog_Services();", "public Services(ArrayList<ServiceTypes> serviceTypes) {\n this.indexes = new ArrayList<Integer>();\n this.services = new ArrayList<String>();\n for(int i = 0; i < serviceTypes.size(); i++) {\n this.indexes.add(serviceTypes.get(i).getValue()); // Retrieve the index of the Service\n this.services.add(serviceTypes.get(i).getKey()); // Retrieve the name of the Service\n }\n\n }", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();", "@Fluent\n@Beta(Beta.SinceVersion.V1_2_0)\npublic interface SearchService extends\n GroupableResource<SearchServiceManager, SearchServiceInner>,\n Refreshable<SearchService>,\n Updatable<SearchService.Update> {\n\n /***********************************************************\n * Getters\n ***********************************************************/\n\n /**\n * The hosting mode value.\n * <p>\n * Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that\n * allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the\n * standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'.\n *\n * @return the hosting mode value.\n */\n HostingMode hostingMode();\n\n /**\n * @return the number of partitions used by the service\n */\n int partitionCount();\n\n /**\n * The state of the last provisioning operation performed on the Search service.\n * <p>\n * Provisioning is an intermediate state that occurs while service capacity is being established. After capacity\n * is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll\n * provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search\n * Service operation to see when an operation is completed. If you are using the free service, this value tends\n * to come back as 'succeeded' directly in the call to Create Search service. This is because the free service uses\n * capacity that is already set up.\n *\n * @return the provisioning state of the resource\n */\n ProvisioningState provisioningState();\n\n /**\n * @return the number of replicas used by the service\n */\n int replicaCount();\n\n /**\n * @return the SKU type of the service\n */\n Sku sku();\n\n /**\n * The status of the Search service.\n * <p>\n * Possible values include:\n * 'running': the Search service is running and no provisioning operations are underway.\n * 'provisioning': the Search service is being provisioned or scaled up or down.\n * 'deleting': the Search service is being deleted.\n * 'degraded': the Search service is degraded. This can occur when the underlying search units are not healthy.\n * The Search service is most likely operational, but performance might be slow and some requests might be dropped.\n * 'disabled': the Search service is disabled. In this state, the service will reject all API requests.\n * 'error': the Search service is in an error state. If your service is in the degraded, disabled, or error states,\n * it means the Azure Search team is actively investigating the underlying issue. Dedicated services in these\n * states are still chargeable based on the number of search units provisioned.\n *\n * @return the status of the service\n */\n SearchServiceStatus status();\n\n /**\n * @return the details of the status.\n */\n String statusDetails();\n\n /**\n * The primary and secondary admin API keys for the specified Azure Search service.\n *\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @throws CloudException thrown if the request is rejected by server\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent\n * @return the AdminKeys object if successful\n */\n AdminKeys getAdminKeys();\n\n /**\n * The primary and secondary admin API keys for the specified Azure Search service.\n *\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @return a representation of the future computation of this call\n */\n Observable<AdminKeys> getAdminKeysAsync();\n\n /**\n * Returns the list of query API keys for the given Azure Search service.\n *\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @throws CloudException thrown if the request is rejected by server\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent\n * @return the List&lt;QueryKey&gt; object if successful\n */\n List<QueryKey> listQueryKeys();\n\n /**\n * Returns the list of query API keys for the given Azure Search service.\n *\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @return the observable to the List&lt;QueryKey&gt; object\n */\n Observable<QueryKey> listQueryKeysAsync();\n\n\n /***********************************************************\n * Actions\n ***********************************************************/\n\n /**\n * Regenerates either the primary or secondary admin API key.\n * <p>\n * You can only regenerate one key at a time.\n *\n * @param keyKind specifies which key to regenerate\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @throws CloudException thrown if the request is rejected by server\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent\n * @return the AdminKeys object if successful\n */\n AdminKeys regenerateAdminKeys(AdminKeyKind keyKind);\n\n /**\n * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.\n *\n * @param keyKind Specifies which key to regenerate\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @return a representation of the future computation of this call\n */\n Observable<AdminKeys> regenerateAdminKeysAsync(AdminKeyKind keyKind);\n\n /**\n * Regenerates either the primary or secondary admin API key.\n * <p>\n * You can only regenerate one key at a time.\n *\n * @param name The name of the new query API key.\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @throws CloudException thrown if the request is rejected by server\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent\n * @return the &lt;QueryKey&gt; object if successful\n */\n QueryKey createQueryKey(String name);\n\n /**\n * Regenerates either the primary or secondary admin API key.\n * <p>\n * You can only regenerate one key at a time.\n *\n * @param name The name of the new query API key.\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @return a representation of the future computation of this call\n */\n Observable<QueryKey> createQueryKeyAsync(String name);\n\n /**\n * Deletes the specified query key.\n * <p>\n * Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then\n * recreate it.\n *\n * @param key The query key to be deleted. Query keys are identified by value, not by name.\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @throws CloudException thrown if the request is rejected by server\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent\n */\n void deleteQueryKey(String key);\n\n /**\n * Deletes the specified query key.\n * <p>\n * Unlike admin keys, query keys are not regenerated. The process for\n * regenerating a query key is to delete and then recreate it.\n *\n * @param key The query key to be deleted. Query keys are identified by value, not by name.\n * @throws IllegalArgumentException thrown if parameters fail the validation\n * @return a representation of the future computation of this call\n */\n Completable deleteQueryKeyAsync(String key);\n\n\n /**\n * The entirety of the Search service definition.\n */\n interface Definition extends\n DefinitionStages.Blank,\n DefinitionStages.WithGroup,\n DefinitionStages.WithSku,\n DefinitionStages.WithPartitionsAndCreate,\n DefinitionStages.WithReplicasAndCreate,\n DefinitionStages.WithCreate {\n }\n\n /**\n * Grouping of virtual network definition stages.\n */\n interface DefinitionStages {\n /**\n * The first stage of the Search service definition.\n */\n interface Blank\n extends GroupableResource.DefinitionWithRegion<WithGroup> {\n }\n\n /**\n * The stage of the Search service definition allowing to specify the resource group.\n */\n interface WithGroup\n extends GroupableResource.DefinitionStages.WithGroup<DefinitionStages.WithSku> {\n }\n\n /**\n * The stage of the Search service definition allowing to specify the SKU.\n */\n interface WithSku {\n /**\n * Specifies the SKU of the Search service.\n *\n * @param skuName the SKU\n * @return the next stage of the definition\n */\n WithCreate withSku(SkuName skuName);\n\n /**\n * Specifies to use a free SKU type for the Search service.\n *\n * @return the next stage of the definition\n */\n WithCreate withFreeSku();\n\n /**\n * Specifies to use a basic SKU type for the Search service.\n *\n * @return the next stage of the definition\n */\n WithReplicasAndCreate withBasicSku();\n\n /**\n * Specifies to use a standard SKU type for the Search service.\n *\n * @return the next stage of the definition\n */\n WithPartitionsAndCreate withStandardSku();\n }\n\n interface WithReplicasAndCreate extends WithCreate {\n /**\n * Specifies the SKU of the Search service.\n *\n * @param count the number of replicas to be created\n * @return the next stage of the definition\n */\n WithCreate withReplicaCount(int count);\n }\n\n interface WithPartitionsAndCreate extends WithReplicasAndCreate {\n /**\n * Specifies the SKU of the Search service.\n *\n * @param count the number of partitions to be created\n * @return the next stage of the definition\n */\n WithReplicasAndCreate withPartitionCount(int count);\n }\n\n /**\n * The stage of the definition which contains all the minimum required inputs for the resource to be created\n * (via {@link WithCreate#create()}), but also allows for any other optional settings to be specified.\n */\n interface WithCreate extends\n Creatable<SearchService>,\n Resource.DefinitionWithTags<WithCreate> {\n }\n }\n\n /**\n * The template for a Search service update operation, containing all the settings that can be modified.\n */\n interface Update extends\n Appliable<SearchService>,\n Resource.UpdateWithTags<Update>,\n UpdateStages.WithReplicaCount,\n UpdateStages.WithPartitionCount {\n }\n\n /**\n * Grouping of all the Search service update stages.\n */\n interface UpdateStages {\n\n /**\n * The stage of the Search service update allowing to modify the number of replicas used.\n */\n interface WithReplicaCount {\n /**\n * Specifies the replicas count of the Search service.\n *\n * @param count the replicas count; replicas distribute workloads across the service. You need 2 or more to support high availability (applies to Basic and Standard tiers only)\n * @return the next stage of the definition\n */\n Update withReplicaCount(int count);\n }\n\n /**\n * The stage of the Search service update allowing to modify the number of partitions used.\n */\n interface WithPartitionCount {\n /**\n * Specifies the Partitions count of the Search service.\n * @param count the partitions count; Partitions allow for scaling of document counts as well as faster data ingestion by spanning your index over multiple Azure Search Units (applies to Standard tiers only)\n * @return the next stage of the definition\n */\n Update withPartitionCount(int count);\n }\n }\n}", "@Test\n\tvoid testAllNamespacesTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = true;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(NAMESPACE_ALL);\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 2);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertTrue(result.contains(\"service-b\"));\n\t}", "public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();", "public ServerServices searchServerService(String serviceName, int servId);", "@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }", "public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }", "public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }", "@Override\n public Collection<Object> createComponents(\n Client client,\n ClusterService clusterService,\n ThreadPool threadPool,\n ResourceWatcherService resourceWatcherService,\n ScriptService scriptService,\n NamedXContentRegistry xContentRegistry,\n Environment environment,\n NodeEnvironment nodeEnvironment,\n NamedWriteableRegistry namedWriteableRegistry,\n IndexNameExpressionResolver indexNameExpressionResolver) {\n service = new StoredSynonymsService(client, clusterService, \".stored_synonyms\");\n\n List<Object> components = new ArrayList<>();\n components.add(service);\n\n return components;\n }", "public JerseyConfig() {\n\t\tregister(StudentService.class);\n\t\tregister(PromotionService.class);\n\t\tregister(GroupService.class);\n\t\tregister(RoleService.class);\n\t\tregister(RightService.class);\n\t\tregister(AccountService.class);\n\t\tregister(TimesheetService.class);\n\t\tthis.configureSwagger();\n\t}", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "void addService(ServiceInfo serviceInfo);", "interface ServicesService {\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services listAvailableSkus\" })\n @POST(\"subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus\")\n Observable<Response<ResponseBody>> listAvailableSkus(@Path(\"subscriptionId\") String subscriptionId, @Path(\"location\") String location, @Query(\"api-version\") String apiVersion, @Body AvailableSkuRequest availableSkuRequest, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services listAvailableSkusByResourceGroup\" })\n @POST(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus\")\n Observable<Response<ResponseBody>> listAvailableSkusByResourceGroup(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"location\") String location, @Query(\"api-version\") String apiVersion, @Body AvailableSkuRequest availableSkuRequest, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services validateAddressMethod\" })\n @POST(\"subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress\")\n Observable<Response<ResponseBody>> validateAddressMethod(@Path(\"subscriptionId\") String subscriptionId, @Path(\"location\") String location, @Query(\"api-version\") String apiVersion, @Body ValidateAddress validateAddress, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services validateInputsByResourceGroup\" })\n @POST(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs\")\n Observable<Response<ResponseBody>> validateInputsByResourceGroup(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"location\") String location, @Query(\"api-version\") String apiVersion, @Body ValidationRequest validationRequest, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services validateInputs\" })\n @POST(\"subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs\")\n Observable<Response<ResponseBody>> validateInputs(@Path(\"subscriptionId\") String subscriptionId, @Path(\"location\") String location, @Query(\"api-version\") String apiVersion, @Body ValidationRequest validationRequest, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services regionConfiguration\" })\n @POST(\"subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration\")\n Observable<Response<ResponseBody>> regionConfiguration(@Path(\"subscriptionId\") String subscriptionId, @Path(\"location\") String location, @Query(\"api-version\") String apiVersion, @Body RegionConfigurationRequest regionConfigurationRequest, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services listAvailableSkusNext\" })\n @GET\n Observable<Response<ResponseBody>> listAvailableSkusNext(@Url String nextUrl, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.databox.v2019_09_01.Services listAvailableSkusByResourceGroupNext\" })\n @GET\n Observable<Response<ResponseBody>> listAvailableSkusByResourceGroupNext(@Url String nextUrl, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n }", "java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public com.google.cloud.servicedirectory.v1beta1.ListServicesResponse listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListServicesMethod(), getCallOptions(), request);\n }", "public Object getService(String serviceName);", "ImmutableList<T> getServices();", "public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }", "public Builder addServices(\n int index, go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(index, value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(index, value);\n }\n return this;\n }", "public Builder addServices(\n int index, go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(index, value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(index, value);\n }\n return this;\n }", "public java.util.List<ServiceRegistry> getServiceRegistries() {\n if (serviceRegistries == null) {\n serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>();\n }\n return serviceRegistries;\n }", "public java.util.List<ServiceRegistry> getServiceRegistries() {\n if (serviceRegistries == null) {\n serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>();\n }\n return serviceRegistries;\n }", "@Host(\"{$host}\")\n @ServiceInterface(name = \"NetworkManagementClientServiceEndpointPolicyDefinitions\")\n private interface ServiceEndpointPolicyDefinitionsService {\n @Delete(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}\")\n @ExpectedResponses({200, 202, 204})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<SimpleResponse<Flux<ByteBuffer>>> delete(@HostParam(\"$host\") String host, @PathParam(\"resourceGroupName\") String resourceGroupName, @PathParam(\"serviceEndpointPolicyName\") String serviceEndpointPolicyName, @PathParam(\"serviceEndpointPolicyDefinitionName\") String serviceEndpointPolicyDefinitionName, @PathParam(\"subscriptionId\") String subscriptionId, @QueryParam(\"api-version\") String apiVersion);\n\n @Get(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<SimpleResponse<ServiceEndpointPolicyDefinitionInner>> get(@HostParam(\"$host\") String host, @PathParam(\"resourceGroupName\") String resourceGroupName, @PathParam(\"serviceEndpointPolicyName\") String serviceEndpointPolicyName, @PathParam(\"serviceEndpointPolicyDefinitionName\") String serviceEndpointPolicyDefinitionName, @PathParam(\"subscriptionId\") String subscriptionId, @QueryParam(\"api-version\") String apiVersion);\n\n @Put(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}\")\n @ExpectedResponses({200, 201})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<SimpleResponse<Flux<ByteBuffer>>> createOrUpdate(@HostParam(\"$host\") String host, @PathParam(\"resourceGroupName\") String resourceGroupName, @PathParam(\"serviceEndpointPolicyName\") String serviceEndpointPolicyName, @PathParam(\"serviceEndpointPolicyDefinitionName\") String serviceEndpointPolicyDefinitionName, @PathParam(\"subscriptionId\") String subscriptionId, @BodyParam(\"application/json\") ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions, @QueryParam(\"api-version\") String apiVersion);\n\n @Get(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<SimpleResponse<ServiceEndpointPolicyDefinitionListResultInner>> listByResourceGroup(@HostParam(\"$host\") String host, @PathParam(\"resourceGroupName\") String resourceGroupName, @PathParam(\"serviceEndpointPolicyName\") String serviceEndpointPolicyName, @PathParam(\"subscriptionId\") String subscriptionId, @QueryParam(\"api-version\") String apiVersion);\n\n @Delete(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}\")\n @ExpectedResponses({200, 202, 204})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<Response<Void>> beginDelete(@HostParam(\"$host\") String host, @PathParam(\"resourceGroupName\") String resourceGroupName, @PathParam(\"serviceEndpointPolicyName\") String serviceEndpointPolicyName, @PathParam(\"serviceEndpointPolicyDefinitionName\") String serviceEndpointPolicyDefinitionName, @PathParam(\"subscriptionId\") String subscriptionId, @QueryParam(\"api-version\") String apiVersion);\n\n @Put(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}\")\n @ExpectedResponses({200, 201})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<SimpleResponse<ServiceEndpointPolicyDefinitionInner>> beginCreateOrUpdate(@HostParam(\"$host\") String host, @PathParam(\"resourceGroupName\") String resourceGroupName, @PathParam(\"serviceEndpointPolicyName\") String serviceEndpointPolicyName, @PathParam(\"serviceEndpointPolicyDefinitionName\") String serviceEndpointPolicyDefinitionName, @PathParam(\"subscriptionId\") String subscriptionId, @BodyParam(\"application/json\") ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions, @QueryParam(\"api-version\") String apiVersion);\n\n @Get(\"{nextLink}\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(CloudException.class)\n Mono<SimpleResponse<ServiceEndpointPolicyDefinitionListResultInner>> listByResourceGroupNext(@PathParam(value = \"nextLink\", encoded = true) String nextLink);\n }", "public interface ServiceConfigurationsClient {\n /**\n * Lists of all the services associated with endpoint resource.\n *\n * <p>API to enumerate registered services in service configurations under a Endpoint Resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the paginated list of serviceConfigurations as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<ServiceConfigurationResourceInner> listByEndpointResource(String resourceUri, String endpointName);\n\n /**\n * Lists of all the services associated with endpoint resource.\n *\n * <p>API to enumerate registered services in service configurations under a Endpoint Resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the paginated list of serviceConfigurations as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<ServiceConfigurationResourceInner> listByEndpointResource(\n String resourceUri, String endpointName, Context context);\n\n /**\n * Gets the details about the service to the resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the details about the service to the resource along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<ServiceConfigurationResourceInner> getWithResponse(\n String resourceUri, String endpointName, String serviceConfigurationName, Context context);\n\n /**\n * Gets the details about the service to the resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the details about the service to the resource.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n ServiceConfigurationResourceInner get(String resourceUri, String endpointName, String serviceConfigurationName);\n\n /**\n * Create or update a service in serviceConfiguration for the endpoint resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @param serviceConfigurationResource Service details.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the service configuration details associated with the target resource along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<ServiceConfigurationResourceInner> createOrupdateWithResponse(\n String resourceUri,\n String endpointName,\n String serviceConfigurationName,\n ServiceConfigurationResourceInner serviceConfigurationResource,\n Context context);\n\n /**\n * Create or update a service in serviceConfiguration for the endpoint resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @param serviceConfigurationResource Service details.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the service configuration details associated with the target resource.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n ServiceConfigurationResourceInner createOrupdate(\n String resourceUri,\n String endpointName,\n String serviceConfigurationName,\n ServiceConfigurationResourceInner serviceConfigurationResource);\n\n /**\n * Update the service details in the service configurations of the target resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @param serviceConfigurationResource Service details.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the service configuration details associated with the target resource along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<ServiceConfigurationResourceInner> updateWithResponse(\n String resourceUri,\n String endpointName,\n String serviceConfigurationName,\n ServiceConfigurationResourcePatch serviceConfigurationResource,\n Context context);\n\n /**\n * Update the service details in the service configurations of the target resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @param serviceConfigurationResource Service details.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the service configuration details associated with the target resource.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n ServiceConfigurationResourceInner update(\n String resourceUri,\n String endpointName,\n String serviceConfigurationName,\n ServiceConfigurationResourcePatch serviceConfigurationResource);\n\n /**\n * Deletes the service details to the target resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<Void> deleteWithResponse(\n String resourceUri, String endpointName, String serviceConfigurationName, Context context);\n\n /**\n * Deletes the service details to the target resource.\n *\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.\n * @param endpointName The endpoint name.\n * @param serviceConfigurationName The service name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceUri, String endpointName, String serviceConfigurationName);\n}", "public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }", "public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);", "@Test\n\tvoid testSingleNamespaceTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = false;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(\"namespace-a\");\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 1);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertFalse(result.contains(\"service-b\"));\n\t}", "@Override\n\tpublic int addStationstoServices(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceStationId(serviceDTO.getSourceStationId());\n\t\tserviceDomain.setDestinationStationId(serviceDTO.getDestinationStationId());\n\t\tserviceDomain.setServiceId(serviceDTO.getServiceId());\n\t\tSystem.out.println(serviceDTO.getServiceId());\n\t\t//System.out.println(serviceDTO.getDestinationStationId());\n\t\treturn iStationToService.addServiceToStation(serviceDomain);\n\t}", "public List<ServiceInstance> lookupInstances(String serviceName);", "public interface LinkedServices {\n /**\n * Deletes a linked service instance.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the top level Linked service resource container.\n */\n LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);\n\n /**\n * Deletes a linked service instance.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the top level Linked service resource container.\n */\n LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);\n\n /**\n * Gets a linked service instance.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a linked service instance.\n */\n LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName);\n\n /**\n * Gets a linked service instance.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a linked service instance along with {@link Response}.\n */\n Response<LinkedService> getWithResponse(\n String resourceGroupName, String workspaceName, String linkedServiceName, Context context);\n\n /**\n * Gets the linked services instances in a workspace.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the linked services instances in a workspace as paginated response with {@link PagedIterable}.\n */\n PagedIterable<LinkedService> listByWorkspace(String resourceGroupName, String workspaceName);\n\n /**\n * Gets the linked services instances in a workspace.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the linked services instances in a workspace as paginated response with {@link PagedIterable}.\n */\n PagedIterable<LinkedService> listByWorkspace(String resourceGroupName, String workspaceName, Context context);\n\n /**\n * Gets a linked service instance.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a linked service instance along with {@link Response}.\n */\n LinkedService getById(String id);\n\n /**\n * Gets a linked service instance.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a linked service instance along with {@link Response}.\n */\n Response<LinkedService> getByIdWithResponse(String id, Context context);\n\n /**\n * Deletes a linked service instance.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the top level Linked service resource container.\n */\n LinkedService deleteById(String id);\n\n /**\n * Deletes a linked service instance.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the top level Linked service resource container.\n */\n LinkedService deleteByIdWithResponse(String id, Context context);\n\n /**\n * Begins definition for a new LinkedService resource.\n *\n * @param name resource name.\n * @return the first stage of the new LinkedService definition.\n */\n LinkedService.DefinitionStages.Blank define(String name);\n}", "public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {\n final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();\n Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);\n for (Endpoint ep : deployment.getService().getEndpoints()) {\n endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));\n }\n return endpointServiceNames;\n }", "public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}", "public Builder setServiceName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n serviceName_ = value;\n onChanged();\n return this;\n }", "public Builder setServiceName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n serviceName_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {\n\t\tClass beanClass=LoggerService.class;\n\t\tRootBeanDefinition beanDefinition=new RootBeanDefinition(beanClass);\n\t\tString beanName=StringUtils.uncapitalize(beanClass.getSimpleName());\n\t\tregistry.registerBeanDefinition(beanName, beanDefinition);\n\t\t\n\t}", "public void addServices(Services services) {\n for(int i = 0; i < services.getServices().size(); i++) {\n this.services.add(services.getServices().get(i)); // Retrieve the name of the Service\n }\n for(int i = 0; i < services.getIndexes().size(); i++) {\n this.indexes.add(services.getIndexes().get(i)); // Retrieve the index of the Service\n }\n }", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder();", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder();", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder();", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public void addServiceName(String name) {\n if (name != null) {\n this.serviceNameSet.add(name);\n }\n }" ]
[ "0.5789624", "0.5426219", "0.538888", "0.538888", "0.5362054", "0.5274333", "0.5262869", "0.5207543", "0.5207543", "0.5199197", "0.51985884", "0.51985884", "0.5191548", "0.51720566", "0.5156756", "0.51494163", "0.51437455", "0.5125221", "0.5125221", "0.51136655", "0.50914496", "0.5045012", "0.502413", "0.5012917", "0.49880865", "0.4974267", "0.4965595", "0.4953327", "0.495029", "0.4950152", "0.49482632", "0.4942577", "0.49413443", "0.49413443", "0.49363264", "0.49143893", "0.49112222", "0.4909469", "0.49017578", "0.49017578", "0.48840272", "0.4874112", "0.4874112", "0.4870641", "0.48631206", "0.48631206", "0.48607272", "0.484955", "0.48442903", "0.48404738", "0.4828748", "0.48252112", "0.48228887", "0.48186922", "0.4817605", "0.4816386", "0.48154372", "0.48114166", "0.47985214", "0.47931752", "0.4776743", "0.4770103", "0.47681528", "0.47681528", "0.4761851", "0.47523227", "0.47514376", "0.47460347", "0.4742642", "0.47407997", "0.47332785", "0.47332785", "0.47274747", "0.47274607", "0.47188318", "0.4709045", "0.4702536", "0.4702536", "0.47009444", "0.47009444", "0.46878773", "0.46806425", "0.46792614", "0.4672688", "0.46673843", "0.46593067", "0.4648422", "0.46434742", "0.46418947", "0.46324533", "0.46323723", "0.46323723", "0.4629584", "0.46267048", "0.46206957", "0.46206957", "0.46206957", "0.4617092", "0.4611156", "0.46043837" ]
0.53805166
4
Creates a namespace, and returns the new namespace.
default void createNamespace( com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateNamespaceMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.cloud.servicedirectory.v1beta1.Namespace createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateNamespaceMethod(), getCallOptions(), request);\n }", "public static NamespaceContext create() {\n return new NamespaceContext();\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Namespace>\n createNamespace(com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request);\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "public void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "protected NamespaceStack createNamespaceStack() {\r\n // actually returns a XMLOutputter.NamespaceStack (see below)\r\n return new NamespaceStack();\r\n }", "abstract XML addNamespace(Namespace ns);", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public String createNamespace(IProject p, String ns) throws ThinklabException {\r\n \t\t\t\t\r\n \t\tFile ret = new File(getSourceDirectory() + File.separator + \r\n \t\t\t\t\t\t\tns.replace('.', File.separatorChar) + \".tql\");\r\n \t\tFile dir = new File(MiscUtilities.getFilePath(ret.toString()));\r\n \t\t\r\n \t\ttry {\r\n \t\t\tdir.mkdirs();\r\n \t\t\tPrintWriter out = new PrintWriter(ret);\r\n \t\t\tout.println(\"namespace \" + ns + \";\\n\");\r\n \t\t\tout.close();\r\n \t\t} catch (Exception e) {\r\n \t\t\tthrow new ThinklabClientException(e);\r\n \t\t}\r\n \t\t\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}", "Namespaces namespaces();", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "void setNamespace(java.lang.String namespace);", "public static IRIRewriter createNamespaceBased(\n\t\t\tfinal String originalNamespace, final String rewrittenNamespace) {\n\t\tif (originalNamespace.equals(rewrittenNamespace)) {\n\t\t\treturn identity;\n\t\t}\n\t\tif (originalNamespace.startsWith(rewrittenNamespace) ||\n\t\t\t\trewrittenNamespace.startsWith(originalNamespace)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Cannot rewrite overlapping namespaces, \" + \n\t\t\t\t\t\"this would be ambiguous: \" + originalNamespace + \n\t\t\t\t\t\" => \" + rewrittenNamespace);\n\t\t}\n\t\treturn new IRIRewriter() {\n\t\t\t@Override\n\t\t\tpublic String rewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\treturn rewrittenNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\toriginalNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't rewrite already rewritten IRI: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic String unrewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\treturn originalNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\trewrittenNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't unrewrite IRI that already is in the original namespace: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t};\n\t}", "String getNamespace();", "String getNamespace();", "String getNamespace();", "void setNamespace(String namespace);", "public static NamespaceRegistrationTransactionFactory createRootNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final BigInteger duration) {\n NamespaceId namespaceId = NamespaceId.createFromName(namespaceName);\n return create(networkType, namespaceName,\n namespaceId, NamespaceRegistrationType.ROOT_NAMESPACE, Optional.of(duration), Optional.empty());\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public Namespace(String alias) {\n this(DSL.name(alias), NAMESPACE);\n }", "public Namespace(Name alias) {\n this(alias, NAMESPACE);\n }", "java.lang.String getNamespace();", "private NamespaceHelper() {}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "public XMLNamespaces() {\n this(libsbmlJNI.new_XMLNamespaces__SWIG_0(), true);\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function Attr createAttributeNS(String namespaceURI, String qualifiedName);", "public String getNamespace();", "protected MapNamespaceContext createNamespaceContext() {\r\n // create the xpath with fedora namespaces built in\r\n MapNamespaceContext nsc = new MapNamespaceContext();\r\n nsc.setNamespace(\"fedora-types\", \"http://www.fedora.info/definitions/1/0/types/\");\r\n nsc.setNamespace(\"sparql\", \"http://www.w3.org/2001/sw/DataAccess/rf1/result\");\r\n nsc.setNamespace(\"foxml\", \"info:fedora/fedora-system:def/foxml#\");\r\n nsc.setNamespace(\"rdf\", \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\r\n nsc.setNamespace(\"fedora\", \"info:fedora/fedora-system:def/relations-external#\");\r\n nsc.setNamespace(\"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\");\r\n nsc.setNamespace(\"fedora-model\", \"info:fedora/fedora-system:def/model#\");\r\n nsc.setNamespace(\"oai\", \"http://www.openarchives.org/OAI/2.0/\");\r\n nsc.setNamespace(\"oai_dc\", \"http://www.openarchives.org/OAI/2.0/oai_dc/\", \"http://www.openarchives.org/OAI/2.0/oai_dc.xsd\");\r\n nsc.setNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\"); \r\n nsc.setNamespace(\"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\r\n nsc.setNamespace(\"fedora-management\", \"http://www.fedora.info/definitions/1/0/management/\", \"http://www.fedora.info/definitions/1/0/datastreamHistory.xsd\");\r\n return nsc;\r\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static NamespaceRegistrationTransactionFactory createSubNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId parentId) {\n NamespaceId namespaceId = NamespaceId\n .createFromNameAndParentId(namespaceName, parentId.getId());\n return create(networkType, namespaceName, namespaceId,\n NamespaceRegistrationType.SUB_NAMESPACE, Optional.empty(),\n Optional.of(parentId));\n }", "public NsNamespaces(Name alias) {\n this(alias, NS_NAMESPACES);\n }", "private void internalAddNamespace(NamespaceDefinition def) {\n String uri = def.getUri();\n String prefix = def.getPrefix();\n def.setIndex(m_container.getBindingRoot().\n getNamespaceUriIndex(uri, prefix));\n m_namespaces.add(def);\n m_uriMap.put(uri, def);\n }", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public NsNamespaces(String alias) {\n this(DSL.name(alias), NS_NAMESPACES);\n }", "public static Namespace getDefault() {\n if (instance == null) {\n new R_OSGiWSNamespace();\n }\n return instance;\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public static QualifiedName create(final String uri) {\n\t\tif (cache.containsKey(uri)) {\n\t\t\treturn cache.get(uri);\n\t\t} else {\n\t\t\tfinal QualifiedName qn = new QualifiedName(uri);\n\t\t\tcache.put(uri, qn);\n\t\t\treturn qn;\n\t\t}\n\t}", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "Rule PhpNamespace() {\n return Sequence(\n \"php_namespace\",\n Literal(),\n actions.pushPhpNamespaceNode());\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "Rule NamespaceScope() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n \"* \",\n \"cpp \",\n \"java \",\n \"py \",\n \"perl \",\n \"php \",\n \"rb \",\n \"cocoa \",\n \"csharp \"),\n actions.pushLiteralNode());\n }", "public Resource createFromNsAndLocalName(String nameSpace, String localName)\n\t{\n\t\treturn new ResourceImpl(model.getNsPrefixMap().get(nameSpace), localName);\n\t}", "public S create() {\n\t\tS style = createDefault();\n\t\tint id = nextID();\n\t\tstyle.setId(id);\n\t\taddStyle(style);\n\t\treturn style;\n\t}", "protected abstract void defineNamespace(int index, String prefix)\n throws IOException;", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "String getTargetNamespace();", "Package createPackage();", "private void addNamespace(ClassTree tree, GenerationContext<JS> context, List<JS> stmts) {\r\n\t\tElement type = TreeUtils.elementFromDeclaration(tree);\r\n\t\tif (JavaNodes.isInnerType(type)) {\r\n\t\t\t// this is an inner (anonymous or not) class - no namespace declaration is generated\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString namespace = context.getCurrentWrapper().getNamespace();\r\n\t\tif (!namespace.isEmpty()) {\r\n\t\t\tJavaScriptBuilder<JS> js = context.js();\r\n\t\t\tJS target = js.property(js.name(GeneratorConstants.STJS), \"ns\");\r\n\t\t\tstmts.add(js.expressionStatement(js.functionCall(target, Collections.singleton(js.string(namespace)))));\r\n\t\t}\r\n\t}", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "void declarePrefix(String prefix, String namespace);", "public String getNamespace() {\n return namespace;\n }", "public NamespaceContext getNamespaceContext() {\n LOGGER.entering(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\");\n NamespaceContext result = new JsonNamespaceContext();\n LOGGER.exiting(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\", result);\n return result;\n }", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "Namespace getGpmlNamespace();", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public final void rule__AstNamespace__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3851:1: ( ( 'namespace' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3853:1: 'namespace'\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n match(input,53,FOLLOW_53_in_rule__AstNamespace__Group__1__Impl8326); \n after(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static LabelToNode createScopeByGraph() {\n return new LabelToNode(new GraphScopePolicy(), nodeAllocatorByGraph());\n }", "public TriGWriter getTriGWriter() {\n\t\tTriGWriter writer = new TriGWriter();\n\t\tMap map = this.getNsPrefixMap();\n\t\tfor (Object key : map.keySet()) {\n\t\t\twriter.addNamespace((String) key, (String) map.get(key));\n\t\t}\n\t\treturn writer;\n\t}", "Scope createScope();", "public final void rule__AstNamespace__NamespacesAssignment_4_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22720:1: ( ( ruleAstNamespace ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22722:1: ruleAstNamespace\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n pushFollow(FOLLOW_ruleAstNamespace_in_rule__AstNamespace__NamespacesAssignment_4_645513);\n ruleAstNamespace();\n\n state._fsp--;\n\n after(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "int getNamespaceUri();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespacePrefix(Object ns);", "public abstract INameSpace getNameSpace();", "public YANG_NameSpace getNameSpace() {\n\t\treturn namespace;\n\t}", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static Namespace valueOf( String namespaceName ) {\n return ( Namespace ) allowedValues.get( namespaceName.toLowerCase() );\n }", "String getNameSpace();", "public Element insertNamespaces(final Element element) throws Exception {\r\n\r\n element.setAttribute(\"xmlns:prefix-container\", Constants.NS_IR_CONTAINER);\r\n //element.setAttribute(\"xmlns:prefix-content-type\", CONTENT_TYPE_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-context\", Constants.NS_IR_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-dc\", Constants.NS_EXTERNAL_DC);\r\n element.setAttribute(\"xmlns:prefix-dcterms\", Constants.NS_EXTERNAL_DC_TERMS);\r\n element.setAttribute(\"xmlns:prefix-grants\", Constants.NS_AA_GRANTS);\r\n //element.setAttribute(\"xmlns:prefix-internal-metadata\", INTERNAL_METADATA_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-item\", Constants.NS_IR_ITEM);\r\n //element.setAttribute(\"xmlns:prefix-member-list\", MEMBER_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-member-ref-list\", MEMBER_REF_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadata\", METADATA_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadatarecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:escidocMetadataRecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:escidocComponents\", Constants.NS_IR_COMPONENTS);\r\n element.setAttribute(\"xmlns:prefix-organizational-unit\", Constants.NS_OUM_OU);\r\n //element.setAttribute(\"xmlns:prefix-properties\", PROPERTIES_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-schema\", SCHEMA_NS_URI); TODO: huh???\r\n element.setAttribute(\"xmlns:prefix-staging-file\", Constants.NS_ST_FILE);\r\n element.setAttribute(\"xmlns:prefix-user-account\", Constants.NS_AA_USER_ACCOUNT);\r\n element.setAttribute(\"xmlns:prefix-xacml-context\", Constants.NS_EXTERNAL_XACML_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-xacml-policy\", Constants.NS_EXTERNAL_XACML_POLICY);\r\n element.setAttribute(\"xmlns:prefix-xlink\", Constants.NS_EXTERNAL_XLINK);\r\n element.setAttribute(\"xmlns:prefix-xsi\", Constants.NS_EXTERNAL_XSI);\r\n return element;\r\n }", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "protected static void addOrUpdateNamespace(MasterProcedureEnv env, NamespaceDescriptor ns)\n throws IOException {\n getTableNamespaceManager(env).addOrUpdateNamespace(ns);\n }", "public static NamespaceRegistrationTransactionFactory create(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId namespaceId,\n final NamespaceRegistrationType namespaceRegistrationType,\n final Optional<BigInteger> duration,\n final Optional<NamespaceId> parentId) {\n return new NamespaceRegistrationTransactionFactory(networkType, namespaceName, namespaceId,\n namespaceRegistrationType, duration, parentId);\n }", "Definition createDefinition();", "String getReferenceNamespace();", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@Fluent\npublic interface NamespaceAuthorizationRule extends\n AuthorizationRule<NamespaceAuthorizationRule>,\n Updatable<NamespaceAuthorizationRule.Update> {\n /**\n * @return the name of the parent namespace name\n */\n String namespaceName();\n\n /**\n * Grouping of Service Bus namespace authorization rule definition stages.\n */\n interface DefinitionStages {\n /**\n * The first stage of namespace authorization rule definition.\n */\n interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage<WithCreate> {\n }\n\n /**\n * The stage of the definition which contains all the minimum required inputs for\n * the resource to be created (via {@link WithCreate#create()}), but also allows\n * for any other optional settings to be specified.\n */\n interface WithCreate extends Creatable<NamespaceAuthorizationRule> {\n }\n }\n\n /**\n * The entirety of the namespace authorization rule definition.\n */\n interface Definition extends\n NamespaceAuthorizationRule.DefinitionStages.Blank,\n NamespaceAuthorizationRule.DefinitionStages.WithCreate {\n }\n\n /**\n * The entirety of the namespace authorization rule update.\n */\n interface Update extends\n Appliable<NamespaceAuthorizationRule>,\n AuthorizationRule.UpdateStages.WithListenOrSendOrManage<Update> {\n }\n}", "public String getNameSpace() {\n return this.namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public final void mT__51() throws RecognitionException {\n try {\n int _type = T__51;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:49:7: ( 'namespace' )\n // InternalSpeADL.g:49:9: 'namespace'\n {\n match(\"namespace\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static String copyNamespace(String absoluteName, String nonabsoluteName) {\r\n\t\tString namespace;\t\t\t\t//The namespace of the absolute name\r\n\t\t\r\n\t\tnamespace = absoluteName.replaceFirst(\"#.*\",\"\");\r\n\t\treturn namespace + \"#\" + nonabsoluteName;\r\n\t}", "public void addImpliedNamespace(NamespaceDefinition def) {\n if (!checkDuplicateNamespace(def)) {\n internalAddNamespace(def);\n }\n }", "private String getNamespace(int endIndex) {\n return data.substring(tokenStart, endIndex);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "public String generate(String namespace) {\n return generate(namespace, Http.Context.current().lang());\n }", "public void addNamespace(NamespaceDefinition def) {\n \n // override prior defaults with this namespace definition\n if (def.isAttributeDefault()) {\n m_attributeDefault = def;\n }\n if (def.isElementDefault()) {\n m_elementDefault = def;\n }\n if (checkDuplicateNamespace(def)) {\n \n // replace current definition for URI if this one sets defaults\n if (def.isAttributeDefault() || def.isElementDefault()) {\n NamespaceDefinition prior =\n (NamespaceDefinition)m_uriMap.put(def.getUri(), def);\n def.setIndex(prior.getIndex());\n if (m_overrideMap == null) {\n m_overrideMap = new HashMap();\n }\n m_overrideMap.put(def, prior);\n }\n \n } else {\n \n // no conflicts, add it\n internalAddNamespace(def);\n \n }\n }", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "public String getNamespaceName() {\n return namespaceName;\n }", "STYLE createSTYLE();", "private static java.lang.String generatePrefix(java.lang.String namespace) {\r\n if(namespace.equals(\"http://www.huawei.com.cn/schema/common/v2_1\")){\r\n return \"ns1\";\r\n }\r\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }" ]
[ "0.7332622", "0.71947646", "0.70776004", "0.66781956", "0.6448588", "0.6280682", "0.6090085", "0.6033544", "0.60171396", "0.5984442", "0.59643936", "0.5929075", "0.5918829", "0.5888365", "0.5888365", "0.5888365", "0.5875762", "0.58650005", "0.58157057", "0.57919675", "0.575152", "0.57377", "0.572343", "0.5674959", "0.56403303", "0.56007797", "0.5594264", "0.54978657", "0.5482993", "0.54766434", "0.5465069", "0.54544353", "0.5429801", "0.5385375", "0.5382016", "0.5367028", "0.5363179", "0.53538775", "0.533026", "0.530672", "0.5298964", "0.529563", "0.5270632", "0.52640283", "0.52602565", "0.524915", "0.5247289", "0.52422106", "0.52268773", "0.52201694", "0.520261", "0.5200336", "0.52001464", "0.51972246", "0.51673454", "0.5072897", "0.5051235", "0.5051163", "0.50445336", "0.5036291", "0.5036291", "0.5036291", "0.50233257", "0.50191075", "0.49670157", "0.4964398", "0.49614742", "0.49546605", "0.49459434", "0.4944815", "0.4944815", "0.49333727", "0.48999858", "0.48883158", "0.48714724", "0.48235783", "0.48146057", "0.4795736", "0.47947183", "0.4768211", "0.47646487", "0.47639203", "0.47534505", "0.47427416", "0.4741888", "0.4732793", "0.47268337", "0.47266516", "0.4722403", "0.47144532", "0.47141114", "0.47113478", "0.47081578", "0.4694752", "0.4694133", "0.46757492", "0.46624988", "0.4659554", "0.46477234", "0.4644604" ]
0.6226572
6
Deletes a namespace. This also deletes all services and endpoints in the namespace.
default void deleteNamespace( com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteNamespaceMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.protobuf.Empty deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteNamespaceMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteNamespace(com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()), request);\n }", "public void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void deleteNamespace(String nsName) throws NamespacePropertiesDeleteException {\n long nsContext;\n\n nsContext = NamespaceUtil.nameToContext(nsName);\n // sufficient for ZKImpl as clientside actions for now\n deleteNamespaceProperties(nsContext);\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "void unsetNamespace();", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace);", "@Beta(Beta.SinceVersion.V1_7_0)\n void deleteByName(String resourceGroupName, String namespaceName, String name);", "public void clearContext(String namespace) {\n if (context != null) {\n context.remove(namespace);\n }\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id) {\n respond(request, responder, namespace, ns -> {\n NamespacedId namespacedId = new NamespacedId(ns, id);\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n if (registry.hasSchema(namespacedId)) {\n throw new NotFoundException(\"Id \" + id + \" not found.\");\n }\n registry.delete(namespacedId);\n });\n return new ServiceResponse<Void>(\"Successfully deleted schema \" + id);\n });\n }", "public void delete(String namespace, String key) {\n \t\tthis.init();\n \t\tthis._del(this.getKey(namespace, key));\n \t}", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedSubscription queryParameters);", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "@Test\n\tpublic void testDelete() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\t\n\t}", "protected void tearDown() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {\n cm.removeNamespace((String) iter.next());\n }\n }", "abstract protected void deleteNamespaceProperties(long nsContext) throws NamespacePropertiesDeleteException;", "public void deleteAllVersions(String namespace, String id) throws StageException;", "protected void tearDown() throws Exception {\n ConfigManager manager = ConfigManager.getInstance();\n for (Iterator iter = manager.getAllNamespaces(); iter.hasNext();) {\n manager.removeNamespace((String) iter.next());\n }\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedConfiguration queryParameters);", "static void cleanConfiguration() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n List namespaces = new ArrayList();\n\n // iterate through all the namespaces and delete them.\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n namespaces.add(it.next());\n }\n\n for (Iterator it = namespaces.iterator(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "public void delete(String namespace, String id, long version) throws StageException;", "protected void tearDown() throws Exception {\n super.tearDown();\n\n ConfigManager cm = ConfigManager.getInstance();\n Iterator allNamespaces = cm.getAllNamespaces();\n while (allNamespaces.hasNext()) {\n cm.removeNamespace((String) allNamespaces.next());\n }\n }", "static void clearConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n Iterator it = cm.getAllNamespaces();\n List nameSpaces = new ArrayList();\n\n while (it.hasNext()) {\n nameSpaces.add(it.next());\n }\n\n for (int i = 0; i < nameSpaces.size(); i++) {\n cm.removeNamespace((String) nameSpaces.get(i));\n }\n }", "protected abstract void undefineNamespace(int index);", "public void deleteTable(String resourceGroupName, String accountName, String tableName) {\n deleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().last().body();\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedComponent queryParameters);", "public static void unloadConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "private void closeNamespaces() {\n \n // revert prefixes for namespaces included in last declaration\n DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop();\n int[] deltas = info.m_deltas;\n String[] priors = info.m_priors;\n for (int i = deltas.length - 1; i >= 0; i--) {\n int index = deltas[i];\n undefineNamespace(index);\n if (index < m_prefixes.length) {\n m_prefixes[index] = priors[i];\n } else if (m_extensionUris != null) {\n index -= m_prefixes.length;\n for (int j = 0; j < m_extensionUris.length; j++) {\n int length = m_extensionUris[j].length;\n if (index < length) {\n m_extensionPrefixes[j][index] = priors[i];\n } else {\n index -= length;\n }\n }\n }\n }\n \n // set up for clearing next nested set\n if (m_namespaceStack.empty()) {\n m_namespaceDepth = -1;\n } else {\n m_namespaceDepth =\n ((DeclarationInfo)m_namespaceStack.peek()).m_depth;\n }\n }", "Namespaces namespaces();", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "void removeServices() throws IOException, SoapException;", "void setNamespace(java.lang.String namespace);", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Beta(Beta.SinceVersion.V1_7_0)\n Completable deleteByNameAsync(String resourceGroupName, String namespaceName, String name);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "public void beginDeleteTable(String resourceGroupName, String accountName, String tableName) {\n beginDeleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().single().body();\n }", "public void deleteBucket() {\n\n logger.debug(\"\\n\\nDelete bucket\\n\");\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n blobStore.deleteContainer( bucketName );\n }", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}/versions/{version}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id, @PathParam(\"version\") long version) {\n respond(request, responder, namespace, ns -> {\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n registry.remove(new NamespacedId(ns, id), version);\n });\n return new ServiceResponse<Void>(\"Successfully deleted version '\" + version + \"' of schema \" + id);\n });\n }", "java.lang.String getNamespace();", "void deleteTable(String tableName) {\n\t\tthis.dynamoClient.deleteTable(new DeleteTableRequest().withTableName(tableName));\n\t}", "public void deleteTable(final String tableName) throws IOException {\n deleteTable(Bytes.toBytes(tableName));\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public com.amazon.s3.DeleteBucketResponse deleteBucket(com.amazon.s3.DeleteBucket deleteBucket);", "private static void deleteBucketsWithPrefix() {\n\n logger.debug(\"\\n\\nDelete buckets with prefix {}\\n\", bucketPrefix );\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n final PageSet<? extends StorageMetadata> blobStoreList = blobStore.list();\n\n for ( Object o : blobStoreList.toArray() ) {\n StorageMetadata s = (StorageMetadata)o;\n\n if ( s.getName().startsWith( bucketPrefix )) {\n try {\n blobStore.deleteContainer(s.getName());\n } catch ( ContainerNotFoundException cnfe ) {\n logger.warn(\"Attempted to delete bucket {} but it is already deleted\", cnfe );\n }\n logger.debug(\"Deleted bucket {}\", s.getName());\n }\n }\n }", "public void deleteCatalog(Catalog catalog) throws BackendException;", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "public String getNamespace() {\n return namespace;\n }", "static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "public void deletePersistentVolumeClaim(String pvcName, String namespace) throws ApiException {\n try {\n V1Status result = coreApi.deleteNamespacedPersistentVolumeClaim(\n pvcName, namespace, \"true\",\n null, null, null,\n null, null\n );\n } catch (ApiException e) {\n LOG.error(\"Exception when deleting persistent volume claim \" + e.getMessage(), e);\n throw e;\n } catch (JsonSyntaxException e) {\n if (e.getCause() instanceof IllegalStateException) {\n IllegalStateException ise = (IllegalStateException) e.getCause();\n if (ise.getMessage() != null && ise.getMessage().contains(\"Expected a string but was BEGIN_OBJECT\"))\n LOG.debug(\"Catching exception because of issue \" +\n \"https://github.com/kubernetes-client/java/issues/86\", e);\n else throw e;\n }\n else throw e;\n }\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@Override\n\tpublic int snsDelete(SnsVO vo) {\n\t\treturn map.snsDelete(vo);\n\t}", "public String getNamespace()\n {\n return NAMESPACE;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "void deleteFunctionLibrary(String functionLibraryName, String tenantDomain)\n throws FunctionLibraryManagementException;", "public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;", "void setNamespace(String namespace);", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "@Nullable public String getNamespace() {\n return namespace;\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/dnses\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionDNS();", "public void removeContext(String namespace, String key) {\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap != null) {\n namespaceMap.remove(key);\n }\n }", "void deleteAllPaymentTerms() throws CommonManagementException;", "public void deleteSNS(String foreignID, final IRequestListener iRequestListener) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_DELETE_SNS.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken)\r\n .replace(\"{SNS_ID}\", foreignID);\r\n AsyncHttpDelete deleteSNS = new AsyncHttpDelete(mContext, new AsyncHttpResponseProcess(mContext, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response deleteSNS :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }, null, true);\r\n AIOLog.d(url);\r\n deleteSNS.execute(url);\r\n }", "public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String profileName, String customDomainName, Context context);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "public void deleteTable(String tableName) {\n try {\n connectToDB(\"jdbc:mysql://localhost/EmployeesProject\");\n } catch (Exception e) {\n System.out.println(\"The EmployeesProject db does not exist!\\n\"\n + e.getMessage());\n }\n String sqlQuery = \"drop table \" + tableName;\n try {\n stmt.executeUpdate(sqlQuery);\n } catch (SQLException ex) {\n System.err.println(\"Failed to delete '\" + tableName + \n \"' table.\\n\" + ex.getMessage());\n }\n }", "int getNamespaceUri();", "@DeleteMapping(\"/ap-constants/{id}\")\n @Timed\n public ResponseEntity<Void> deleteApConstants(@PathVariable Long id) {\n log.debug(\"REST request to delete ApConstants : {}\", id);\n apConstantsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "IndexDeleted deleteIndex(String names) throws ElasticException;", "@DELETE\n\t@Produces(\"application/json\")\n\tpublic Response deleteGraphNodes() {\n\t\tcurrentGraph.getNodes().clear();\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(DB.grafos)\n\t\t\t\t\t.build();\n\t}", "void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context);", "public void deleteNetWS() {\r\n/* 142 */ this._has_netWS = false;\r\n/* */ }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String systemTopicName, Context context);", "public String getNamespaceName() {\n return namespaceName;\n }", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "void stopServices() throws IOException, SoapException;", "public static void deleteCacheFile(Context context, String cacheFileName) {\n context.deleteFile(cacheFileName);\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public com.google.protobuf.Empty deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteServiceMethod(), getCallOptions(), request);\n }" ]
[ "0.6920174", "0.68527955", "0.67187583", "0.65800256", "0.5817538", "0.5816485", "0.5548779", "0.55118155", "0.54624957", "0.543168", "0.54101896", "0.53055227", "0.5229528", "0.519043", "0.5179534", "0.5128854", "0.5122423", "0.5082456", "0.50680053", "0.50414175", "0.5031711", "0.49984682", "0.494288", "0.48286778", "0.48205724", "0.48038936", "0.47969043", "0.47754347", "0.4755668", "0.47405437", "0.4735683", "0.46570957", "0.4631395", "0.4573011", "0.4570717", "0.45665565", "0.45573348", "0.45539343", "0.45478654", "0.4540826", "0.4530156", "0.45291388", "0.45175645", "0.45017293", "0.44962418", "0.4488721", "0.4484882", "0.4484882", "0.4484882", "0.44613147", "0.4459575", "0.4459575", "0.4447993", "0.4430003", "0.440816", "0.44061795", "0.44045725", "0.4391235", "0.43691608", "0.43607685", "0.43497708", "0.43497708", "0.43497708", "0.43489367", "0.4347508", "0.43468806", "0.4330934", "0.43183228", "0.43006042", "0.42990747", "0.42735928", "0.42512006", "0.42487392", "0.42172366", "0.42045668", "0.4198404", "0.41900736", "0.41888207", "0.41860342", "0.4185646", "0.41845885", "0.41830257", "0.41805586", "0.4170887", "0.41667235", "0.41609126", "0.4149068", "0.4130084", "0.41287407", "0.4127676", "0.41275835", "0.4126685", "0.41226524", "0.41093388", "0.40955105", "0.4092674", "0.4081838", "0.40789136", "0.407204", "0.40686065" ]
0.6169406
4
Creates a service, and returns the new service.
default void createService( com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateServiceMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }", "public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }", "Service newService();", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }", "static Service create(String hostIp, String user, String password) {\n return new ServiceImpl(hostIp, user, password);\n }", "public CreateServiceRequest withServiceName(String serviceName) {\n setServiceName(serviceName);\n return this;\n }", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public static WPVService createInstance() {\n if ( CONFIG != null )\n return new WPVService( CONFIG );\n return null;\n }", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "IServiceContext createService(Class<?>... serviceModules);", "SourceBuilder createService();", "Fog_Services createFog_Services();", "Service_Resource createService_Resource();", "public abstract ServiceLocator create(String name);", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "void addService(ServiceInfo serviceInfo);", "public Collection<Service> createServices();", "IServiceContext createService(String childContextName, Class<?>... serviceModules);", "public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }", "public abstract T addService(ServerServiceDefinition service);", "public <T extends Service> T getService(Class<T> clazz) throws ServiceException{\n\t\ttry {\n\t\t\treturn clazz.getDeclaredConstructor().newInstance();\n\t\t} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }", "public Tracing create(String serviceName) {\n return Tracing.newBuilder()\n .localServiceName(serviceName)\n .currentTraceContext(RequestContextCurrentTraceContext.ofDefault())\n .spanReporter(spanReporter())\n .build();\n }", "public static <S> S createService(Class<S> serviceClass, String baseUrl) {\n return createService(serviceClass, baseUrl, null);\n }", "@Transactional\n public abstract OnmsServiceType createServiceTypeIfNecessary(String serviceName);", "Object getService(String serviceName);", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public static <T> T buildService(Class<T> type) {\n\n\n return retrofit.create(type);\n }", "public static <S> S createService(Class<S> serviceClass, String url) {\n Retrofit.Builder retrofit = new Retrofit.Builder()\n .baseUrl(url)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create());\n\n //set the necessary querys in the request\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n httpClient.addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n HttpUrl originalHttpUrl = original.url();\n String mTimeStamp = Md5HashGenerator.getTimeStamp();\n HttpUrl url = originalHttpUrl.newBuilder()\n .addQueryParameter(\"ts\", mTimeStamp)\n .addQueryParameter(\"apikey\", Constants.PUBLIC_KEY)\n .addQueryParameter(\"hash\", Md5HashGenerator.generateMd5(mTimeStamp))\n .build();\n\n // Request customization: add request headers\n Request.Builder requestBuilder = original.newBuilder()\n .url(url);\n\n Request request = requestBuilder.build();\n return chain.proceed(request);\n }\n });\n retrofit.client(httpClient.build());\n return retrofit.build().create(serviceClass);\n }", "public static Service getInstance()\n\t{\n\t\tif (serviceInstance == null)\n\t\t{\n\t\t\tserviceInstance = new Service(LocalDao.getInstance());\n\t\t}\n\t\treturn serviceInstance;\n\t}", "public Object getService(String serviceName);", "public interface Provider {\n Service newService();\n }", "public static synchronized ServiceDomain createDomain(final String name) {\n if (!isInitialized()) {\n init();\n }\n\n if (domains.containsKey(name)) {\n throw new RuntimeException(\"Domain already exists: \" + name);\n }\n\n ServiceDomain domain = new DomainImpl(\n name, registry, endpointProvider, transformers);\n domains.put(name, domain);\n return domain;\n }", "@Override\n public CreateServiceProfileResult createServiceProfile(CreateServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeCreateServiceProfile(request);\n }", "public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}", "CdapService createCdapService();", "ServiceDataResource createServiceDataResource();", "private ServiceFactory() {}", "protected OpUserServiceImpl createServiceImpl() {\r\n return new OpUserServiceImpl();\r\n }", "ProgramActuatorService createProgramActuatorService();", "public static EpitrelloDataServerice creator() {\n\t\tif(dataServerice == null) {\n\t\t\tdataServerice = new DataService();\n\t\t}\n\t\treturn dataServerice;\n\t}", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "public Service getService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service res){\n\t\tService service = new Service();\n\t\t\n\t\tservice.setServiceCode( res.getServiceCode() );\n\t\tservice.setServiceName( res.getServiceName() );\n\t\tservice.setGateway( res.getGateway() );\n\t\tservice.setCurrency( res.getCurrency() );\n\t\tservice.setDestination( res.getDestination() );\n\t\tservice.setUnitOfMeasure( res.getUnitOfMeasure() );\n\t\tservice.setGroupCode( res.getGroupCode() );\n\t\tservice.setGroupDescription( res.getGroupDescription() );\n\t\tservice.setFlightMaterialCode( res.getFlightMaterialCode() );\n\t\tservice.setHotelMaterialCode( res.getHotelMaterialCode() );\n\t\tservice.setParentItemRph( res.getParentItemRph() );\n\t\tservice.setGuestAllocation( res.getGuestAllocation() );\n\t\tservice.setPosnr( res.getPosnr() );\n\t\tservice.setOldPosnr( res.getOldPosnr() );\n\t\tif( res.isMandatory() != null ){\n\t\t\tservice.setMandatory( res.isMandatory().booleanValue() );\n\t\t}\n\t\tif( res.isFree() != null ){\n\t\t\tservice.setFree( res.isFree().booleanValue() );\n\t\t}\n\t\tif( res.isOccupancyBased() != null ){\n\t\t\tservice.setOccupancyBased( res.isOccupancyBased().booleanValue() );\n\t\t}\n\t\tif( res.isDateSpecific() != null ){\n\t\t\tservice.setDateSpecific( res.isDateSpecific().booleanValue() );\n\t\t}\n\t\tif( res.isAllOrNothing() != null ){\n\t\t\tservice.setAllOrNothing( res.isAllOrNothing().booleanValue() );\n\t\t}\n\t\tif( res.isWeightBased() != null ){\n\t\t\tservice.setWeightBased( res.isWeightBased().booleanValue() );\n\t\t}\n\t\tif( res.isTierBased() != null ){\n\t\t\tservice.setTierBased( res.isTierBased().booleanValue() );\n\t\t}\n\t\tif( res.isMonday() != null ){\n\t\t\tservice.setMonday( res.isMonday().booleanValue() );\n\t\t}\n\t\tif( res.isTuesday() != null ){\n\t\t\tservice.setTuesday( res.isTuesday().booleanValue() );\n\t\t}\n\t\tif( res.isWednesday() != null ){\n\t\t\tservice.setWednesday( res.isWednesday().booleanValue() );\n\t\t}\n\t\tif( res.isThursday() != null ){\n\t\t\tservice.setThursday( res.isThursday().booleanValue() );\n\t\t}\n\t\tif( res.isFriday() != null ){\n\t\t\tservice.setFriday( res.isFriday().booleanValue() );\n\t\t}\n\t\tif( res.isSaturday() != null ){\n\t\t\tservice.setSaturday( res.isSaturday().booleanValue() );\n\t\t}\n\t\tif( res.isSunday() ){\n\t\t\tservice.setSunday( res.isSunday().booleanValue() );\n\t\t}\n\t\tif( res.getSelectedDate() != null ){\n\t\t\tservice.setSelectedDate( this.getDate( res.getSelectedDate() ) );\n\t\t}\n\t\tif( res.getDepatureDate() != null ){\n\t\t\tservice.setDepatureDate( this.getDate( res.getDepatureDate() ) );\n\t\t}\n\t\tif( res.getReturnDate() != null ){\n\t\t\tservice.setReturnDate( this.getDate( res.getReturnDate() ) );\n\t\t}\n\t\tif( res.getAdultQty() != null ){\n\t\t\tservice.setAdultQty( res.getAdultQty().byteValue() );\n\t\t}\n\t\tif( res.getChild1Qty() != null ){\n\t\t\tservice.setChild1Qty( res.getChild1Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild2Qty() != null ){\n\t\t\tservice.setChild2Qty( res.getChild2Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild3Qty() != null ){\n\t\t\tservice.setChild3Qty( res.getChild3Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild1MinAge() != null ){\n\t\t\tservice.setChild1MinAge( res.getChild1MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MinAge() != null ){\n\t\t\tservice.setChild2MinAge( res.getChild2MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MinAge() != null ){\n\t\t\tservice.setChild3MinAge( res.getChild3MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild1MaxAge() != null ){\n\t\t\tservice.setChild1MaxAge( res.getChild1MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MaxAge() != null ){\n\t\t\tservice.setChild2MaxAge( res.getChild2MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MaxAge() != null ){\n\t\t\tservice.setChild3MaxAge( res.getChild3MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getTravelAgentFee() != null ){\n\t\t\tservice.setTravelAgentFee( res.getTravelAgentFee().doubleValue() );\n\t\t}\n\t\tif( res.getTotalPrice() != null ){\n\t\t\tservice.setTotalPrice( res.getTotalPrice().doubleValue() );\n\t\t}\n\t\tif( res.getMaxQuantity() != null ){\n\t\t\tservice.setMaxQuantity( res.getMaxQuantity().doubleValue() );\n\t\t}\n\t\tif( res.getAdultPrice() != null ){\n\t\t\tservice.setAdultPrice( res.getAdultPrice().doubleValue() );\n\t\t}\n\t\tif( res.getChild1Price() != null ){\n\t\t\tservice.setChild1Price( res.getChild1Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild2Price() != null ){\n\t\t\tservice.setChild2Price( res.getChild2Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild3Price() != null ){\n\t\t\tservice.setChild3Price( res.getChild3Price().doubleValue() );\n\t\t}\n\t\tif( (res.getAvailableDates() != null) && (res.getAvailableDates().size() > 0) ){\n\t\t\tservice.setAvailableDates( this.convertXMLGregorianCalendarList( res.getAvailableDates() ) );\n\t\t}\n\t\tservice.setServiceDescription( res.getServiceDescription());\n\t\t\n\t\treturn service;\n\t}", "InboundServicesType createInboundServicesType();", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}", "CdapServiceInstance createCdapServiceInstance();", "void addService(Long orderId, Long serviceId);", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "@Produces @IWSBean\n public ServiceFactory produceServiceFactory() {\n return new ServiceFactory(iwsEntityManager, notifications, settings);\n }", "Object getService(String serviceName, boolean checkExistence);", "public Builder withService(final String service) {\n this.service = service;\n return this;\n }", "@Override\n\tpublic CreateServiceInstanceBindingResponse createServiceInstanceBinding(\n\t\t\tCreateServiceInstanceBindingRequest request) {\n\t\tString appId = request.getBindingId();\n\t\tString id = request.getServiceInstanceId();\n\t\tString apikey = userManager.getAPIKey(id, appId);\n\t\tMap<String, Object> credentials = Collections.singletonMap(\"APIKEY\", (Object) apikey);\n\n\t\treturn new CreateServiceInstanceBindingResponse(credentials);\n\t}", "public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}", "public interface Provider {\n Service newService();\n}", "public interface Provider {\n Service newService();\n}", "public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer create(\n long layerId);", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public static ShoppingCartService createShoppingCartService() {\n\t\treturn null;\r\n\t}", "public interface Provider{\n Service newService();\n}", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "public com.vodafone.global.er.decoupling.binding.request.BasicServiceType createBasicServiceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasicServiceTypeImpl();\n }", "@Override\n\tpublic SpringSupplierExtension createService(ServiceContext context) throws Throwable {\n\t\treturn this;\n\t}", "public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}", "public com.vodafone.global.er.decoupling.binding.request.ServiceStatusType createServiceStatusType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ServiceStatusTypeImpl();\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "@Override\r\n\tpublic sn.ucad.master.assurance.bo.Service consulterService(Integer idService) {\n\t\tService service= (Service) serviceRepository.findOne(idService);\r\n\t\tif(service==null) throw new RuntimeException(\"Service introuvable\");\r\n\t\treturn (sn.ucad.master.assurance.bo.Service) service;\r\n\t}", "public static ServiceFactory init() {\n\t\ttry {\n\t\t\tServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI);\n\t\t\tif (theServiceFactory != null) {\n\t\t\t\treturn theServiceFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ServiceFactoryImpl();\n\t}", "public void registerService(String serviceName, Object service);", "public Service(){\n\t\t\n\t}", "public SSLService createDynamicSSLService() {\n return new SSLService(env, sslConfigurations, sslContexts) {\n\n @Override\n Map<SSLConfiguration, SSLContextHolder> loadSSLConfigurations() {\n // we don't need to load anything...\n return Collections.emptyMap();\n }\n\n /**\n * Returns the existing {@link SSLContextHolder} for the configuration\n * @throws IllegalArgumentException if not found\n */\n @Override\n SSLContextHolder sslContextHolder(SSLConfiguration sslConfiguration) {\n SSLContextHolder holder = sslContexts.get(sslConfiguration);\n if (holder == null) {\n // normally we'd throw here but let's create a new one that is not cached and will not be monitored for changes!\n holder = createSslContext(sslConfiguration);\n }\n return holder;\n }\n };\n }", "public Service(int serviceID, String serviceName, double serviceFee, String serviceDescrp){\r\n\t\tthis.serviceName = serviceName;\r\n\t\tthis.serviceID = serviceID;\r\n\t\tthis.serviceFee = serviceFee;\r\n\t\tthis.serviceDescrp = serviceDescrp;\r\n\t}", "public ChromeService getOrCreate(final String path, final ImmutableMap<String, Object> args) {\n return _cache.computeIfAbsent(new ChromeServiceKey(path, args), this::create);\n }", "private Service() {}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "public void startService(String service)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public void forceServiceInstantiation()\n {\n getService();\n\n _serviceModelObject.instantiateService();\n }", "public com.vodafone.global.er.decoupling.binding.request.GetServiceRequest createGetServiceRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetServiceRequestImpl();\n }", "public CreateTaskSetRequest withService(String service) {\n setService(service);\n return this;\n }", "protected static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) {\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(endPoint)\n .client(new OkHttpClient())\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n T service = retrofit.create(clazz);\n return service;\n }", "private ChromeService create(final ChromeServiceKey key) {\n final ImmutableMap<String, String> env = ImmutableMap.of(\n ChromeLauncher.ENV_CHROME_PATH, key._path\n );\n // ^^^ In order to pass this environment in, we need to use a many-argument constructor,\n // which doesn't have obvious default values. So I stole the arguments from the fewer-argument constructor:\n // CHECKSTYLE.OFF: LineLength\n // https://github.com/kklisura/chrome-devtools-java-client/blob/master/cdt-java-client/src/main/java/com/github/kklisura/cdt/launch/ChromeLauncher.java#L105\n // CHECKSTYLE.ON: LineLength\n final ChromeLauncher launcher = new ChromeLauncher(\n new ProcessLauncherImpl(),\n env::get,\n new ChromeLauncher.RuntimeShutdownHookRegistry(),\n new ChromeLauncherConfiguration()\n );\n return launcher.launch(ChromeArguments.defaults(true)\n .additionalArguments(key._args)\n .build());\n }", "public DCAEServiceObject(String serviceId, DCAEServiceRequest request) {\n DateTime now = DateTime.now(DateTimeZone.UTC);\n this.setServiceId(serviceId);\n this.setTypeId(request.getTypeId());\n this.setVnfId(request.getVnfId());\n this.setVnfType(request.getVnfType());\n this.setVnfLocation(request.getVnfLocation());\n this.setDeploymentRef(request.getDeploymentRef());\n this.setCreated(now);\n this.setModified(now);\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "IServiceContext createService(String childContextName,\n\t\t\tIBackgroundWorkerParamDelegate<IBeanContextFactory> registerPhaseDelegate,\n\t\t\tClass<?>... serviceModules);", "public void startService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public DestinationService getDestinationService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.destinationservice.v1.DestinationService res){\n\t\tDestinationService destinationService = new DestinationService();\n\t\t\n\t\tdestinationService.setServiceCode( res.getServiceCode() );\n\t\tdestinationService.setServiceName( res.getServiceName() );\n\t\tdestinationService.setCurrency( res.getCurrency() );\n\t\tif( res.getPrice() != null ){\n\t\t\tdestinationService.setPrice( res.getPrice().doubleValue() );\n\t\t}\n\t\t\n\t\treturn destinationService;\n\t}", "protected abstract ServiceRegistry getNewServiceRegistry();", "public TestService() {}", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }" ]
[ "0.7673732", "0.7462269", "0.73301345", "0.70275474", "0.6919528", "0.6858292", "0.6648843", "0.6587402", "0.65867347", "0.6521695", "0.63915926", "0.63578624", "0.6281042", "0.62622666", "0.6227886", "0.621817", "0.6182051", "0.6159545", "0.6111491", "0.61077315", "0.6100514", "0.6008608", "0.60070956", "0.6000226", "0.5966409", "0.5957292", "0.59366924", "0.58720386", "0.5832499", "0.5767729", "0.5759561", "0.57329184", "0.5722901", "0.57146245", "0.5708186", "0.57060575", "0.56922376", "0.56865764", "0.5673109", "0.5671829", "0.56512713", "0.56372076", "0.56368595", "0.5628088", "0.562759", "0.56156135", "0.5609875", "0.5603473", "0.55996114", "0.5590098", "0.5575557", "0.5574527", "0.55683786", "0.55635995", "0.5563558", "0.5552083", "0.5545868", "0.5544263", "0.5530337", "0.55282205", "0.5523472", "0.54916173", "0.54817367", "0.5457275", "0.5457275", "0.54423356", "0.5441489", "0.54257184", "0.5418126", "0.5409626", "0.54030854", "0.5397624", "0.536594", "0.5342162", "0.5335324", "0.53319824", "0.5328248", "0.5317593", "0.531227", "0.53098917", "0.53012526", "0.5285322", "0.5280229", "0.52792066", "0.5246162", "0.52443695", "0.521892", "0.52155334", "0.52112293", "0.5200308", "0.51993537", "0.5198219", "0.5196183", "0.5195548", "0.51943785", "0.5193116", "0.5183228", "0.51665115", "0.515975", "0.515975" ]
0.6313157
12
Lists all services belonging to a namespace.
default void listServices( com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListServicesMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }", "List<Service> services();", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "public List<CatalogService> getService(String service);", "public List<ServerServices> listServerServices();", "public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }", "public List<String> getServices() throws IOException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();", "public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }", "public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "Namespaces namespaces();", "public List<ServiceInstance> getAllInstances(String serviceName);", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "AGServiceDescription[] getServices()\n throws IOException, SoapException;", "public ArrayList getNamespaces() {\n return m_namespaces;\n }", "public List<ServiceInstance> getAllInstances();", "public List<Service> findAll();", "public Iterator getServices() {\r\n\t\treturn services == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(services.values());\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()), request);\n }", "public void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public List<Servicio> findAll();", "@Test\n\tvoid testAllNamespacesTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = true;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(NAMESPACE_ALL);\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 2);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertTrue(result.contains(\"service-b\"));\n\t}", "public String getAllRunningServices() {\n return \"\";\n }", "public List<ServiceInstance> lookupInstances(String serviceName);", "ImmutableList<T> getServices();", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public com.google.cloud.servicedirectory.v1beta1.ListServicesResponse listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListServicesMethod(), getCallOptions(), request);\n }", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();", "public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}", "Collection<Service> getAllSubscribeService();", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "Collection<Service> getAllPublishedService();", "public Map<String, List<String>> getServices();", "java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();", "public ServiceType[] getAllServices() throws LoadSupportedServicesException{\r\n\t\tthis.loadServices();\r\n\t\treturn this.services;\r\n\t}", "public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }", "public java.util.List<String> getServiceArns() {\n return serviceArns;\n }", "@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceCat> listServiceCat() {\r\n\t\tList<ServiceCat> courses = null;\r\n\t\ttry {\r\n\t\t\tcourses = session.createQuery(\"from ServiceCat\").list();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn courses;\r\n\t}", "public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);\n }", "public Vector getServiceNames(String serviceType) throws ServiceException {\n return namingService.getServiceNames(serviceType);\n }", "@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }", "public List<Function> getFunctions(String namespace, String name);", "public List<Service> getServicesByCategory(Category cat) {\n ServiceRecords sr = company.getServiceRecords();\n List<Service> serviceList = sr.getServiceByCat(cat);\n return serviceList;\n }", "@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "public Map<String,String> getNamespaces() {\n return namespaces;\n }", "ServicesPackage getServicesPackage();", "@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }", "public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);", "@Test\n public void listServiceAccountNamesTest() throws ApiException {\n String owner = null;\n Integer offset = null;\n Integer limit = null;\n String sort = null;\n String query = null;\n Boolean bookmarks = null;\n String mode = null;\n Boolean noPage = null;\n V1ListServiceAccountsResponse response = api.listServiceAccountNames(owner, offset, limit, sort, query, bookmarks, mode, noPage);\n // TODO: test validations\n }", "public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}", "public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {\n final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();\n Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);\n for (Endpoint ep : deployment.getService().getEndpoints()) {\n endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));\n }\n return endpointServiceNames;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceListOrBuilder getServiceListOrBuilder();", "static Set getServiceNames(SSOToken token) throws SMSException,\n SSOException {\n // Get the service names from ServiceManager\n CachedSubEntries cse = CachedSubEntries.getInstance(token,\n DNMapper.serviceDN);\n return (cse.getSubEntries(token));\n }", "public java.util.Map<String,String> getNamespaces() {\n return (_namespaces);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public Collection<Service> createServices();", "public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }", "public Vector getServiceTypes() throws ServiceException {\n return namingService.getServiceTypes();\n }", "@ManagedAttribute(description = \"Retrieves the list of Registered Services in a slightly friendlier output.\")\n public final List<String> getRegisteredServicesAsStrings() {\n final List<String> services = new ArrayList<>();\n\n for (final RegisteredService r : this.servicesManager.getAllServices()) {\n services.add(new StringBuilder().append(\"id: \").append(r.getId())\n .append(\" name: \").append(r.getName())\n .append(\" serviceId: \").append(r.getServiceId())\n .toString());\n }\n\n return services;\n }", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "public ListSubscriptionForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List listar() {\n Query query = Database.manager.createNamedQuery(\"StatussistemaDTO.findAll\");\n query.setHint(QueryHints.MAINTAIN_CACHE, HintValues.FALSE);// evita consulta em cache\n List lista = query.getResultList();\n return lista;\n }", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException {\n \tSubscriptionResource sr = namespaceCache.get( baseNS );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNS, null, null );\n\t\t\t\tnamespaceCache.put( baseNS, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "public ServiceCombo getServices()\n {\n return services;\n }", "public static List<String> getPrinterServiceNameList() {\n\n // get list of all print services\n PrintService[] services = PrinterJob.lookupPrintServices();\n List<String> list = new ArrayList<>();\n\n for (PrintService service : services) {\n list.add(service.getName());\n }\n return list;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces();", "List<ServiceChargeSubscription> getSCPackageList() throws EOTException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces(\n @QueryMap ListComponentForAllNamespaces queryParameters);", "public Object _getLSservices(CommandInterpreter ci) {\n\t\tSet<Registration> regs = identityManager.getLocalServices();\n\t\tci.print(\"Local Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\n\t\tregs = identityManager.getRemoteServices();\n\t\tci.print(\"Remote Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public List<ServiceInstance<InstanceDetails>> listInstances() throws Exception {\n\t\tCollection<String> serviceNames = serviceDiscovery.queryForNames();\n\t\tSystem.out.println(serviceNames.size() + \" type(s)\");\n\t\tList<ServiceInstance<InstanceDetails>> list = new ArrayList<>();\n\t\tfor (String serviceName : serviceNames) {\n\t\t\tCollection<ServiceInstance<InstanceDetails>> instances = serviceDiscovery.queryForInstances(serviceName);\n\t\t\tSystem.out.println(serviceName);\n\t\t\tfor (ServiceInstance<InstanceDetails> instance : instances) {\n\t\t\t\toutputInstance(instance);\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "@GetMapping (\"/servicos\")\n\t\tpublic List<ServicoModel> pegarTodos() {\t\t\n\t\t\treturn repository.findAll();\n\t\t}", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "public ListComponentForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }", "public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET)\n public List<MedicalService> getAllMedServices(){\n return medicalServiceService.getAllMedServices();\n }" ]
[ "0.64935195", "0.6453933", "0.64341605", "0.635421", "0.6311747", "0.63055414", "0.6249907", "0.6245897", "0.61578006", "0.61178577", "0.6072067", "0.6054534", "0.59871244", "0.5966775", "0.5935423", "0.5935423", "0.58917505", "0.5849832", "0.581025", "0.57962644", "0.5793632", "0.574936", "0.57236755", "0.57212436", "0.56950366", "0.56674695", "0.5660269", "0.5637026", "0.56265205", "0.5617056", "0.5617056", "0.56141424", "0.56049407", "0.56049407", "0.55928636", "0.5559752", "0.55508715", "0.55502456", "0.55502456", "0.5496926", "0.54907554", "0.54881597", "0.5484769", "0.54668105", "0.5454751", "0.5447392", "0.5428812", "0.54178226", "0.5412344", "0.5381632", "0.53804183", "0.5366807", "0.53603697", "0.5344279", "0.5342544", "0.5333142", "0.5332322", "0.53282326", "0.53212845", "0.53199553", "0.53068334", "0.529328", "0.5272313", "0.5267198", "0.5261402", "0.52501225", "0.52492553", "0.5218647", "0.5211657", "0.5204491", "0.5196003", "0.5196003", "0.5183269", "0.5145079", "0.5142737", "0.5141933", "0.5135869", "0.51259315", "0.51124656", "0.51063913", "0.51063913", "0.5105184", "0.51015574", "0.5090374", "0.5085149", "0.50716203", "0.5066051", "0.5055776", "0.50406456", "0.5034326", "0.50232947", "0.5021592", "0.50177205", "0.5014178", "0.5008764", "0.500299", "0.49958476", "0.49821472", "0.4979585", "0.49751914" ]
0.5548502
39
Deletes a service. This also deletes all endpoints associated with the service.
default void deleteService( com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteServiceMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteService(){\r\n \tif(editService != null){\r\n \t\tint id = editService.getId();\r\n \t\ttry {\r\n\t \t\tif(id == 0){\r\n\t \t\t\tthis.getLog().error(\" unable to deleteService(). No id selected\");\r\n\t \t\t}else{\r\n\t \t\t\tthis.getLog().info(\" deleteService(\" + id + \")\");\r\n\t \t\t\tConnectionFactory.createConnection().deleteservice(editService.getId());\r\n\t \t\t}\r\n \t\t\tthis.getServiceList().populateServiceListFromDB();\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "public void deleteService(String serviceName) {\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\").child(serviceName);\n dR.getParent().child(serviceName).removeValue();\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteService(com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request);\n }", "public void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "public com.google.protobuf.Empty deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteServiceMethod(), getCallOptions(), request);\n }", "@GetMapping(\"/delete_service\")\n public String deleteService(@RequestParam(value = \"serviceID\") int serviceID){\n serviceServiceIF.deleteService(serviceServiceIF.getServiceByID(serviceID));\n return \"redirect:/admin/service/setup_service\";\n }", "public void markServiceDelete() throws JNCException {\n markLeafDelete(\"service\");\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;", "void delete(ServiceSegmentModel serviceSegment);", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "LinkedService deleteById(String id);", "void removeServices() throws IOException, SoapException;", "@Override\n public DeleteServiceProfileResult deleteServiceProfile(DeleteServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteServiceProfile(request);\n }", "@Override\n\tpublic Integer deleteServices(com.easybooking.model.BookedServices services) {\n\t\tint i = 0;\n\t\tSessionFactory factory = HibernateUtil.getSesssionFactory();\n\t\tSession session = factory.openSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(services);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\tfactory.close();\n\t\treturn i;\n\t}", "public void verifyToDeleteService() throws Throwable{\r\n\t\tServicesPage srvpage=new ServicesPage();\r\n\t\tselServicOpt.click();\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\t\r\n\t\tif(getServiceText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getServiceText().getText()+\" is deleted\",true);\r\n\t\t\tselServiceBtn.click();\r\n\t\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\t\tsrvpage.selectServices();\r\n\t\t\tdeleteService();\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdeleteService();\r\n\t\t}\r\n\t}", "boolean removeService(T service);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "public void serviceRemoved(String serviceID);", "public void clearServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete(); \n }\n \n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceUri, String endpointName, String serviceConfigurationName);", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "@DeleteMapping(\"/costo-servicios/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCostoServicio(@PathVariable Long id) {\n log.debug(\"REST request to delete CostoServicio : {}\", id);\n costoServicioService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteServiceCat(String serviceItemId) {\r\n\t\ttry {\r\n\t\t\tServiceCat serviceItem = (ServiceCat) session.get(ServiceCat.class, serviceItemId);\r\n\t\t\tsession.delete(serviceItem);\r\n\t\t} catch (Exception e) {\r\n\t\t\ttransaction.rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "@Override\n\tpublic void delete(ServiceFee entites) {\n\t\tservicefeerepo.delete(entites);\n\t}", "void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);", "@Override\n\tpublic String removeService(String serviceName) {\n\t\tServiceManager serviceManager = loadBalance.search(serviceName);\n\t\tif (serviceManager == null) {\n\t\t\treturn \"Service Invalid\";\n\t\t}\n\t\tArrayList<String> hostNames = serviceManager.getHostnames();\n\t\twhile (hostNames.size() > 0) {\n\t\t\tthis.removeInstance(serviceName, hostNames.get(0));\n\t\t}\n\n\t\t// remove service from cluster/loadbalancer/Trie structure\n\t\tif (loadBalance.deleteService(serviceName)) {\n\t\t\treturn \"Service Removed\";\n\t\t}\n\t\treturn \"Service Invalid\";\n\t}", "public void onDeleteService(final ForwardEvent event) {\r\n\t\t// Get the listitem from the event's target (button)\r\n\t\t// parent(hbox)->parent(listcell)->parent(listitem)\r\n\t\tfinal Listitem li = (Listitem) event.getOrigin().getTarget().getParent().getParent().getParent();\r\n\t\tfinal MasterService service = (MasterService) li.getValue();\r\n\r\n\t\t// delete the service\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tpaymentDAO.deleteService(service);\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tint indx = getListIndex(service, services);\r\n\t\tservices.remove(indx);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tClients.evalJavaScript(\"$.jGrowl(\\\"Successfully Deleted the service\\\", {life:2000});\");\r\n\t}", "public static <T extends NetworkEntity> void testAddDelete(\n EndpointService service, T entity, TestDataFactory testDataFactory) {\n List<Endpoint> endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints, \"Endpoint list should be empty, not null when no endpoints exist\");\n assertTrue(endpoints.isEmpty(), \"Endpoint should be empty when none added\");\n\n // test additions\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(2, endpoints.size(), \"2 endpoints have been added\");\n assertEquals(\n 1, endpoints.get(0).getMachineTags().size(), \"The endpoint should have 1 machine tag\");\n\n // test deletion, ensuring correct one is deleted\n service.deleteEndpoint(entity.getKey(), endpoints.get(0).getKey());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(1, endpoints.size(), \"1 endpoint should remain after the deletion\");\n Endpoint expected = testDataFactory.newEndpoint();\n Endpoint created = endpoints.get(0);\n assertLenientEquals(\"Created entity does not read as expected\", expected, created);\n }", "boolean removeServiceSubscriber(Service service);", "public void deleteAllCommands(Service service) throws Exception {\n ArrayList<CommandOfService> allCommands = DAO.getPendingCommandsOfOneService(service);\n for(CommandOfService command : allCommands) {\n this.declineTransaction(command);\n }\n\n }", "void delete(\n String resourceGroupName,\n String searchServiceName,\n String sharedPrivateLinkResourceName,\n UUID clientRequestId,\n Context context);", "void deleteSegmentByIdAndType(ServiceSegmentModel serviceSegment);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "void clearService();", "@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}", "private void removeServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n //Remove directory from map \"servicesDirectories\"\n servicesDirectories.remove(serviceID);\n \n }\n \n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "public void unRegisterService(String serviceKey, Node node) {\n\t\tlog.info(\"UnRegistering the service \" + serviceKey);\n\t\ttry {\n\t\t\tString authToken = getAuthToken(node.getSecurityUrl()); \n\t\t\tDeleteService deleteService = new DeleteService();\n\t\t\tdeleteService.setAuthInfo(authToken);\n\t\t\tdeleteService.getServiceKey().add(serviceKey);\n\t\t\tgetUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteService(deleteService);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Unable to register service \" + serviceKey\n\t\t\t\t\t+ \" .\" + e.getMessage(),e);\n\t\t}\n\t}", "@DeleteMapping(value = {\"/deleteOfferedServiceById/{offeredServiceId}\", \"/deleteOfferedServiceById/{offeredServiceId}/\"})\n\tpublic OfferedServiceDto deleteOfferedServiceById(@PathVariable(\"offeredServiceId\") String offeredServiceId) throws InvalidInputException{\n\t\tOfferedService offeredService = new OfferedService();\n\t\ttry {\n\t\t\tofferedService = offeredServiceService.deleteOfferedService(offeredServiceId);\n\t\t}catch (RuntimeException e) {\n\t\t\tthrow new InvalidInputException(e.getMessage());\n\t\t}\n\n\t\treturn convertToDto(offeredService);\n\t}", "void delete(\n String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "public void stopService(String service)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "public void removeServiceConfig(String serviceName) throws SMSException {\n try {\n ServiceConfigManager scm = new ServiceConfigManager(serviceName,\n token);\n scm.deleteOrganizationConfig(orgName);\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager: Unable to \"\n + \"delete Service Config\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n }", "void delete(String id) throws PSDataServiceException, PSNotFoundException;", "public void unsetServiceValue() throws JNCException {\n delete(\"service\");\n }", "public boolean delete() {\n return delete(Datastore.fetchDefaultService());\n }", "public void removeServiceDomain(QName serviceName) {\n _serviceDomains.remove(serviceName);\n }", "public void delete(URI url) throws RestClientException {\n restTemplate.delete(url);\n }", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "net.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;", "@DEL\n @Path(\"/{id}\")\n @Consumes({\"application/json\"})\n @Produces({\"application/json\"})\n public RestRsp<Tp> deleteSite(@PathParam(\"id\") final String id) throws ServiceException {\n if(!UuidUtil.validate(id)) {\n ServiceExceptionUtil.throwBadRequestException();\n }\n return new RestRsp<Tp>(ResultConstants.SUCCESS, service.deleteTp(id));\n }", "public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }", "@RequestMapping(path = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable long id) {\n service.delete(id);\n }", "public void unregisterService(String serviceName){\n jmc.unregisterService(serviceName);\n }", "public void removeServiceClient(final String serviceName) {\n boolean needToSave = ProjectManager.mutex().writeAccess(new Action<Boolean>() {\n public Boolean run() {\n boolean needsSave = false;\n boolean needsSave1 = false;\n\n /** Remove properties from project.properties\n */\n String featureProperty = \"wscompile.client.\" + serviceName + \".features\"; // NOI18N\n String packageProperty = \"wscompile.client.\" + serviceName + \".package\"; // NOI18N\n String proxyProperty = \"wscompile.client.\" + serviceName + \".proxy\"; //NOI18N\n\n EditableProperties ep = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties ep1 = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n if(ep.getProperty(featureProperty) != null) {\n ep.remove(featureProperty);\n needsSave = true;\n }\n\n if(ep.getProperty(packageProperty) != null) {\n ep.remove(packageProperty);\n needsSave = true;\n }\n\n if(ep1.getProperty(proxyProperty) != null) {\n ep1.remove(proxyProperty);\n needsSave1 = true;\n }\n\n if(needsSave) {\n helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n\n if(needsSave1) {\n helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep1);\n }\n\n /** Locate root of web service client node structure in project,xml\n */\n Element data = helper.getPrimaryConfigurationData(true);\n NodeList nodes = data.getElementsByTagName(WEB_SERVICE_CLIENTS);\n Element clientElements = null;\n\n /* If there is a root, get all the names of the child services and search\n * for the one we want to remove.\n */\n if(nodes.getLength() >= 1) {\n clientElements = (Element) nodes.item(0);\n NodeList clientNameList = clientElements.getElementsByTagNameNS(AppClientProjectType.PROJECT_CONFIGURATION_NAMESPACE, WEB_SERVICE_CLIENT_NAME);\n for(int i = 0; i < clientNameList.getLength(); i++ ) {\n Element clientNameElement = (Element) clientNameList.item(i);\n NodeList nl = clientNameElement.getChildNodes();\n if(nl.getLength() == 1) {\n Node n = nl.item(0);\n if(n.getNodeType() == Node.TEXT_NODE) {\n if(serviceName.equalsIgnoreCase(n.getNodeValue())) {\n // Found it! Now remove it.\n Node serviceNode = clientNameElement.getParentNode();\n clientElements.removeChild(serviceNode);\n helper.putPrimaryConfigurationData(data, true);\n needsSave = true;\n }\n }\n }\n }\n }\n return needsSave || needsSave1;\n }\n });\n \n // !PW Lastly, save the project if we actually made any changes to any\n // properties or the build script.\n if(needToSave) {\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch(IOException ex) {\n NotifyDescriptor desc = new NotifyDescriptor.Message(\n NbBundle.getMessage(AppClientProjectWebServicesClientSupport.class,\"MSG_ErrorSavingOnWSClientRemove\", serviceName, ex.getMessage()), // NOI18N\n NotifyDescriptor.ERROR_MESSAGE);\n DialogDisplayer.getDefault().notify(desc);\n }\n }\n removeServiceRef(serviceName);\n }", "public boolean delete(Service servico){\n for (Service servicoLista : Database.servico) {\n if(idSaoIguais(servicoLista,servico)){\n Database.servico.remove(servicoLista);\n return true;\n }\n }\n return false;\n }", "@DELETE\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response deleteServicioDeAlojamiento(ServicioDeAlojamiento servicioDeAlojamiento) {\n\t\ttry{\n\t\t\tAlohAndesTransactionManager tm = new AlohAndesTransactionManager( getPath( ) );\n\t\t\ttm.deleteServicioDeAlojamiento(servicioDeAlojamiento);\n\t\t\treturn Response.status(200).entity(servicioDeAlojamiento).build();\n\t\t}\n\t\tcatch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}", "public void doStopService() throws ServiceException {\r\n // Nothing to do\r\n super.doStopService();\r\n }", "public boolean delete(Object[] obj) {\n\t\tString sql=\"delete from services where ServiceID=?\";\n\t\tDbManager db=new DbManager();\n\n\t\treturn db.execute(sql, obj);\n\t}", "void stopServices() throws IOException, SoapException;", "@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }", "@PostMapping(\"/delete\")\n public ResponseEntity<ServiceResult> deleteTest(@RequestBody Integer id) {\n return new ResponseEntity<ServiceResult>(testService.deleteTest(id), HttpStatus.OK);\n }", "void unsetServiceId();", "public export.serializers.avro.DeviceInfo.Builder clearService() {\n service = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "@DeleteMapping(\"/operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete Operation : {}\", id);\n operationService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteEntity(final String entityId) throws OAuthServiceException {\n if (entityId != null) {\n final WebResource deleteResource = tokenResource.path(entityId);\n final ClientResponse resp =\n deleteResource.cookie(getCookie()).delete(ClientResponse.class);\n if (resp != null) {\n final int status = resp.getStatus();\n if (status != TOKEN_UPDATED) {\n throw new OAuthServiceException(\n \"failed to delete the token: status code=\" + status);\n }\n }\n }\n }", "public void removeDeviceServiceLink();", "public void stopService();", "@DeleteMapping(\"/usuarios/{id}\")\n\t public void delete(@PathVariable Integer id) {\n\t service.delete(id);\n\t }", "@RequestMapping( value = \"/{id}\", method = RequestMethod.DELETE )\n public void delete(@PathVariable(value=\"id\") int id){\n classService.delete(id);\n }", "public void deleteById(String id);", "public void unassignService(String serviceName) throws SMSException {\n // if (coexistMode) {\n // amsdk.unassignService(serviceName);\n // } else {\n removeServiceConfig(serviceName);\n // }\n }", "public void removeFiles() throws ServiceException;", "@Override\n public void removedService(final ServiceReference<ComponentFactory> reference, final ComponentFactory service)\n {\n final String productType = (String)reference.getProperty(ComponentConstants.COMPONENT_NAME);\n \n m_Logging.info(\"Unregistering factory for: %s\", productType);\n \n final FactoryInternal factory = m_Factories.get(productType);\n \n //make unavailable via framework\n tryMakeFactoryUnavailable(factory);\n \n // allow proxy services to do clean up first\n tryProxyOnRemoveFactory(factory);\n \n //remove all associated factory objects\n tryRemoveAllFactoryObjects(factory);\n //unreg the rest of the services and other cleanup\n tryCleanupFactory(factory);\n \n //make unavailable to management services\n tryRemoveFactory(productType);\n \n //dispose of the factory instance\n tryDisposeFactory(productType);\n \n //remove reference to service\n tryUngetService(reference);\n }", "void delete(String id, boolean force) throws PSDataServiceException, PSNotFoundException;", "LinkedService deleteByIdWithResponse(String id, Context context);", "@Override\n\tpublic int deleteCallServiceByIds(String s) {\n\t\tList ids = new ArrayList();\n\t\tCollections.addAll(ids, s.split(\",\"));\n\t\treturn dgCallServiceMapper.deleteIds(ids);\n\t}", "void deleteById(final String id);", "void removeHost(Service oldHost);", "void delete(URI url) throws RestClientException;", "@Override\n\tpublic void deleteServiceInstanceBinding(DeleteServiceInstanceBindingRequest request) {\n\t\tuserManager.deleteUser(request.getServiceInstanceId());\n\t}", "public void deleteDirectoryEntriesFromCollection(\n TableServiceClient tableServiceClient, String tableName) {\n if (TableServiceClientUtils.tableExists(tableServiceClient, tableName)) {\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n tableClient.deleteTable();\n } else {\n logger.warn(\n \"No storage table {} found to be removed. This should only happen when deleting a file-less dataset.\",\n tableName);\n }\n }", "@DeleteMapping(\"/deleteStaff/{id}\")\n\tpublic void deleteStaff(@PathVariable(\"id\") int id) {\n\t\tstaffService.deleteStaff(id);\n\t}", "private void unregister(final ServiceReference serviceReference) {\n final ServiceRegistration proxyRegistration;\n synchronized (this.proxies) {\n proxyRegistration = this.proxies.remove(serviceReference);\n }\n\n if (proxyRegistration != null) {\n log.debug(\"Unregistering {}\", proxyRegistration);\n this.bundleContext.ungetService(serviceReference);\n proxyRegistration.unregister();\n }\n }", "@DeleteMapping(\"/person/{id}\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate void deletePerson(@PathVariable(\"id\") int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n }\r\n}", "@Secured(\"ROLE_ADMIN\")\n @DeleteMapping(value = \"/{id}\")\n public ResponseEntity<Map<String, Object>> delete(@PathVariable Long id) {\n\n try {\n \t\n \tList<ServicioOfrecido> listaServiciosOfrecidos = servOfreServ.buscarPorProfesional(profesionalService.findOne(id));\n \tfor (ServicioOfrecido servOfre : listaServiciosOfrecidos) {\n\t\t\t\tservOfreServ.delete(servOfre.getId_servicioOfrecido());\n\t\t\t}\n \tprofesionalService.delete(id);\n \t\n }catch(DataAccessException e) {\n return new ResponseEntity<Map<String,Object>>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity<Map<String,Object>>(HttpStatus.OK);\n }", "@Override\n\tpublic void unregisterService(String service) {\n\t\tassert((service!=null)&&(!\"\".equals(service))); //$NON-NLS-1$\n\t\tsuper.unregisterService(service);\n\t\t// Informs the other kernels about this registration\n\t\tgetMTS(NetworkMessageTransportService.class).broadcast(new KernelMessage(YellowPages.class,KernelMessage.Type.YELLOW_PAGE_UNREGISTERING,service,null));\n\t}", "@DeleteMapping(\"/api/students\")\n public void deleteStudentById(@PathVariable(value = \"id\") Long id) {\n this.studentService.deleteStudentById(id);\n }", "public void deleteSiteStats () throws DataServiceException;", "@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }", "public void delete() throws NotAuthorizedException, ConflictException,\n\t\t\tBadRequestException {\n\t}", "@DeleteMapping(\"/data-set-operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDataSetOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete DataSetOperation : {}\", id);\n dataSetOperationRepository.delete(id);\n dataSetOperationSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void serviceRemoved(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"removed serivce: \" + event);\n\t\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Ads : {}\", id);\n adsRepository.delete(id);\n adsSearchRepository.delete(id);\n }", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "public void stopService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n return beginDeleteWithResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)\n .flatMap((Response<Void> res) -> Mono.empty());\n }", "@DeleteMapping(\"/statuts/{id}\")\n public void deletStatut(@PathVariable(\"id\") int id) {\n \tserviceStatut.deletStatut(id);\n }" ]
[ "0.70450443", "0.67593014", "0.66541475", "0.66451925", "0.65834814", "0.65828335", "0.6460537", "0.64594084", "0.6347396", "0.6284119", "0.62804425", "0.6108679", "0.6106046", "0.60682994", "0.60645527", "0.58558565", "0.5839294", "0.5808563", "0.5804006", "0.5756423", "0.5747112", "0.5726717", "0.57241875", "0.5702624", "0.56764156", "0.56697875", "0.5665625", "0.5659889", "0.5648281", "0.5603389", "0.55829763", "0.5561277", "0.5548073", "0.55315274", "0.5491906", "0.54662174", "0.54646283", "0.54513633", "0.5433002", "0.54255736", "0.5411827", "0.53982407", "0.53903794", "0.53282475", "0.532687", "0.5301939", "0.52671015", "0.52353466", "0.5221709", "0.5206328", "0.52047706", "0.51925236", "0.51877487", "0.5179684", "0.51765466", "0.5175395", "0.51737547", "0.5163081", "0.51511574", "0.5121296", "0.5110555", "0.5108109", "0.5103516", "0.510232", "0.50974673", "0.5093182", "0.5092203", "0.50919497", "0.5084722", "0.5040488", "0.5038452", "0.5026586", "0.5026192", "0.5020031", "0.50196624", "0.50157815", "0.5005474", "0.49884576", "0.49871337", "0.49838", "0.4981143", "0.49676016", "0.49477962", "0.4938727", "0.4928821", "0.49246097", "0.49220797", "0.49220532", "0.4914359", "0.4912198", "0.4908454", "0.4907959", "0.49064294", "0.489305", "0.48838612", "0.48790187", "0.48723456", "0.48553354", "0.4849594", "0.4847693" ]
0.62102234
11
Creates an endpoint, and returns the new endpoint.
default void createEndpoint( com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateEndpointMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public CreateEndpointResult createEndpoint(CreateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeCreateEndpoint(request);\n }", "public com.google.cloud.servicedirectory.v1beta1.Endpoint createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateEndpointMethod(), getCallOptions(), request);\n }", "EndPoint createEndPoint();", "public abstract Endpoint createEndpoint(String bindingId, Object implementor);", "public org.hl7.fhir.Uri addNewEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().add_element_user(ENDPOINT$8);\n return target;\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Endpoint>\n createEndpoint(com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request);\n }", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "public void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateEndpointMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public Endpoint addNewEndpoint(String entity)\n\t\t{\n\t\t\tElement endpointElement = document.createElement(ENDPOINT_ELEMENT_NAME);\n\t\t\tEndpoint endpoint = new Endpoint(endpointElement);\n\t\t\tendpoint.setEntity(entity);\n\n\t\t\tuserElement.appendChild(endpointElement);\n\t\t\tendpointsList.add(endpoint);\n\n\t\t\treturn endpoint;\n\t\t}", "public String createEndpoint(EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties);\n }", "public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "String createEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public Endpoint createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Endpoint createAndPublishEndpoint(String address, Object implementor,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public void addEndpoint(Endpoint endpoint)\r\n {\r\n getEndpoints().add(endpoint);\r\n }", "public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection addNewEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n return target;\r\n }\r\n }", "UMOImmutableEndpoint createOutboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void configureEndpoint(Endpoint endpoint);", "public Builder setEndpoint(String endpoint) {\n this.endpoint = Preconditions.checkNotNull(endpoint, \"Endpoint is null.\");\n return this;\n }", "@WebMethod\n URI exposeEndpoint(Endpoint endpoint);", "public Endpoint getEndpoint(String uri) {\n Endpoint answer;\n synchronized (endpoints) {\n answer = endpoints.get(uri);\n if (answer == null) {\n try {\n\n String splitURI[] = ObjectHelper.splitOnCharacter(uri, \":\", 2);\n if (splitURI[1] != null) {\n String scheme = splitURI[0];\n Component component = getComponent(scheme);\n\n if (component != null) {\n answer = component.createEndpoint(uri);\n\n if (answer != null && LOG.isDebugEnabled()) {\n LOG.debug(uri + \" converted to endpoint: \" + answer + \" by component: \"+ component);\n }\n }\n }\n if (answer == null) {\n answer = createEndpoint(uri);\n }\n\n if (answer != null && answer.isSingleton()) {\n startServices(answer);\n endpoints.put(uri, answer);\n \tlifecycleStrategy.onEndpointAdd(answer);\n }\n } catch (Exception e) {\n throw new ResolveEndpointFailedException(uri, e);\n }\n }\n }\n return answer;\n }", "public static EndpointMBean getAddEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "void setEndpoint(String endpoint);", "public Builder url(URI endpoint) {\n return server(endpoint);\n }", "UMOImmutableEndpoint createResponseEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void addPeerEndpoint(PeerEndpoint peer);", "@Override\n public UpdateEndpointResult updateEndpoint(UpdateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateEndpoint(request);\n }", "Endpoint<R> borrowEndpoint() throws EndpointBalancerException;", "public HttpEndpoint( String theEndpoint ) {\n\t\tthis( theEndpoint, true );\n\t}", "UMOImmutableEndpoint createInboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder getEndpointBuilder() {\n return getEndpointFieldBuilder().getBuilder();\n }", "public void setEndpointId(String endpointId);", "public RgwAdminBuilder endpoint(String endpoint) {\n this.endpoint = endpoint;\n return this;\n }", "@Override\n public Endpoint build() throws ConstraintViolationException {\n VocabUtil.getInstance().validate(endpointImpl);\n return endpointImpl;\n }", "public ReplicationObject withEndpointType(EndpointType endpointType) {\n this.endpointType = endpointType;\n return this;\n }", "EndpointType endpointType();", "public void addEndpoint(Endpoint endpoint)\n\t\t{\n\t\t\tEndpoint newEndpoint = addNewEndpoint(endpoint.getEntity());\n\t\t\tnewEndpoint.setStatus(endpoint.getStatus());\n\t\t\tnewEndpoint.setState(endpoint.getState());\n\t\t\tfor (Media media : endpoint.getMedias())\n\t\t\t\tnewEndpoint.addMedia(media);\n\t\t}", "private EndPoint createDotEndPoint(EndPointAnchor anchor)\r\n {\r\n DotEndPoint endPoint = new DotEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setTarget(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n\r\n return endPoint;\r\n }", "public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder getEndpointBuilder() {\n \n onChanged();\n return getEndpointFieldBuilder().getBuilder();\n }", "Adresse createAdresse();", "Endpoint getDefaultEndpoint();", "void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "String endpoint();", "public W3CEndpointReference createW3CEndpointReference(String address, QName interfaceName,\n QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters, List<Element> elements, Map<QName, String> attributes) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Builder mergeEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (endpoint_ != null) {\n endpoint_ =\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.newBuilder(endpoint_).mergeFrom(value).buildPartial();\n } else {\n endpoint_ = value;\n }\n onChanged();\n } else {\n endpointBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName,\n QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters);", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "public EndpointDetail() {\n }", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "public interface ApiEndpointDefinition extends Serializable {\n\n\t/**\n\t * Get the endpoint class.\n\t * @return the endpoint class\n\t */\n\tClass<?> getEndpointClass();\n\n\t/**\n\t * Get the endpoint type.\n\t * @return the endpoint type\n\t */\n\tApiEndpointType getType();\n\n\t/**\n\t * Get the scanner type.\n\t * @return the scanner type\n\t */\n\tJaxrsScannerType getScannerType();\n\n\t/**\n\t * Get the endpoint path.\n\t * @return the endpoint path\n\t */\n\tString getPath();\n\n\t/**\n\t * Get the API context id to which the endpoint is bound.\n\t * @return the API context id to which the endpoint is bound\n\t */\n\tString getContextId();\n\n\t/**\n\t * Init the endpoint context.\n\t * @return <code>true</code> if initialized, <code>false</code> if already initialized\n\t */\n\tboolean init();\n\n\t/**\n\t * Create a new {@link ApiEndpointDefinition}.\n\t * @param endpointClass The endpoint class (not null)\n\t * @param type The endpoint type\n\t * @param scannerType The scanner type\n\t * @param path The endpoint path\n\t * @param contextId the API context id to which the endpoint is bound\n\t * @param initializer Initializer (not null)\n\t * @return A new {@link ApiEndpointDefinition} instance\n\t */\n\tstatic ApiEndpointDefinition create(Class<?> endpointClass, ApiEndpointType type, JaxrsScannerType scannerType,\n\t\t\tString path, String contextId, Callable<Void> initializer) {\n\t\treturn new DefaultApiEndpointDefinition(endpointClass, type, scannerType, path, contextId, initializer);\n\t}\n\n}", "public InputEndpoint withEndpointName(String endpointName) {\n this.endpointName = endpointName;\n return this;\n }", "Address createAddress();", "EndpointDetails getEndpointDetails();", "public Builder clearEndpoint() {\n if (endpointBuilder_ == null) {\n endpoint_ = null;\n onChanged();\n } else {\n endpoint_ = null;\n endpointBuilder_ = null;\n }\n\n return this;\n }", "synchronized MutableSpan setEndpoint(Endpoint endpoint) {\n for (int i = 0; i < annotations.size(); i++) {\n V1Annotation a = annotations.get(i);\n if (a.endpoint().equals(Endpoints.UNKNOWN)) {\n annotations.set(i, V1Annotation.create(a.timestamp(), a.value(), endpoint));\n }\n }\n this.endpoint = endpoint;\n return this;\n }", "public VersionInfo withEndpointUrl(String endpointUrl) {\n this.endpointUrl = endpointUrl;\n return this;\n }", "interface WithPrivateEndpoint {\n /**\n * Specifies privateEndpoint.\n * @param privateEndpoint The resource of private end point\n * @return the next update stage\n */\n Update withPrivateEndpoint(PrivateEndpointInner privateEndpoint);\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder> \n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n endpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder>(\n getEndpoint(),\n getParentForChildren(),\n isClean());\n endpoint_ = null;\n }\n return endpointBuilder_;\n }", "PortDefinition createPortDefinition();", "public static EndpointMBean getSubtractEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}", "public final EObject entryRuleEndpoint() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEndpoint = null;\n\n\n try {\n // InternalMappingDsl.g:3450:49: (iv_ruleEndpoint= ruleEndpoint EOF )\n // InternalMappingDsl.g:3451:2: iv_ruleEndpoint= ruleEndpoint EOF\n {\n newCompositeNode(grammarAccess.getEndpointRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEndpoint=ruleEndpoint();\n\n state._fsp--;\n\n current =iv_ruleEndpoint; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "@Override\n public GetServiceEndpointResult getServiceEndpoint(GetServiceEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceEndpoint(request);\n }", "public static EndpointMBean getMultiplyEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private void createEndpointElement(JsonObject swaggerObject, String swaggerVersion) throws RegistryException {\n\t\t/*\n\t\tExtracting endpoint url from the swagger document.\n\t\t */\n\t\tif (SwaggerConstants.SWAGGER_VERSION_12.equals(swaggerVersion)) {\n\t\t\tJsonElement endpointUrlElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tif (endpointUrlElement == null) {\n\t\t\t\tlog.warn(\"Endpoint url is not specified in the swagger document. Endpoint creation might fail. \");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tendpointUrl = endpointUrlElement.getAsString();\n\t\t\t}\n\t\t} else if (SwaggerConstants.SWAGGER_VERSION_2.equals(swaggerVersion)) {\n\t\t\tJsonElement transportsElement = swaggerObject.get(SwaggerConstants.SCHEMES);\n\t\t\tJsonArray transports = (transportsElement != null) ? transportsElement.getAsJsonArray() : null;\n\t\t\tString transport = (transports != null) ? transports.get(0).getAsString() + \"://\" : DEFAULT_TRANSPORT;\n\t\t\tJsonElement hostElement = swaggerObject.get(SwaggerConstants.HOST);\n\t\t\tString host = (hostElement != null) ? hostElement.getAsString() : null;\n if (host == null) {\n log.warn(\"Endpoint(host) url is not specified in the swagger document. \"\n + \"The host serving the documentation is to be used(including the port) as endpoint host\");\n\n if(requestContext.getSourceURL() != null) {\n URL sourceURL = null;\n try {\n sourceURL = new URL(requestContext.getSourceURL());\n } catch (MalformedURLException e) {\n throw new RegistryException(\"Error in parsing the source URL. \", e);\n }\n host = sourceURL.getAuthority();\n }\n }\n\n if (host == null) {\n log.warn(\"Can't derive the endpoint(host) url when uploading swagger from file. \"\n + \"Endpoint creation might fail. \");\n return;\n }\n\n\t\t\tJsonElement basePathElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tString basePath = (basePathElement != null) ? basePathElement.getAsString() : DEFAULT_BASE_PATH;\n\n\t\t\tendpointUrl = transport + host + basePath;\n\t\t}\n\t\t/*\n\t\tCreating endpoint artifact\n\t\t */\n\t\tOMFactory factory = OMAbstractFactory.getOMFactory();\n\t\tendpointLocation = EndpointUtils.deriveEndpointFromUrl(endpointUrl);\n\t\tString endpointName = EndpointUtils.deriveEndpointNameWithNamespaceFromUrl(endpointUrl);\n\t\tString endpointContent = EndpointUtils\n\t\t\t\t.getEndpointContentWithOverview(endpointUrl, endpointLocation, endpointName, documentVersion);\n\t\ttry {\n\t\t\tendpointElement = AXIOMUtil.stringToOM(factory, endpointContent);\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RegistryException(\"Error in creating the endpoint element. \", e);\n\t\t}\n\n\t}", "public boolean hasEndpoint() { return true; }", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint getEndpoint();", "public void addEndpoint(String endpoint) {\n\t\tif (sessionMap.putIfAbsent(endpoint, new ArrayList<Session>()) != null)\n\t\t\tLOG.warn(\"Endpoint {} already exists\", endpoint);\n\t\telse\n\t\t\tLOG.info(\"Added new endpoint {}\", endpoint);\n\t}", "@Override\n public TTransportWrapper getTransport(HostAndPort endpoint) throws Exception {\n return new TTransportWrapper(connectToServer(new InetSocketAddress(endpoint.getHostText(),\n endpoint.getPort())),\n endpoint);\n }", "private EndPoint createRectangleEndPoint(EndPointAnchor anchor)\r\n {\r\n RectangleEndPoint endPoint = new RectangleEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setSource(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n return endPoint;\r\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "public Builder setEndpoint(\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder builderForValue) {\n if (endpointBuilder_ == null) {\n endpoint_ = builderForValue.build();\n onChanged();\n } else {\n endpointBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "String serviceEndpoint();", "public Builder setApiEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n apiEndpoint_ = value;\n bitField0_ |= 0x00080000;\n onChanged();\n return this;\n }", "String createEndpointFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>\n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n if (!(stepInfoCase_ == 8)) {\n stepInfo_ = com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance();\n }\n endpointBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>(\n (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_,\n getParentForChildren(),\n isClean());\n stepInfo_ = null;\n }\n stepInfoCase_ = 8;\n onChanged();\n return endpointBuilder_;\n }", "URISegment createURISegment();", "public InterfaceEndpointInner withEndpointService(EndpointService endpointService) {\n this.endpointService = endpointService;\n return this;\n }", "public boolean addEndpoint(String endpointData) throws AxisFault {\n EndpointAdminServiceClient endpointAdminServiceClient = getEndpointAdminServiceClient();\n return endpointAdminServiceClient.addEndpoint(endpointData);\n }", "EndpointElement getEndpointByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public Builder setEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n endpoint_ = value;\n onChanged();\n } else {\n endpointBuilder_.setMessage(value);\n }\n\n return this;\n }", "Port createPort();", "Port createPort();", "RESTElement createRESTElement();", "public String getEndpoint() {\n return this.endpoint;\n }", "public String getEndpoint() {\n return this.endpoint;\n }", "@Override\n public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeEndpoint(request);\n }", "public ResourceTypeExtension withEndpointUri(String endpointUri) {\n this.endpointUri = endpointUri;\n return this;\n }", "ServiceEndpointPolicy.DefinitionStages.Blank define(String name);", "public String createEndpointFromTemplate(String networkAddress,\n String templateGUID,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpointFromTemplate(userId, null, null, networkAddress, templateGUID, templateProperties);\n }", "private AdjListEdge createEdge(Edge e) {\n\t\t// check if present\n\t\tif (edges.get(e.getIndex()) != null) return edges.get(e.getIndex());\n\t\t\n\t\tAdjListVertex uThis = vertices.get(e.getFirstVertex().getIndex());\n\t\tAdjListVertex vThis = vertices.get(e.getSecondVertex().getIndex());\n\t\tAdjListEdge eThis = new AdjListEdge(uThis, vThis, e.getIndex());\n\t\tedges.set(e.getIndex(), eThis);\n\t\tllEdges.add(eThis);\n\t\t\n\t\tnotifyEdgeCreated(eThis);\n\t\treturn eThis;\n\t}", "public static NodeEndPoint copy(final NodeEndPoint other) {\n return new NodeEndPoint(other.getHostName(), other.getIpAddress(), other.getPort());\n }", "public String getEndpointId();", "public String createAPI(String endpointGUID,\n APIProperties apiProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return apiManagerClient.createAPI(userId, apiManagerGUID, apiManagerName, apiManagerIsHome, endpointGUID, apiProperties);\n }", "public org.hl7.fhir.Uri getEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().find_element_user(ENDPOINT$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "Delivery createDelivery();" ]
[ "0.8141873", "0.749923", "0.7409183", "0.7352639", "0.72629625", "0.72454953", "0.70078534", "0.678481", "0.6772285", "0.65618056", "0.6457914", "0.6344549", "0.63041383", "0.6223555", "0.614113", "0.5968795", "0.59528106", "0.5943539", "0.59314483", "0.5924034", "0.58739924", "0.5794323", "0.56651014", "0.5611578", "0.5581665", "0.5550329", "0.5462348", "0.5460442", "0.54358953", "0.54066944", "0.53979254", "0.53811085", "0.53647065", "0.53586304", "0.5357449", "0.5338564", "0.53132594", "0.52931094", "0.5262176", "0.526071", "0.5258778", "0.52285475", "0.5190137", "0.51740247", "0.5146909", "0.5132492", "0.51168084", "0.51117975", "0.5109057", "0.5102409", "0.51001537", "0.50898796", "0.508385", "0.5079356", "0.5067755", "0.5064008", "0.5028315", "0.4998396", "0.4987051", "0.49846217", "0.49813348", "0.49782574", "0.49558878", "0.49539885", "0.49486253", "0.49481687", "0.49460703", "0.49432132", "0.49421328", "0.49320015", "0.49230948", "0.49116814", "0.49025816", "0.4901532", "0.48928002", "0.48800102", "0.4861976", "0.4853177", "0.48508656", "0.48492488", "0.48405793", "0.48405144", "0.48405027", "0.48403528", "0.48309088", "0.4817311", "0.4817311", "0.48074302", "0.4800159", "0.4800159", "0.4791116", "0.47861665", "0.47809914", "0.47760814", "0.47701034", "0.47671136", "0.47642702", "0.47605392", "0.4760062", "0.47593442" ]
0.6664594
9
Gets the IAM Policy for a resource
default void getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetIamPolicyMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetIamPolicyMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>\n getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request);\n }", "private Resource getPolicyResource(String policyId) throws EntitlementException {\n String path = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving entitlement policy\");\n }\n\n try {\n path = policyStorePath + policyId;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n return registry.get(path);\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy : \" + policyId, e);\n throw new EntitlementException(\"Error while retrieving entitlement policy : \" + policyId, e);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "private PolicyDTO readPolicy(Resource resource) throws EntitlementException {\n \n String policy = null;\n AbstractPolicy absPolicy = null;\n PolicyDTO dto = null;\n\n try {\n policy = new String((byte[]) resource.getContent(), Charset.forName(\"UTF-8\"));\n absPolicy = PolicyReader.getInstance(null).getPolicy(policy);\n dto = new PolicyDTO();\n dto.setPolicyId(absPolicy.getId().toASCIIString());\n dto.setPolicy(policy);\n\n String policyOrder = resource.getProperty(\"policyOrder\");\n if(policyOrder != null){\n dto.setPolicyOrder(Integer.parseInt(policyOrder));\n } else {\n dto.setPolicyOrder(0);\n } // TODO policy refe IDs ???\n PolicyAttributeBuilder policyAttributeBuilder = new PolicyAttributeBuilder();\n dto.setAttributeDTOs(policyAttributeBuilder.\n getPolicyMetaDataFromRegistryProperties(resource.getProperties()));\n return dto;\n } catch (RegistryException e) {\n log.error(\"Error while loading entitlement policy\", e);\n throw new EntitlementException(\"Error while loading entitlement policy\", e);\n }\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "Policy _get_policy(int policy_type);", "@Override\n\tpublic Optional<Policy> findPolicyById(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\treturn policyDao.findById(policyId);\n\t}", "public static String getPublicReadPolicy(String bucket_name) {\r\n Policy bucket_policy = new Policy().withStatements(\r\n new Statement(Statement.Effect.Allow)\r\n .withPrincipals(Principal.AllUsers)\r\n .withActions(S3Actions.GetObject)\r\n .withResources(new Resource(\r\n \"arn:aws:s3:::\" + bucket_name + \"/*\")));\r\n return bucket_policy.toJson();\r\n }", "public com.amazon.s3.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy(com.amazon.s3.GetBucketAccessControlPolicy getBucketAccessControlPolicy);", "ServiceEndpointPolicy getById(String id);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "PolicyRecord findOne(Long id);", "public PolicyMap getPolicyMap();", "public com.amazon.s3.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy(com.amazon.s3.GetObjectAccessControlPolicy getObjectAccessControlPolicy);", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "Resource getAbilityResource();", "public PolicyDTO readPolicy(String policyId) throws EntitlementException {\n\n Resource resource = null;\n \n resource = getPolicyResource(policyId);\n\n if (resource == null) {\n return new PolicyDTO();\n }\n\n return readPolicy(resource);\n }", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "public void getIamPolicy(\n com.google.iam.v1.GetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public Privilege get(int actionId, int resourceId) {\n\t\tTypedQuery<Privilege> q = getEntityManager().createQuery(\"SELECT p FROM Privilege p WHERE p.actionId = :actionId AND p.resourceId = :resourceId\", Privilege.class)\n\t\t\t\t.setParameter(\"actionId\", actionId).setParameter(\"resourceId\", resourceId);\n\t\ttry {\n\t\t\treturn q.getSingleResult();\n\t\t} catch (NoResultException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public int getPermission(Integer resourceId);", "public CompanyPolicy getPolicy(int policyNo) {\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo); \n return cPolicy;\n\t}", "@Override\r\n\tpublic List<Policy> getPolicies() {\n\t\tList<Policy> policy=dao.getPolicies();\r\n\t\treturn policy;\r\n\t}", "@Nullable\n public ManagedAppPolicy get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "private static String getBucketPolicyFromFile(String policy_file) {\r\n StringBuilder file_text = new StringBuilder();\r\n try {\r\n List<String> lines = Files.readAllLines(\r\n Paths.get(policy_file), Charset.forName(\"UTF-8\"));\r\n for (String line : lines) {\r\n file_text.append(line);\r\n }\r\n } catch (IOException e) {\r\n System.out.format(\"Problem reading file: \\\"%s\\\"\", policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n // Verify the policy by trying to load it into a Policy object.\r\n Policy bucket_policy = null;\r\n try {\r\n bucket_policy = Policy.fromJson(file_text.toString());\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Invalid policy text in file: \\\"%s\\\"\",\r\n policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n return bucket_policy.toJson();\r\n }", "public abstract List<AbstractPolicy> getPolicies();", "public RegistryKeyProperty getPolicyKey();", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "Resource getResource() {\n\t\treturn resource;\n\t}", "public EvictionPolicy getEvictionPolicy()\n {\n return m_policy;\n }", "public Set<Policy> findPolicyByPerson(String id);", "protected Resource getResource() {\n return resource;\n }", "public ResourceReadPolicy getReadPolicy(Class<?> resourceClass, User user)\n\t{\n\t\tString resourceAlias = resourceClass.getSimpleName();\n\t\tresourceAlias = resourceAlias.substring(0, 1).toLowerCase() + resourceAlias.substring(1);\n\t\tString projectAlias = \"project\";\n\t\t\n\t\tif (this.getLogicOperator() == LogicOperator.AND)\n\t\t{\n\t\t\tResourceReadPolicy readPolicy = new ResourceReadPolicy();\n\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(true);\n\t\t\t\tString conditions = this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\n\t\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t\t{\n\t\t\t\t\tif (subPolicy.isEntityAccessGranted(user))\n\t\t\t\t\t{\n\t\t\t\t\t\tString groupConditions = subPolicy.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!groupConditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = conditions + \" \" + this.logicOperator + \" \" + groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // If subgroup entity access is not granted\n\t\t\t\t\t{\n\t\t\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\t\t\treadPolicy.setReadConditions(null);\n\t\t\t\t\t\treturn readPolicy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treadPolicy.setReadConditions(conditions);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t\telse // If group entity access is not granted\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t}\n\t\telse // If Logic Operator is OR \n\t\t{\n\t\t\tResourceReadPolicy resourceReadPolicy = new ResourceReadPolicy();\n\t\t\t\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\tresourceReadPolicy.setReadConditions(this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user));\t\t\t\t\n\t\t\t}\n\n\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t{\n\t\t\t\tResourceReadPolicy groupReadPolicy = subPolicy.readGroupPolicy(resourceAlias, projectAlias, user);\n\t\t\t\tif (groupReadPolicy.isReadGranted())\n\t\t\t\t{\n\t\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\t\t\n\t\t\t\t\tString conditions = resourceReadPolicy.getReadConditions();\n\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions = groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\telse if (!groupReadPolicy.getReadConditions().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions += \" \" + this.logicOperator + \" \" + groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresourceReadPolicy.setReadConditions(conditions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn resourceReadPolicy;\n\t\t}\n\t}", "static JackrabbitAccessControlList getPolicy(AccessControlManager acM, String path, Principal principal) throws RepositoryException,\n AccessDeniedException, NotExecutableException {\n AccessControlPolicyIterator itr = acM.getApplicablePolicies(path);\n while (itr.hasNext()) {\n AccessControlPolicy policy = itr.nextAccessControlPolicy();\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // try if there is an acl that has been set before:\n AccessControlPolicy[] pcls = acM.getPolicies(path);\n for (AccessControlPolicy policy : pcls) {\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // no applicable or existing ACLTemplate to edit -> not executable.\n throw new NotExecutableException();\n }", "public Resource getResource() {\n return resource;\n }", "public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n return new PolicyDTO[0];\n }\n policies = new PolicyDTO[resources.length];\n\n List<PolicyDTO> policyDTOList = new ArrayList<PolicyDTO>();\n int[] policyOrder = new int[resources.length];\n\n for(int i = 0; i < resources.length; i++){\n PolicyDTO policyDTO = readPolicy(resources[i]);\n policyDTOList.add(policyDTO);\n policyOrder[i] = policyDTO.getPolicyOrder();\n }\n\n // sorting array TODO : with Comparator class\n int[] tempArray = new int[policyOrder.length];\n Arrays.sort(policyOrder);\n for (int i = 0; i < tempArray.length; i++) {\n int j = (policyOrder.length-1)-i;\n tempArray[j] = policyOrder[i];\n }\n policyOrder = tempArray;\n\n for (int i = 0; i < policyOrder.length; i++) {\n for(PolicyDTO policyDTO : policyDTOList){\n if(policyOrder[i] == policyDTO.getPolicyOrder()){\n policies[i] = policyDTO;\n }\n }\n }\n \n return policies;\n }", "public static BackupPolicy get(String name, Output<String> id, @Nullable BackupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {\n return new BackupPolicy(name, id, state, options);\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "ServiceEndpointPolicy getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "@JsonIgnore public BoardingPolicyType getBoardingPolicy() {\n return (BoardingPolicyType) getValue(\"boardingPolicy\");\n }", "RequiredResourceType getRequiredResource();", "ResourceRequirement getRequirementFor(AResourceType type);", "private Resource[] getAllPolicyResource() throws EntitlementException {\n\n String path = null;\n Collection collection = null;\n List<Resource> resources = new ArrayList<Resource>();\n String[] children = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving all entitlement policies\");\n }\n\n try {\n path = policyStorePath;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n collection = (Collection) registry.get(path);\n children = collection.getChildren();\n\n for (String aChildren : children) {\n resources.add(registry.get(aChildren));\n }\n\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy\", e);\n throw new EntitlementException(\"Error while retrieving entitlement policies\", e);\n }\n\n return resources.toArray(new Resource[resources.size()]);\n }", "public Jedis getResource() {\n\t\tif (jedisPool == null) {\n\t\t\tsynchronized (this) {\n\t\t\t\tif (jedisPool == null){\n\t\t\t\t\tjedisPool = new JedisPool(jedisPoolConfig, host, port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jedisPool.getResource();\n\t}", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "public NatPolicy getNatPolicy();", "Iterable<PrimaryPolicyMetadata> getApplicablePolicies();", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "@XmlElement(name = \"source_policy\")\r\n public ProtectionSourcePolicy getSourcePolicy() {\r\n return sourcePolicy;\r\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public SigningPolicy getSigningPolicy(String subject) {\n \n if (this.policyDNMap == null) {\n return null;\n }\n\n return (SigningPolicy) this.policyDNMap.get(subject);\n }", "public static Policy getEndpointEffectivePolicy(Definitions wsdl, QName serviceQName, String portName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n //obtain port\n Endpoint port = srv.getEndpoint(portName);\n if (port == null) {\n throw new IllegalArgumentException(\"Cannot find port with name '\" + portName + \"' in service with qname \" + serviceQName);\n }\n //obtain binding\n QName bQName = port.getBinding();\n Binding binding = wsdl.getBinding(bQName);\n //obtain portType\n QName intQName = binding.getInterface();\n Interface portType = wsdl.getInterface(intQName);\n \n Element wsdlEl = (Element) binding.getDomElement().getParentNode();\n \n Policy portPolicy = ConfigurationBuilder.loadPolicies(port, wsdlEl);\n Policy bindingPolicy = ConfigurationBuilder.loadPolicies(binding, wsdlEl);\n Policy portTypePolicy = ConfigurationBuilder.loadPolicies(portType, wsdlEl);\n \n Policy res = Policy.mergePolicies(new Policy[]{portPolicy, bindingPolicy, portTypePolicy});\n return res;\n }", "PolicyDetail findPolicyByID(int policyId, int lenderId);", "private RoutingPolicy getExportPolicy() {\n\t String exportPolicyName = null;\n switch(this.getType()) {\n case BGP:\n // String constant from\n // org.batfish.representation.cisco.CiscoConfiguration.toBgpProcess\n exportPolicyName = \"~BGP_COMMON_EXPORT_POLICY:\" \n + this.getVrf().getName() + \"~\";\n break;\n case OSPF:\n exportPolicyName = this.ospfConfig.getExportPolicy();\n break;\n default:\n return null;\n }\n\n return this.getDevice().getRoutingPolicy(exportPolicyName);\n\t}", "@Deprecated\n Policy getEvictionPolicy();", "PolicyDetail findPolicyDetail(int policyId, Lender lender);", "public ResourceInfo getResource() {\n\t\treturn resource;\n\t}", "com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy getAuthorizationPolicies(int index);", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "@Deprecated\n public List<V2beta2HPAScalingPolicy> getPolicies();", "SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName);", "PolicyDecision getDecision();", "public CertificateAttributesPolicy getCertificateAttributesPolicy() {\n if (trustedCAs.size() != 0) {\n TrustedCaPolicy tc = (TrustedCaPolicy)trustedCAs.get(0);\n if (tc.getCertificateAttributesPolicy() != null) {\n return tc.getCertificateAttributesPolicy();\n }\n }\n return certificateAttributesPolicy;\n }", "public String getRuntimePolicyFile(IPath configPath);", "String privacyPolicy();", "public MPProcessesResponse getMonitoringPolicyProcess(String policyId, String processId) throws RestClientException, IOException {\n return client.get(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), null, MPProcessesResponse.class);\n }", "public static APIPolicy createDefaultAPIPolicy() {\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1000, 10000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n apiPolicy.setPipelines(createDefaultPipelines());\n return apiPolicy;\n }", "public ImNotifPolicy getImNotifPolicy();", "public List<Policy> getReferencedPolicies(Rule rule) {\n return getReferencedPolicies(rule, null);\n }", "public static short[] getPolicies() {\n\t\treturn POLICIES;\n\t}", "public interface TilePolicy {\n\n\tpublic boolean getEnterableAt(Pair xy);\n\tpublic boolean getPassableAt(Pair xy);\n\tpublic boolean getJumpableAt(Pair xy);\n\t\n\tpublic boolean getWalkableAt(Pair xy, Player player);\n\tpublic boolean getEnterableAt(Pair xy, CellLogic ignore);\n\t\n\t/**\n\t * All policies must return a name so they can be enumerated\n\t * and a group of grunts all moving at once can share policies\n\t * if they have the same movement. Comparing getName is\n\t * equivalent to an equality test between policies.\n\t * \n\t * @return The name of the Policy\n\t */\n\tpublic String getName();\n\t\n}", "com.yandex.ydb.rate_limiter.ResourceOrBuilder getResourceOrBuilder();", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "PolicyStatsManager getStats();", "java.util.List<com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy> \n getAuthorizationPoliciesList();", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "com.yandex.ydb.rate_limiter.Resource getResource();", "@JsonIgnore\n public String getResource() {\n return this.resource;\n }", "public String getResourceOWL()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceOWL);\r\n }", "public ResourceVO getResource() {\n\treturn resource;\n}" ]
[ "0.65303004", "0.62038964", "0.618383", "0.6136941", "0.60919493", "0.60797405", "0.5858551", "0.5857536", "0.578785", "0.5786022", "0.576682", "0.5748712", "0.5689868", "0.5657301", "0.5620957", "0.5585755", "0.55591875", "0.543312", "0.53979665", "0.5364685", "0.53244025", "0.5320857", "0.5305409", "0.53049076", "0.5280423", "0.52129924", "0.51706344", "0.5107546", "0.50730276", "0.5035625", "0.5016853", "0.50129986", "0.50124574", "0.5006328", "0.49814928", "0.4951122", "0.49351507", "0.49029705", "0.48820153", "0.48758927", "0.48716712", "0.48651728", "0.48509568", "0.4846397", "0.48395965", "0.48380426", "0.48368415", "0.48167944", "0.48135287", "0.48121643", "0.47966835", "0.47913015", "0.47913015", "0.47596535", "0.4751465", "0.47456363", "0.47451544", "0.47446758", "0.47297838", "0.47261", "0.47255063", "0.47003406", "0.46716148", "0.46628764", "0.46547773", "0.46494952", "0.4648177", "0.46461412", "0.4635601", "0.46278816", "0.4625708", "0.45982963", "0.4595339", "0.45952553", "0.45868698", "0.45816195", "0.45735082", "0.45727652", "0.45424333", "0.45422086", "0.4537607", "0.45367172", "0.45321637", "0.45302138", "0.44838935", "0.44349006", "0.44275147", "0.4413618", "0.4413598", "0.44104448", "0.44006002", "0.43998763", "0.43998763", "0.43998763", "0.43997005", "0.439225", "0.43791813", "0.4376661", "0.43764502", "0.4368229", "0.43671677" ]
0.0
-1
Sets the IAM Policy for a resource
default void setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getSetIamPolicyMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "public com.amazon.s3.SetBucketAccessControlPolicyResponse setBucketAccessControlPolicy(com.amazon.s3.SetBucketAccessControlPolicy setBucketAccessControlPolicy);", "public void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSetIamPolicyMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>\n setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request);\n }", "public com.amazon.s3.SetObjectAccessControlPolicyResponse setObjectAccessControlPolicy(com.amazon.s3.SetObjectAccessControlPolicy setObjectAccessControlPolicy);", "public void setPolicy(com.vmware.converter.DVSPolicy policy) {\r\n this.policy = policy;\r\n }", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "public void setPolicy(String policy) {\r\n if (policy != null && !policy.equals(\"\")) {\r\n String[] rules = policy.trim().split(\",\");\r\n if (rules != null && rules.length > 0) {\r\n emptyPolicy();\r\n \r\n for (String s : rules) {\r\n addRule(new AccessRule(s));\r\n }\r\n }\r\n }\r\n }", "public String setPolicy(String asgName, String policyName, int capacity,\n\t\t\tString adjustmentType) {\n\t\t// asClient.setRegion(usaRegion);\n\t\tPutScalingPolicyRequest request = new PutScalingPolicyRequest();\n\n\t\trequest.setAutoScalingGroupName(asgName);\n\t\trequest.setPolicyName(policyName); // This scales up so I've put up at\n\t\t\t\t\t\t\t\t\t\t\t// the end.\n\t\trequest.setScalingAdjustment(capacity); // scale up by specific capacity\n\t\trequest.setAdjustmentType(adjustmentType);\n\n\t\tPutScalingPolicyResult result = asClient.putScalingPolicy(request);\n\t\tString arn = result.getPolicyARN(); // You need the policy ARN in the\n\t\t\t\t\t\t\t\t\t\t\t// next step so make a note of it.\n\n\t\tEnableMetricsCollectionRequest request1 = new EnableMetricsCollectionRequest()\n\t\t\t\t.withAutoScalingGroupName(asgName).withGranularity(\"1Minute\");\n\t\tEnableMetricsCollectionResult response1 = asClient\n\t\t\t\t.enableMetricsCollection(request1);\n\n\t\treturn arn;\n\t}", "public void setPolicyArn(String policyArn) {\n this.policyArn = policyArn;\n }", "public void setPolicy(String policyName, TPPPolicy tppPolicy) throws VCertException {\n if (!policyName.startsWith(TppPolicyConstants.TPP_ROOT_PATH))\n policyName = TppPolicyConstants.TPP_ROOT_PATH + policyName;\n\n tppPolicy.policyName( policyName );\n\n //if the policy doesn't exist\n if(!TppConnectorUtils.dnExist(policyName, tppAPI)){\n\n //verifying that the policy's parent exists\n String parentName = tppPolicy.getParentName();\n if(!parentName.equals(TppPolicyConstants.TPP_ROOT_PATH) && !TppConnectorUtils.dnExist(parentName, tppAPI))\n throw new VCertException(String.format(\"The policy's parent %s doesn't exist\", parentName));\n\n //creating the policy\n TppConnectorUtils.createPolicy( policyName, tppAPI );\n } else\n TppConnectorUtils.resetAttributes(policyName, tppAPI);\n\n //creating policy's attributes.\n TppConnectorUtils.setPolicyAttributes(tppPolicy, tppAPI);\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "protected void setAccessPolicies(Map<String, PolicyDocument> policies)\n {\n policies.put(\"GlueAthenaS3AccessPolicy\", getGlueAthenaS3AccessPolicy());\n policies.put(\"S3SpillBucketAccessPolicy\", getS3SpillBucketAccessPolicy());\n connectorAccessPolicy.ifPresent(policyDocument -> policies.put(\"ConnectorAccessPolicy\", policyDocument));\n }", "public void setResource(int newResource) throws java.rmi.RemoteException;", "public void setRWResource(RWResource theResource) {\n resource = theResource;\n }", "public void setPolicyLine(java.lang.String value);", "@Test\n public void testSetPolicy2() throws Exception {\n setupPermission(PathUtils.ROOT_PATH, getTestUser().getPrincipal(), true, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n setupPermission(null, getTestUser().getPrincipal(), true, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n\n setupPermission(getTestRoot(), null, EveryonePrincipal.getInstance(), false, JCR_NAMESPACE_MANAGEMENT);\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public synchronized void setEvictionPolicy(EvictionPolicy policy)\n {\n int nType = (policy == null ? EVICTION_POLICY_HYBRID\n : EVICTION_POLICY_EXTERNAL);\n configureEviction(nType, policy);\n }", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public void setPolicyURL(java.lang.String policyURL) {\n this.policyURL = policyURL;\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "protected void checkSetPolicyPermission() {\n\tSecurityManager sm = System.getSecurityManager();\n\tif (sm != null) {\n\t if (setPolicyPermission == null) {\n\t\tsetPolicyPermission = new java.security.SecurityPermission(\"setPolicy\");\n\t }\n\t sm.checkPermission(setPolicyPermission);\n\t}\n }", "public void setResource(ResourceInfo resource) {\n\t\tif (this.resource != null) {\n\t\t\tthrow new IllegalStateException(\"The resource pointer can only be set once for Resource [\" + name + \"]\");\n\t\t}\n\t\tthis.resource = resource;\n\t}", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "void clearPolicy() {\n policy = new Policy();\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "protected void setResource(final Resource resource) {\n this.resource = resource;\n }", "void setResourceID(String resourceID);", "public void setPolicyType(Enumerator newValue);", "@Override\n public void replaceAllItemPolicies(Context context, Item item, List<ResourcePolicy> newpolicies) throws SQLException,\n AuthorizeException\n {\n // remove all our policies, add new ones\n authorizeService.removeAllPolicies(context, item);\n authorizeService.addPolicies(context, newpolicies, item);\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}", "public void setScalePolicy(ScalePolicy policy) {\n\n\t}", "public static void apiManagementCreateProductPolicy(\n com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {\n manager\n .productPolicies()\n .createOrUpdateWithResponse(\n \"rg1\",\n \"apimService1\",\n \"5702e97e5157a50f48dce801\",\n PolicyIdName.POLICY,\n new PolicyContractInner()\n .withValue(\n \"<policies>\\r\\n\"\n + \" <inbound>\\r\\n\"\n + \" <rate-limit calls=\\\"{{call-count}}\\\" renewal-period=\\\"15\\\"></rate-limit>\\r\\n\"\n + \" <log-to-eventhub logger-id=\\\"16\\\">\\r\\n\"\n + \" @( string.Join(\\\",\\\", DateTime.UtcNow,\"\n + \" context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress,\"\n + \" context.Operation.Name) ) \\r\\n\"\n + \" </log-to-eventhub>\\r\\n\"\n + \" <quota-by-key calls=\\\"40\\\" counter-key=\\\"cc\\\" renewal-period=\\\"3600\\\"\"\n + \" increment-count=\\\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\\\" />\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </inbound>\\r\\n\"\n + \" <backend>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </backend>\\r\\n\"\n + \" <outbound>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </outbound>\\r\\n\"\n + \"</policies>\")\n .withFormat(PolicyContentFormat.XML),\n null,\n com.azure.core.util.Context.NONE);\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public FractalTrace setAbyssPolicy(String value)\n {\n\t\n m_AbyssPolicy = value;\n setProperty(\"abyss-policy\", value);\n return this;\n }", "void register(PolicyDefinition policyDefinition);", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void updatePolicy(CompanyPolicy cP ) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, cP.getPolicyNo());\n\t\t//Update fields which are allowed to modify\n\t\tcPolicy.setPolicyTag1(cP.getPolicyTag1());\n\t\tcPolicy.setPolicyTag2(cP.getPolicyTag2());\n\t\tcPolicy.setPolicyDesc(cP.getPolicyDesc());\n\t\tcPolicy.setPolicyDoc(cP.getPolicyDoc());\n\t\tsession.update(cPolicy); \n\t\ttx.commit();\n\t}", "@Override\r\n\tpublic void setGiveResource(ResourceType resource) {\n\t\t\r\n\t}", "@Override\r\n public void setImageResource(int resourceId)\r\n {\r\n new LoadResourceTask().execute(resourceId);\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public void setPolicyEffectiveDate(java.lang.String policyEffectiveDate) {\n this.policyEffectiveDate = policyEffectiveDate;\n }", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setDefaultPolicy(Policy defaultPolicy) {\n\t\tif (defaultPolicy == null)\n\t\t\tthrow new NullPointerException();\n\t\tthis.defaultPolicy = defaultPolicy;\n\t}", "public SharedActivationPolicyPermission(String policy) {\n\tthis(policy, init(policy));\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request, responseObserver);\n }", "public ActiveIAMPolicyAssignment withPolicyArn(String policyArn) {\n setPolicyArn(policyArn);\n return this;\n }", "@Override\n\tpublic void setResourcePrimKey(long resourcePrimKey) {\n\t\t_changesetEntry.setResourcePrimKey(resourcePrimKey);\n\t}", "public LinkedIntegrationRuntimeRbacAuthorization setResourceId(String resourceId) {\n this.resourceId = resourceId;\n return this;\n }", "public void setLoadBalancerPolicy(String loadBalancerPolicy) {\n this.loadBalancerPolicy = loadBalancerPolicy;\n }", "public EditPolicy() {\r\n super();\r\n }", "@Nullable\n public ManagedAppPolicy put(@Nonnull final ManagedAppPolicy newManagedAppPolicy) throws ClientException {\n return send(HttpMethod.PUT, newManagedAppPolicy);\n }", "public int setCurrentResource(final Resource newResource) {\n currentSpinePos = book.getSpine().getResourceIndex(newResource);\n currentResource = newResource;\n return currentSpinePos;\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public MonitoringPoliciesResponse updateMonitoringPolicyProcess(UpdateMPProcessesRequest object, String policyId, String processId) throws RestClientException, IOException {\n return client.update(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), object, MonitoringPoliciesResponse.class, 202);\n }", "public DistributionPolicyInternal setName(String name) {\n this.name = name;\n return this;\n }", "public Object\n _set_policy_override(Policy[] policies,\n SetOverrideType set_add) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "public void initResourceOfPlayer(Resource resource) throws IOException, InterruptedException {\n try {\n\n currentPlayer.initResource(resource);\n } catch (CallForCouncilException e) {\n exceptionHandler(e);\n } catch (LastSpaceReachedException e) {\n exceptionHandler(e);\n }\n currentPlayer.setInitResource(true);\n notifyToOneObserver(new UpdateInitResourceMessage(resource));\n notifyAllObserverLessOne(new UpdateForNotCurrentResourceMessage(resource));\n\n\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdPut(String policyId, String contentType,\n AdvancedThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n\n //overridden parameters\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n apiProvider.updatePolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void giveResourcesToPlayer(Resource resource){\n resources.addResource(resource);\n }", "public Optional<CancellationPolicy> updatePolicy(long policyId, CancellationPolicy editedPolicy) throws Exception{\n Optional<CancellationPolicy> updatedPolicy = cancellationPolicyRepository.findById(policyId).map((selectedPolicy) -> {\n selectedPolicy.getRules().clear();\n selectedPolicy.getRules().addAll(editedPolicy.getRules());\n selectedPolicy.getRules().forEach((rule) -> {\n rule.setPolicy(editedPolicy);\n });\n selectedPolicy.setPolicyId(editedPolicy.getPolicyId());\n selectedPolicy.setPolicyName(editedPolicy.getPolicyName());\n selectedPolicy.setPolicySource(editedPolicy.getPolicySource());\n selectedPolicy.setPolicyDescription(editedPolicy.getPolicyDescription());\n selectedPolicy.setPolicyUpdatedBy(editedPolicy.getPolicyUpdatedBy());\n selectedPolicy.setPolicyUpdatedOn();\n selectedPolicy.setPolicyCancelRestrictionDays(editedPolicy.getPolicyCancelRestrictionDays());\n selectedPolicy.setPolicyCancelRestrictionHours(editedPolicy.getPolicyCancelRestrictionHours());\n return cancellationPolicyRepository.save(selectedPolicy);\n });\n return updatedPolicy;\n }", "@Override\n\tprotected void createEditPolicies()\n\t{\n\t\t\n\t}", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "protected ValidatableResponse updateResource(String path, JSONObject newResource) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .contentType(ContentType.JSON)\n .body(newResource.toString())\n .when()\n .put(path)\n .then()\n .statusCode(204);\n }", "public void setStrategyResource(String strategyResource) {\n this.strategyResource = strategyResource;\n }", "@JsonProperty(\"resource\")\n public void setResource(String resource) {\n this.resource = resource;\n }", "public void setResource(URI resource) {\n this.resource = resource;\n }", "public void setPolicyGroupName(String policyGroupName)\n {\n \tthis.policyGroupName = policyGroupName;\n }", "PolicyController createPolicyController(String name, Properties properties);", "public void setContainerPolicy(ContainerPolicy containerPolicy) {\n this.containerPolicy = containerPolicy;\n }", "public void setResourceTo(ServiceCenterITComputingResource newResourceTo) {\n addPropertyValue(getResourcesProperty(), newResourceTo);\r\n }", "public boolean setRateLimit (String sliceName, String rate) \n\t\t\tthrows PermissionDeniedException;", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "AgentPolicyBuilder setJobPriority(JobPriority jobPriority);", "public PolicyIDImpl(String idString) {\n super(idString);\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateChannelPolicyMethod(), responseObserver);\n }", "@Override\n public void replaceAllBitstreamPolicies(Context context, Item item, List<ResourcePolicy> newpolicies)\n throws SQLException, AuthorizeException\n {\n // remove all policies from bundles, add new ones\n // Remove bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n bundleService.replaceAllBitstreamPolicies(context, mybundle, newpolicies);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "public void setNatPolicy(NatPolicy policy);", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public lnrpc.Rpc.PolicyUpdateResponse updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request) {\n return blockingUnaryCall(\n getChannel(), getUpdateChannelPolicyMethod(), getCallOptions(), request);\n }", "public AssignTagTabItem(Resource resource){\n\t\tthis.resource = resource;\n\t\tthis.resourceId = resource.getId();\n\t}", "public void setRating(Rating rating) {\n double boundedRating = this.boundedRating(rating);\n this.normalisedRating = this.normaliseRating(boundedRating);\n this.ratingCount++;\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }" ]
[ "0.66972566", "0.6082597", "0.6077283", "0.603994", "0.58559775", "0.5677932", "0.5533153", "0.55294746", "0.54295254", "0.5386457", "0.5322885", "0.5307284", "0.5242436", "0.50387615", "0.5026891", "0.50065285", "0.49567696", "0.49369815", "0.49298045", "0.4895639", "0.48891863", "0.48862508", "0.48624665", "0.48426878", "0.48366866", "0.48312998", "0.48273727", "0.48075646", "0.47941887", "0.47936183", "0.47679532", "0.47602433", "0.47508904", "0.47296184", "0.46621573", "0.46162933", "0.45881912", "0.4579893", "0.4577294", "0.45694926", "0.4552101", "0.45490006", "0.45384145", "0.4532844", "0.45296696", "0.45157316", "0.4507783", "0.44923484", "0.44883838", "0.44883838", "0.44874197", "0.44849795", "0.4479074", "0.4472625", "0.4464273", "0.4445344", "0.44427216", "0.44418812", "0.4432885", "0.4429717", "0.44274044", "0.44241577", "0.44066086", "0.44009677", "0.43787515", "0.4372247", "0.43720973", "0.4356897", "0.43564215", "0.4355487", "0.435446", "0.43498212", "0.4349567", "0.43441963", "0.43313757", "0.43304297", "0.4317681", "0.43174452", "0.431093", "0.430341", "0.42971444", "0.4296209", "0.4292298", "0.4277988", "0.4277988", "0.4277988", "0.427148", "0.42690822", "0.42557612", "0.4251575", "0.4238082", "0.42305496", "0.42201197", "0.42008317", "0.42004794", "0.41995704", "0.4199074", "0.41974437", "0.41969106", "0.4195941" ]
0.54336023
8
Tests IAM permissions for a resource (namespace, service or service workload only).
default void testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getTestIamPermissionsMethod(), responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasResourceActionAllowPermissions(Resource resource,\n String action) {\n String whereClause = \"p.resource = :resource AND (\"\n + \"(p.action = :action AND p.type = :typeAllow) OR \"\n + \"(p.type = :typeAllowAll))\";\n Map<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"resource\", resource.getIdentifier());\n parameters.put(\"action\", action);\n parameters.put(\"typeAllow\", PermissionType.ALLOW);\n parameters.put(\"typeAllowAll\", PermissionType.ALLOW_ALL);\n\n Long count = FacadeFactory.getFacade().count(PermissionEntity.class,\n whereClause, parameters);\n\n return count > 0 ? true : false;\n }", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "public int getPermission(Integer resourceId);", "public void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request);\n }", "@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}", "public boolean checkPermissions(String account,String group, String resource, String action)\n throws Exception\n {\n return checkPermissions(new PolicyCredentials(account,group),resource,action);\n }", "@Test\n public void testJdoeAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/jdoe\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"jdoe\");\n\n // jdoe can access information about alice because he is granted with \"people-manager\" role\n response = makeRequest(\"http://localhost:8080/api/alice\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"alice\");\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "public boolean checkPermissions(PolicyCredentials credentials, String resource, String action) throws Exception {\n //\n // Set our permissions to null.\n perm = null ;\n //\n // Check if we have a service reference.\n if (null != service)\n {\n perm = service.checkPermissions(credentials,resource,action);\n }\n //\n // Return true if we got a result, and the permissions are valid.\n return (null != perm) ? perm.isValid() : false ;\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.iam.v1.TestIamPermissionsResponse>\n testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request);\n }", "@Test\n\tpublic void testIsPermitted_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isHasPermissions();", "void checkPermission(T request) throws AuthorizationException;", "@Test\n\tpublic void testIsPermitted_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isWritePermissionGranted();", "@Test\n public void testWithExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n AuthorizationResponse response = authzClient.authorization(\"marta\", \"password\", \"foo\")\n .authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource A with client scope bar.\n request = new PermissionRequest(\"Resource A\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource B with client scope bar.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n }", "@Test\n\tpublic void testIsPermitted_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = null;\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "public boolean checkPermission(Permission permission);", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target,\n IPermissionPolicy policy)\n throws AuthorizationException;", "@Test\n public void testWithoutExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"baz\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n\n // Access Resource B with client scope foo.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"foo\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n }", "@Test\n public void testCheckExistsPermission() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE\");\n assertFalse(permissionManager.checkExists(permission2));\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Test\n\tpublic void testIsPermitted_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permissions[] getPermissionsNeeded(ContainerRequestContext context) throws Exception {\n Secured auth = resourceInfo.getResourceMethod().getAnnotation(Secured.class);\n\n // If there's no authentication required on method level, check class level.\n if (auth == null) {\n auth = resourceInfo.getResourceClass().getAnnotation(Secured.class);\n }\n\n // Else, there's no permission required, thus we chan continue;\n if (auth == null) {\n log.log(Level.INFO, \"AUTHENTICATION: Method: \" + context.getMethod() + \", no permission required\");\n return new Permissions[0];\n }\n\n return auth.value();\n }", "public abstract boolean checkRolesAllowed(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}", "@Test\n\tpublic void testIsPermitted_7()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n public void testDenyAccessWithRoleCondition() {\n denyAccessWithRoleCondition(false);\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "boolean hasPermission(final Player sniper, final String permission);", "@Test\n\tpublic void testCheckPermissions_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "Resource getAbilityResource();", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;", "public boolean hasPermission(Context paramContext, String paramString) {\n }", "@Test\n\tpublic void testCheckPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test(expected = org.jsecurity.authz.UnauthorizedException.class)\n\tpublic void testCheckPermission_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void testCheckExistsPermissionWithString() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE2\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission.getName()));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE2\");\n assertFalse(permissionManager.checkExists(permission2.getName()));\n }", "@Test\n\tpublic void testIsPermitted_8()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(null);\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void testIsPermitted_9()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void testGetSetPermission() throws Exception {\n\t Namespace n = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t n.getItem();\n\t String newName = UUID.randomUUID().toString();\n\t Namespace newNamespace = n.createNamespace(newName, \"Created for the purposes of testing\");\n\t // Lets set a strange permission on the namespace so we know what we're checking when \n\t // we get it back\n\t Permission p = new Permission(Policy.OPEN, new String[]{\"fluiddb\"});\n\t newNamespace.setPermission(Namespace.Actions.CREATE, p);\n\t \n\t // OK... lets try getting the newly altered permission back\n\t Permission checkP = newNamespace.getPermission(Namespace.Actions.CREATE);\n\t assertEquals(p.GetPolicy(), checkP.GetPolicy());\n\t assertEquals(p.GetExceptions()[0], checkP.GetExceptions()[0]);\n\t \n\t // Housekeeping to clean up after ourselves...\n\t newNamespace.delete();\n\t}", "@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}", "public abstract boolean canEditAccessRights(OwObject object_p) throws Exception;", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "@Test\n public void testGetPermissionInstance() throws Exception\n {\n permission = permissionManager.getPermissionInstance();\n assertNotNull(permission);\n assertTrue(permission.getName() == null);\n }", "@Test\n\tpublic void testGetPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;", "@Test\n\tpublic void testCheckPermission_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testGetPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public static boolean isReadStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "@Test\n\tpublic void testIsPermittedAll_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "void permissionGranted(int requestCode);", "@Test\n public void testRequestGrantedPermission() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // Request the permission and allow it\n BasePermissionActivity.Result firstResult = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(firstResult, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Request the permission and do nothing\n BasePermissionActivity.Result secondResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 1,\n BasePermissionActivity.class, null);\n\n // Expect the permission is granted\n assertPermissionRequestResult(secondResult, REQUEST_CODE_PERMISSIONS + 1,\n permissions, new boolean[] {true});\n }", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "@Override\n public void checkPermission(Permission perm) {\n }", "boolean memberHasPermission(String perm, Member m);", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "private boolean checkReadOnlyAndNull(Shell shell, IResource currentResource)\n\t{\n\t\t// Do a quick read only and null check\n\t\tif (currentResource == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do a quick read only check\n\t\tfinal ResourceAttributes attributes = currentResource\n\t\t\t\t.getResourceAttributes();\n\t\tif (attributes != null && attributes.isReadOnly())\n\t\t{\n\t\t\treturn MessageDialog.openQuestion(shell, Messages.RenameResourceAction_checkTitle,\n\t\t\t\t\tMessageFormat.format(Messages.RenameResourceAction_readOnlyCheck, new Object[]\n\t\t\t\t\t\t{ currentResource.getName() }));\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }", "private void usersCheckPermission(PermissionRequest.ActionType grantedAction, IEntity entity)\n {\n authGrantedUser();\n try {\n executeAction(grantedAction, entity);\n } catch (AccessDeniedException e) {\n fail(\"Action \" + grantedAction.name() + \" was granted but could not be executed \" + entity.getEntityName());\n }\n\n authNotGrantedUser();\n try {\n executeAction(grantedAction, entity);\n fail(\"Action \" + grantedAction.name() + \" was not granted but could be executed \" + entity.getEntityName());\n } catch (AccessDeniedException e) {\n //\n }\n }", "@Test\n\tpublic void testIsPermittedAll_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Override\n\tpublic void authorize(String resourceName, String action, String rpcName)\n\t\t\tthrows Exception {\n\t}", "public interface IPermissions {\n}", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "@Test\n\tpublic void testIsPermittedAll_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "@Test\n\tpublic void testIsPermitted_6()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private static boolean isPermissionGranted(Context context, String permission) {\n if (ContextCompat.checkSelfPermission(context, permission)\n == PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG, permission + \" granted\");\n return true;\n }\n Log.i(TAG, permission + \" not granted yet\");\n return false;\n }", "@Override\n\tpublic boolean hasPermission(String string) {\n\t\treturn true;\n\t}", "@Test\n public void testDenyAccessWithNegateRoleCondition() {\n denyAccessWithRoleCondition(true);\n }", "@Test\n public void testPermissions() throws IOException {\n Note note = notebook.createNote(\"note1\", anonymous);\n NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();\n // empty owners, readers or writers means note is public\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n notebookAuthorization.setOwners(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n notebookAuthorization.setReaders(note.getId(), new HashSet(Arrays.asList(\"user1\", \"user2\")));\n notebookAuthorization.setRunners(note.getId(), new HashSet(Arrays.asList(\"user3\")));\n notebookAuthorization.setWriters(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), false);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user3\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n // Test clearing of permissions\n notebookAuthorization.setReaders(note.getId(), Sets.<String>newHashSet());\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), true);\n notebook.removeNote(note.getId(), anonymous);\n }", "abstract public void getPermission();", "public boolean checkReadPermission(final String bucket_path) {\r\n\t\t\treturn checkReadPermission(BeanTemplateUtils.build(DataBucketBean.class).with(DataBucketBean::full_name, bucket_path).done().get());\r\n\t\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "@Test(dependsOnMethods = {\"modifyResource\"})\n public void modifyNotExistingResource() throws Exception {\n showTitle(\"modifyNotExistingResource\");\n\n try {\n UmaResource resource = new UmaResource();\n resource.setName(\"Photo Album 3\");\n resource.setIconUri(\"http://www.example.com/icons/flower.png\");\n resource.setScopes(Arrays.asList(\"http://photoz.example.com/dev/scopes/view\", \"http://photoz.example.com/dev/scopes/all\"));\n\n getResourceService().updateResource(\"Bearer \" + pat.getAccessToken(), \"fake_resource_id\", resource);\n } catch (ClientErrorException ex) {\n System.err.println(ex.getResponse().readEntity(String.class));\n int status = ex.getResponse().getStatus();\n assertTrue(status != Response.Status.OK.getStatusCode(), \"Unexpected response status\");\n }\n }", "int getPermissionRead();", "@Override\n public void checkPermission(final Permission permission) {\n List<Class> stack = Arrays.asList(getClassContext());\n\n // if no blacklisted classes are in the stack (or not recursive)\n if (stack.subList(1, stack.size()).contains(getClass()) || Collections.disjoint(stack, classBlacklist)) {\n // allow everything\n return;\n }\n // if null/custom and blacklisted classes present, something tried to access this class\n if (permission == null || permission instanceof StudentTesterAccessPermission) {\n throw new SecurityException(\"Security check failed.\");\n }\n // else iterate over all active policies and call their respective methods\n PermissionContext pc = new PermissionContext(stack, permission, instance);\n for (var policy : policies) {\n try {\n policy.getConsumer().accept(pc);\n } catch (SecurityException e) {\n triggered = true;\n // Illegal attempt caught, log an error or do smth\n LOG.severe(String.format(\"Illegal attempt caught: %s\", permission.toString()));\n throw e;\n }\n\n }\n }", "@Test\n public void testMatchValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n assertTrue(\"no match\", filter.isResourceAccess(mtch));\n }", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "@Test\n\tpublic void testIsPermittedAll_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public interface TestService {\n// @PreAuthorize(\"hasAuthority('test')\")\n String test();\n}", "public interface RuntimePermissionRequester {\n /**\n * Asks user for specific permissions needed to proceed\n *\n * @param requestCode Request permission using this code, allowing for\n * callback distinguishing\n */\n void requestNeededPermissions(int requestCode);\n}", "boolean isPermissionsReviewRequired(@NonNull String packageName,\n @UserIdInt int userId);", "public static boolean isWriteStorageAllowed(FragmentActivity act) {\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "PermissionService getPermissionService();", "boolean needsStoragePermission();", "public interface PermissionsInstance {\n\n\t/**\n\t * Check whether the specified member has permission for the following action\n\t * @param perm The permission name\n\t * @param m The member\n\t * @return True, if the member can do the action\n\t */\n\tboolean memberHasPermission(String perm, Member m);\n\t\n}", "public static void checkPermission(com.tangosol.net.Cluster cluster, String sServiceName, String sCacheName, String sAction)\n {\n // import com.tangosol.net.ClusterPermission;\n // import com.tangosol.net.security.Authorizer;\n // import com.tangosol.net.security.DoAsAction;\n // import java.security.AccessController;\n // import javax.security.auth.Subject;\n \n Authorizer authorizer = getAuthorizer();\n Security security = Security.getInstance();\n \n if (authorizer == null && security == null)\n {\n return;\n }\n \n _assert(sServiceName != null, \"Service must be specified\");\n \n String sTarget = \"service=\" + sServiceName +\n (sCacheName == null ? \"\" : \",cache=\" + sCacheName);\n ClusterPermission permission = new ClusterPermission(cluster == null || !cluster.isRunning() ? null :\n cluster.getClusterName(), sTarget, sAction);\n Subject subject = null;\n \n if (authorizer != null)\n {\n subject = authorizer.authorize(subject, permission);\n }\n \n if (security != null)\n {\n Security.CheckPermissionAction action = new Security.CheckPermissionAction();\n action.setCluster(cluster);\n action.setPermission(permission);\n action.setSubject(subject);\n action.setSecurity(security);\n \n AccessController.doPrivileged(new DoAsAction(action));\n }\n }", "void requestNeededPermissions(int requestCode);", "@Override\n public boolean hasPermission(User user, E entity, Permission permission) {\n\n // always grant READ access (\"unsecured\" object)\n if (permission.equals(Permission.READ)) {\n logger.trace(\"Granting READ access on \" + entity.getClass().getSimpleName() + \" with ID \" + entity.getId());\n return true;\n }\n\n // call parent implementation\n return super.hasPermission(user, entity, permission);\n }", "int getPermissionWrite();", "public boolean hasPermission(T object, Permission permission, User user);", "@Test\n public void testRuntimeGroupGrantSpecificity() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // request only one permission from the 'contacts' permission group\n BasePermissionActivity.Result result = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class,\n () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(result, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Make sure no undeclared as used permissions are granted\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n }" ]
[ "0.626141", "0.6143579", "0.60582566", "0.60512483", "0.60410976", "0.58795595", "0.58387005", "0.5828776", "0.57359004", "0.5687395", "0.5651673", "0.5646067", "0.5641807", "0.5605156", "0.557404", "0.55634123", "0.5554017", "0.55476123", "0.5529396", "0.5502352", "0.5498456", "0.5493375", "0.5480557", "0.5465804", "0.5438496", "0.5432041", "0.54313684", "0.54295355", "0.5428414", "0.54246414", "0.5422935", "0.5418173", "0.5416088", "0.53846776", "0.5357873", "0.5350551", "0.5344094", "0.5340742", "0.53322273", "0.53306174", "0.53206706", "0.5301777", "0.5271372", "0.5268096", "0.5252603", "0.5240376", "0.523475", "0.5234298", "0.5230403", "0.5223688", "0.5221463", "0.52094436", "0.52040255", "0.51964396", "0.5188684", "0.51835316", "0.51829976", "0.5182017", "0.5176002", "0.5174576", "0.5163766", "0.51576054", "0.51575184", "0.5141274", "0.5141052", "0.51386786", "0.51369864", "0.5134427", "0.51247907", "0.5117473", "0.51125836", "0.5107093", "0.50991553", "0.5091838", "0.50825554", "0.50802684", "0.50725186", "0.50698406", "0.5068458", "0.5053956", "0.50515556", "0.5046983", "0.503903", "0.5037097", "0.5030365", "0.5030044", "0.50209546", "0.5014474", "0.50078636", "0.500299", "0.499788", "0.49959636", "0.4989969", "0.49894166", "0.49864867", "0.49806154", "0.4974804", "0.49725083", "0.49688065", "0.49673074" ]
0.5704171
9
Creates a namespace, and returns the new namespace.
public void createNamespace( com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.cloud.servicedirectory.v1beta1.Namespace createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateNamespaceMethod(), getCallOptions(), request);\n }", "public static NamespaceContext create() {\n return new NamespaceContext();\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Namespace>\n createNamespace(com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request);\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected NamespaceStack createNamespaceStack() {\r\n // actually returns a XMLOutputter.NamespaceStack (see below)\r\n return new NamespaceStack();\r\n }", "default void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateNamespaceMethod(), responseObserver);\n }", "abstract XML addNamespace(Namespace ns);", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public String createNamespace(IProject p, String ns) throws ThinklabException {\r\n \t\t\t\t\r\n \t\tFile ret = new File(getSourceDirectory() + File.separator + \r\n \t\t\t\t\t\t\tns.replace('.', File.separatorChar) + \".tql\");\r\n \t\tFile dir = new File(MiscUtilities.getFilePath(ret.toString()));\r\n \t\t\r\n \t\ttry {\r\n \t\t\tdir.mkdirs();\r\n \t\t\tPrintWriter out = new PrintWriter(ret);\r\n \t\t\tout.println(\"namespace \" + ns + \";\\n\");\r\n \t\t\tout.close();\r\n \t\t} catch (Exception e) {\r\n \t\t\tthrow new ThinklabClientException(e);\r\n \t\t}\r\n \t\t\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}", "Namespaces namespaces();", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "void setNamespace(java.lang.String namespace);", "public static IRIRewriter createNamespaceBased(\n\t\t\tfinal String originalNamespace, final String rewrittenNamespace) {\n\t\tif (originalNamespace.equals(rewrittenNamespace)) {\n\t\t\treturn identity;\n\t\t}\n\t\tif (originalNamespace.startsWith(rewrittenNamespace) ||\n\t\t\t\trewrittenNamespace.startsWith(originalNamespace)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Cannot rewrite overlapping namespaces, \" + \n\t\t\t\t\t\"this would be ambiguous: \" + originalNamespace + \n\t\t\t\t\t\" => \" + rewrittenNamespace);\n\t\t}\n\t\treturn new IRIRewriter() {\n\t\t\t@Override\n\t\t\tpublic String rewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\treturn rewrittenNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\toriginalNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't rewrite already rewritten IRI: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic String unrewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\treturn originalNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\trewrittenNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't unrewrite IRI that already is in the original namespace: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t};\n\t}", "String getNamespace();", "String getNamespace();", "String getNamespace();", "void setNamespace(String namespace);", "public static NamespaceRegistrationTransactionFactory createRootNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final BigInteger duration) {\n NamespaceId namespaceId = NamespaceId.createFromName(namespaceName);\n return create(networkType, namespaceName,\n namespaceId, NamespaceRegistrationType.ROOT_NAMESPACE, Optional.of(duration), Optional.empty());\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public Namespace(String alias) {\n this(DSL.name(alias), NAMESPACE);\n }", "public Namespace(Name alias) {\n this(alias, NAMESPACE);\n }", "java.lang.String getNamespace();", "private NamespaceHelper() {}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "public XMLNamespaces() {\n this(libsbmlJNI.new_XMLNamespaces__SWIG_0(), true);\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function Attr createAttributeNS(String namespaceURI, String qualifiedName);", "public String getNamespace();", "protected MapNamespaceContext createNamespaceContext() {\r\n // create the xpath with fedora namespaces built in\r\n MapNamespaceContext nsc = new MapNamespaceContext();\r\n nsc.setNamespace(\"fedora-types\", \"http://www.fedora.info/definitions/1/0/types/\");\r\n nsc.setNamespace(\"sparql\", \"http://www.w3.org/2001/sw/DataAccess/rf1/result\");\r\n nsc.setNamespace(\"foxml\", \"info:fedora/fedora-system:def/foxml#\");\r\n nsc.setNamespace(\"rdf\", \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\r\n nsc.setNamespace(\"fedora\", \"info:fedora/fedora-system:def/relations-external#\");\r\n nsc.setNamespace(\"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\");\r\n nsc.setNamespace(\"fedora-model\", \"info:fedora/fedora-system:def/model#\");\r\n nsc.setNamespace(\"oai\", \"http://www.openarchives.org/OAI/2.0/\");\r\n nsc.setNamespace(\"oai_dc\", \"http://www.openarchives.org/OAI/2.0/oai_dc/\", \"http://www.openarchives.org/OAI/2.0/oai_dc.xsd\");\r\n nsc.setNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\"); \r\n nsc.setNamespace(\"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\r\n nsc.setNamespace(\"fedora-management\", \"http://www.fedora.info/definitions/1/0/management/\", \"http://www.fedora.info/definitions/1/0/datastreamHistory.xsd\");\r\n return nsc;\r\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static NamespaceRegistrationTransactionFactory createSubNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId parentId) {\n NamespaceId namespaceId = NamespaceId\n .createFromNameAndParentId(namespaceName, parentId.getId());\n return create(networkType, namespaceName, namespaceId,\n NamespaceRegistrationType.SUB_NAMESPACE, Optional.empty(),\n Optional.of(parentId));\n }", "public NsNamespaces(Name alias) {\n this(alias, NS_NAMESPACES);\n }", "private void internalAddNamespace(NamespaceDefinition def) {\n String uri = def.getUri();\n String prefix = def.getPrefix();\n def.setIndex(m_container.getBindingRoot().\n getNamespaceUriIndex(uri, prefix));\n m_namespaces.add(def);\n m_uriMap.put(uri, def);\n }", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public NsNamespaces(String alias) {\n this(DSL.name(alias), NS_NAMESPACES);\n }", "public static Namespace getDefault() {\n if (instance == null) {\n new R_OSGiWSNamespace();\n }\n return instance;\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public static QualifiedName create(final String uri) {\n\t\tif (cache.containsKey(uri)) {\n\t\t\treturn cache.get(uri);\n\t\t} else {\n\t\t\tfinal QualifiedName qn = new QualifiedName(uri);\n\t\t\tcache.put(uri, qn);\n\t\t\treturn qn;\n\t\t}\n\t}", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "Rule PhpNamespace() {\n return Sequence(\n \"php_namespace\",\n Literal(),\n actions.pushPhpNamespaceNode());\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "Rule NamespaceScope() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n \"* \",\n \"cpp \",\n \"java \",\n \"py \",\n \"perl \",\n \"php \",\n \"rb \",\n \"cocoa \",\n \"csharp \"),\n actions.pushLiteralNode());\n }", "public Resource createFromNsAndLocalName(String nameSpace, String localName)\n\t{\n\t\treturn new ResourceImpl(model.getNsPrefixMap().get(nameSpace), localName);\n\t}", "public S create() {\n\t\tS style = createDefault();\n\t\tint id = nextID();\n\t\tstyle.setId(id);\n\t\taddStyle(style);\n\t\treturn style;\n\t}", "protected abstract void defineNamespace(int index, String prefix)\n throws IOException;", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "String getTargetNamespace();", "Package createPackage();", "private void addNamespace(ClassTree tree, GenerationContext<JS> context, List<JS> stmts) {\r\n\t\tElement type = TreeUtils.elementFromDeclaration(tree);\r\n\t\tif (JavaNodes.isInnerType(type)) {\r\n\t\t\t// this is an inner (anonymous or not) class - no namespace declaration is generated\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString namespace = context.getCurrentWrapper().getNamespace();\r\n\t\tif (!namespace.isEmpty()) {\r\n\t\t\tJavaScriptBuilder<JS> js = context.js();\r\n\t\t\tJS target = js.property(js.name(GeneratorConstants.STJS), \"ns\");\r\n\t\t\tstmts.add(js.expressionStatement(js.functionCall(target, Collections.singleton(js.string(namespace)))));\r\n\t\t}\r\n\t}", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "void declarePrefix(String prefix, String namespace);", "public String getNamespace() {\n return namespace;\n }", "public NamespaceContext getNamespaceContext() {\n LOGGER.entering(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\");\n NamespaceContext result = new JsonNamespaceContext();\n LOGGER.exiting(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\", result);\n return result;\n }", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "Namespace getGpmlNamespace();", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public final void rule__AstNamespace__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3851:1: ( ( 'namespace' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3853:1: 'namespace'\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n match(input,53,FOLLOW_53_in_rule__AstNamespace__Group__1__Impl8326); \n after(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static LabelToNode createScopeByGraph() {\n return new LabelToNode(new GraphScopePolicy(), nodeAllocatorByGraph());\n }", "public TriGWriter getTriGWriter() {\n\t\tTriGWriter writer = new TriGWriter();\n\t\tMap map = this.getNsPrefixMap();\n\t\tfor (Object key : map.keySet()) {\n\t\t\twriter.addNamespace((String) key, (String) map.get(key));\n\t\t}\n\t\treturn writer;\n\t}", "Scope createScope();", "public final void rule__AstNamespace__NamespacesAssignment_4_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22720:1: ( ( ruleAstNamespace ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22722:1: ruleAstNamespace\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n pushFollow(FOLLOW_ruleAstNamespace_in_rule__AstNamespace__NamespacesAssignment_4_645513);\n ruleAstNamespace();\n\n state._fsp--;\n\n after(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "int getNamespaceUri();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespacePrefix(Object ns);", "public abstract INameSpace getNameSpace();", "public YANG_NameSpace getNameSpace() {\n\t\treturn namespace;\n\t}", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static Namespace valueOf( String namespaceName ) {\n return ( Namespace ) allowedValues.get( namespaceName.toLowerCase() );\n }", "String getNameSpace();", "public Element insertNamespaces(final Element element) throws Exception {\r\n\r\n element.setAttribute(\"xmlns:prefix-container\", Constants.NS_IR_CONTAINER);\r\n //element.setAttribute(\"xmlns:prefix-content-type\", CONTENT_TYPE_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-context\", Constants.NS_IR_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-dc\", Constants.NS_EXTERNAL_DC);\r\n element.setAttribute(\"xmlns:prefix-dcterms\", Constants.NS_EXTERNAL_DC_TERMS);\r\n element.setAttribute(\"xmlns:prefix-grants\", Constants.NS_AA_GRANTS);\r\n //element.setAttribute(\"xmlns:prefix-internal-metadata\", INTERNAL_METADATA_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-item\", Constants.NS_IR_ITEM);\r\n //element.setAttribute(\"xmlns:prefix-member-list\", MEMBER_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-member-ref-list\", MEMBER_REF_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadata\", METADATA_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadatarecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:escidocMetadataRecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:escidocComponents\", Constants.NS_IR_COMPONENTS);\r\n element.setAttribute(\"xmlns:prefix-organizational-unit\", Constants.NS_OUM_OU);\r\n //element.setAttribute(\"xmlns:prefix-properties\", PROPERTIES_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-schema\", SCHEMA_NS_URI); TODO: huh???\r\n element.setAttribute(\"xmlns:prefix-staging-file\", Constants.NS_ST_FILE);\r\n element.setAttribute(\"xmlns:prefix-user-account\", Constants.NS_AA_USER_ACCOUNT);\r\n element.setAttribute(\"xmlns:prefix-xacml-context\", Constants.NS_EXTERNAL_XACML_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-xacml-policy\", Constants.NS_EXTERNAL_XACML_POLICY);\r\n element.setAttribute(\"xmlns:prefix-xlink\", Constants.NS_EXTERNAL_XLINK);\r\n element.setAttribute(\"xmlns:prefix-xsi\", Constants.NS_EXTERNAL_XSI);\r\n return element;\r\n }", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "protected static void addOrUpdateNamespace(MasterProcedureEnv env, NamespaceDescriptor ns)\n throws IOException {\n getTableNamespaceManager(env).addOrUpdateNamespace(ns);\n }", "public static NamespaceRegistrationTransactionFactory create(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId namespaceId,\n final NamespaceRegistrationType namespaceRegistrationType,\n final Optional<BigInteger> duration,\n final Optional<NamespaceId> parentId) {\n return new NamespaceRegistrationTransactionFactory(networkType, namespaceName, namespaceId,\n namespaceRegistrationType, duration, parentId);\n }", "Definition createDefinition();", "String getReferenceNamespace();", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@Fluent\npublic interface NamespaceAuthorizationRule extends\n AuthorizationRule<NamespaceAuthorizationRule>,\n Updatable<NamespaceAuthorizationRule.Update> {\n /**\n * @return the name of the parent namespace name\n */\n String namespaceName();\n\n /**\n * Grouping of Service Bus namespace authorization rule definition stages.\n */\n interface DefinitionStages {\n /**\n * The first stage of namespace authorization rule definition.\n */\n interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage<WithCreate> {\n }\n\n /**\n * The stage of the definition which contains all the minimum required inputs for\n * the resource to be created (via {@link WithCreate#create()}), but also allows\n * for any other optional settings to be specified.\n */\n interface WithCreate extends Creatable<NamespaceAuthorizationRule> {\n }\n }\n\n /**\n * The entirety of the namespace authorization rule definition.\n */\n interface Definition extends\n NamespaceAuthorizationRule.DefinitionStages.Blank,\n NamespaceAuthorizationRule.DefinitionStages.WithCreate {\n }\n\n /**\n * The entirety of the namespace authorization rule update.\n */\n interface Update extends\n Appliable<NamespaceAuthorizationRule>,\n AuthorizationRule.UpdateStages.WithListenOrSendOrManage<Update> {\n }\n}", "public String getNameSpace() {\n return this.namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public final void mT__51() throws RecognitionException {\n try {\n int _type = T__51;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:49:7: ( 'namespace' )\n // InternalSpeADL.g:49:9: 'namespace'\n {\n match(\"namespace\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static String copyNamespace(String absoluteName, String nonabsoluteName) {\r\n\t\tString namespace;\t\t\t\t//The namespace of the absolute name\r\n\t\t\r\n\t\tnamespace = absoluteName.replaceFirst(\"#.*\",\"\");\r\n\t\treturn namespace + \"#\" + nonabsoluteName;\r\n\t}", "public void addImpliedNamespace(NamespaceDefinition def) {\n if (!checkDuplicateNamespace(def)) {\n internalAddNamespace(def);\n }\n }", "private String getNamespace(int endIndex) {\n return data.substring(tokenStart, endIndex);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "public String generate(String namespace) {\n return generate(namespace, Http.Context.current().lang());\n }", "public void addNamespace(NamespaceDefinition def) {\n \n // override prior defaults with this namespace definition\n if (def.isAttributeDefault()) {\n m_attributeDefault = def;\n }\n if (def.isElementDefault()) {\n m_elementDefault = def;\n }\n if (checkDuplicateNamespace(def)) {\n \n // replace current definition for URI if this one sets defaults\n if (def.isAttributeDefault() || def.isElementDefault()) {\n NamespaceDefinition prior =\n (NamespaceDefinition)m_uriMap.put(def.getUri(), def);\n def.setIndex(prior.getIndex());\n if (m_overrideMap == null) {\n m_overrideMap = new HashMap();\n }\n m_overrideMap.put(def, prior);\n }\n \n } else {\n \n // no conflicts, add it\n internalAddNamespace(def);\n \n }\n }", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "public String getNamespaceName() {\n return namespaceName;\n }", "STYLE createSTYLE();", "private static java.lang.String generatePrefix(java.lang.String namespace) {\r\n if(namespace.equals(\"http://www.huawei.com.cn/schema/common/v2_1\")){\r\n return \"ns1\";\r\n }\r\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }" ]
[ "0.7332622", "0.71947646", "0.70776004", "0.66781956", "0.6280682", "0.6226572", "0.6090085", "0.6033544", "0.60171396", "0.5984442", "0.59643936", "0.5929075", "0.5918829", "0.5888365", "0.5888365", "0.5888365", "0.5875762", "0.58650005", "0.58157057", "0.57919675", "0.575152", "0.57377", "0.572343", "0.5674959", "0.56403303", "0.56007797", "0.5594264", "0.54978657", "0.5482993", "0.54766434", "0.5465069", "0.54544353", "0.5429801", "0.5385375", "0.5382016", "0.5367028", "0.5363179", "0.53538775", "0.533026", "0.530672", "0.5298964", "0.529563", "0.5270632", "0.52640283", "0.52602565", "0.524915", "0.5247289", "0.52422106", "0.52268773", "0.52201694", "0.520261", "0.5200336", "0.52001464", "0.51972246", "0.51673454", "0.5072897", "0.5051235", "0.5051163", "0.50445336", "0.5036291", "0.5036291", "0.5036291", "0.50233257", "0.50191075", "0.49670157", "0.4964398", "0.49614742", "0.49546605", "0.49459434", "0.4944815", "0.4944815", "0.49333727", "0.48999858", "0.48883158", "0.48714724", "0.48235783", "0.48146057", "0.4795736", "0.47947183", "0.4768211", "0.47646487", "0.47639203", "0.47534505", "0.47427416", "0.4741888", "0.4732793", "0.47268337", "0.47266516", "0.4722403", "0.47144532", "0.47141114", "0.47113478", "0.47081578", "0.4694752", "0.4694133", "0.46757492", "0.46624988", "0.4659554", "0.46477234", "0.4644604" ]
0.6448588
4
Deletes a namespace. This also deletes all services and endpoints in the namespace.
public void deleteNamespace( com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.protobuf.Empty deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteNamespaceMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteNamespace(com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()), request);\n }", "public void deleteNamespace(String nsName) throws NamespacePropertiesDeleteException {\n long nsContext;\n\n nsContext = NamespaceUtil.nameToContext(nsName);\n // sufficient for ZKImpl as clientside actions for now\n deleteNamespaceProperties(nsContext);\n }", "default void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteNamespaceMethod(), responseObserver);\n }", "void unsetNamespace();", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace);", "@Beta(Beta.SinceVersion.V1_7_0)\n void deleteByName(String resourceGroupName, String namespaceName, String name);", "public void clearContext(String namespace) {\n if (context != null) {\n context.remove(namespace);\n }\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id) {\n respond(request, responder, namespace, ns -> {\n NamespacedId namespacedId = new NamespacedId(ns, id);\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n if (registry.hasSchema(namespacedId)) {\n throw new NotFoundException(\"Id \" + id + \" not found.\");\n }\n registry.delete(namespacedId);\n });\n return new ServiceResponse<Void>(\"Successfully deleted schema \" + id);\n });\n }", "public void delete(String namespace, String key) {\n \t\tthis.init();\n \t\tthis._del(this.getKey(namespace, key));\n \t}", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedSubscription queryParameters);", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "@Test\n\tpublic void testDelete() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\t\n\t}", "protected void tearDown() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {\n cm.removeNamespace((String) iter.next());\n }\n }", "abstract protected void deleteNamespaceProperties(long nsContext) throws NamespacePropertiesDeleteException;", "public void deleteAllVersions(String namespace, String id) throws StageException;", "protected void tearDown() throws Exception {\n ConfigManager manager = ConfigManager.getInstance();\n for (Iterator iter = manager.getAllNamespaces(); iter.hasNext();) {\n manager.removeNamespace((String) iter.next());\n }\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedConfiguration queryParameters);", "static void cleanConfiguration() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n List namespaces = new ArrayList();\n\n // iterate through all the namespaces and delete them.\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n namespaces.add(it.next());\n }\n\n for (Iterator it = namespaces.iterator(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "public void delete(String namespace, String id, long version) throws StageException;", "protected void tearDown() throws Exception {\n super.tearDown();\n\n ConfigManager cm = ConfigManager.getInstance();\n Iterator allNamespaces = cm.getAllNamespaces();\n while (allNamespaces.hasNext()) {\n cm.removeNamespace((String) allNamespaces.next());\n }\n }", "static void clearConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n Iterator it = cm.getAllNamespaces();\n List nameSpaces = new ArrayList();\n\n while (it.hasNext()) {\n nameSpaces.add(it.next());\n }\n\n for (int i = 0; i < nameSpaces.size(); i++) {\n cm.removeNamespace((String) nameSpaces.get(i));\n }\n }", "protected abstract void undefineNamespace(int index);", "public void deleteTable(String resourceGroupName, String accountName, String tableName) {\n deleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().last().body();\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedComponent queryParameters);", "public static void unloadConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "private void closeNamespaces() {\n \n // revert prefixes for namespaces included in last declaration\n DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop();\n int[] deltas = info.m_deltas;\n String[] priors = info.m_priors;\n for (int i = deltas.length - 1; i >= 0; i--) {\n int index = deltas[i];\n undefineNamespace(index);\n if (index < m_prefixes.length) {\n m_prefixes[index] = priors[i];\n } else if (m_extensionUris != null) {\n index -= m_prefixes.length;\n for (int j = 0; j < m_extensionUris.length; j++) {\n int length = m_extensionUris[j].length;\n if (index < length) {\n m_extensionPrefixes[j][index] = priors[i];\n } else {\n index -= length;\n }\n }\n }\n }\n \n // set up for clearing next nested set\n if (m_namespaceStack.empty()) {\n m_namespaceDepth = -1;\n } else {\n m_namespaceDepth =\n ((DeclarationInfo)m_namespaceStack.peek()).m_depth;\n }\n }", "Namespaces namespaces();", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "void removeServices() throws IOException, SoapException;", "void setNamespace(java.lang.String namespace);", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Beta(Beta.SinceVersion.V1_7_0)\n Completable deleteByNameAsync(String resourceGroupName, String namespaceName, String name);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "public void beginDeleteTable(String resourceGroupName, String accountName, String tableName) {\n beginDeleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().single().body();\n }", "public void deleteBucket() {\n\n logger.debug(\"\\n\\nDelete bucket\\n\");\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n blobStore.deleteContainer( bucketName );\n }", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}/versions/{version}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id, @PathParam(\"version\") long version) {\n respond(request, responder, namespace, ns -> {\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n registry.remove(new NamespacedId(ns, id), version);\n });\n return new ServiceResponse<Void>(\"Successfully deleted version '\" + version + \"' of schema \" + id);\n });\n }", "java.lang.String getNamespace();", "void deleteTable(String tableName) {\n\t\tthis.dynamoClient.deleteTable(new DeleteTableRequest().withTableName(tableName));\n\t}", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public void deleteTable(final String tableName) throws IOException {\n deleteTable(Bytes.toBytes(tableName));\n }", "public String getNamespace();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public com.amazon.s3.DeleteBucketResponse deleteBucket(com.amazon.s3.DeleteBucket deleteBucket);", "private static void deleteBucketsWithPrefix() {\n\n logger.debug(\"\\n\\nDelete buckets with prefix {}\\n\", bucketPrefix );\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n final PageSet<? extends StorageMetadata> blobStoreList = blobStore.list();\n\n for ( Object o : blobStoreList.toArray() ) {\n StorageMetadata s = (StorageMetadata)o;\n\n if ( s.getName().startsWith( bucketPrefix )) {\n try {\n blobStore.deleteContainer(s.getName());\n } catch ( ContainerNotFoundException cnfe ) {\n logger.warn(\"Attempted to delete bucket {} but it is already deleted\", cnfe );\n }\n logger.debug(\"Deleted bucket {}\", s.getName());\n }\n }\n }", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "public String getNamespace() {\n return namespace;\n }", "public void deleteCatalog(Catalog catalog) throws BackendException;", "static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "public void deletePersistentVolumeClaim(String pvcName, String namespace) throws ApiException {\n try {\n V1Status result = coreApi.deleteNamespacedPersistentVolumeClaim(\n pvcName, namespace, \"true\",\n null, null, null,\n null, null\n );\n } catch (ApiException e) {\n LOG.error(\"Exception when deleting persistent volume claim \" + e.getMessage(), e);\n throw e;\n } catch (JsonSyntaxException e) {\n if (e.getCause() instanceof IllegalStateException) {\n IllegalStateException ise = (IllegalStateException) e.getCause();\n if (ise.getMessage() != null && ise.getMessage().contains(\"Expected a string but was BEGIN_OBJECT\"))\n LOG.debug(\"Catching exception because of issue \" +\n \"https://github.com/kubernetes-client/java/issues/86\", e);\n else throw e;\n }\n else throw e;\n }\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@Override\n\tpublic int snsDelete(SnsVO vo) {\n\t\treturn map.snsDelete(vo);\n\t}", "public String getNamespace()\n {\n return NAMESPACE;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "void deleteFunctionLibrary(String functionLibraryName, String tenantDomain)\n throws FunctionLibraryManagementException;", "void setNamespace(String namespace);", "public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "@Nullable public String getNamespace() {\n return namespace;\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/dnses\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionDNS();", "void deleteAllPaymentTerms() throws CommonManagementException;", "public void removeContext(String namespace, String key) {\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap != null) {\n namespaceMap.remove(key);\n }\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "public void deleteSNS(String foreignID, final IRequestListener iRequestListener) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_DELETE_SNS.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken)\r\n .replace(\"{SNS_ID}\", foreignID);\r\n AsyncHttpDelete deleteSNS = new AsyncHttpDelete(mContext, new AsyncHttpResponseProcess(mContext, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response deleteSNS :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }, null, true);\r\n AIOLog.d(url);\r\n deleteSNS.execute(url);\r\n }", "public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String profileName, String customDomainName, Context context);", "public void deleteTable(String tableName) {\n try {\n connectToDB(\"jdbc:mysql://localhost/EmployeesProject\");\n } catch (Exception e) {\n System.out.println(\"The EmployeesProject db does not exist!\\n\"\n + e.getMessage());\n }\n String sqlQuery = \"drop table \" + tableName;\n try {\n stmt.executeUpdate(sqlQuery);\n } catch (SQLException ex) {\n System.err.println(\"Failed to delete '\" + tableName + \n \"' table.\\n\" + ex.getMessage());\n }\n }", "int getNamespaceUri();", "@DeleteMapping(\"/ap-constants/{id}\")\n @Timed\n public ResponseEntity<Void> deleteApConstants(@PathVariable Long id) {\n log.debug(\"REST request to delete ApConstants : {}\", id);\n apConstantsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "IndexDeleted deleteIndex(String names) throws ElasticException;", "@DELETE\n\t@Produces(\"application/json\")\n\tpublic Response deleteGraphNodes() {\n\t\tcurrentGraph.getNodes().clear();\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(DB.grafos)\n\t\t\t\t\t.build();\n\t}", "public String getNamespaceName() {\n return namespaceName;\n }", "public void deleteNetWS() {\r\n/* 142 */ this._has_netWS = false;\r\n/* */ }", "void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context);", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String systemTopicName, Context context);", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "void stopServices() throws IOException, SoapException;", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public static void deleteCacheFile(Context context, String cacheFileName) {\n context.deleteFile(cacheFileName);\n }", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}" ]
[ "0.6920569", "0.6853135", "0.6578522", "0.6171476", "0.58201754", "0.58183426", "0.55494547", "0.5508903", "0.54620254", "0.54302764", "0.54081345", "0.53061247", "0.5230166", "0.5189349", "0.5180351", "0.5132191", "0.51234996", "0.5081374", "0.50712794", "0.50416875", "0.50339746", "0.49968904", "0.49462047", "0.48307154", "0.48234686", "0.48016962", "0.47970924", "0.47771785", "0.47599432", "0.47452188", "0.47343478", "0.46589485", "0.46361536", "0.45758408", "0.45685294", "0.4564939", "0.45556626", "0.45516255", "0.45459267", "0.4539418", "0.4534889", "0.45268422", "0.45162177", "0.45066264", "0.44958475", "0.4489874", "0.4489874", "0.4489874", "0.44869962", "0.44665334", "0.44635895", "0.44635895", "0.44476622", "0.44305116", "0.44108617", "0.44097176", "0.4405362", "0.43944702", "0.43730634", "0.43572336", "0.43547496", "0.43547496", "0.43547496", "0.4354548", "0.43511355", "0.4350719", "0.43291292", "0.4317675", "0.43059954", "0.43044814", "0.42732632", "0.42536566", "0.42495686", "0.42228594", "0.42095897", "0.4198907", "0.41886672", "0.4188381", "0.41883793", "0.4187531", "0.4185887", "0.41825795", "0.41795504", "0.4175883", "0.41647324", "0.41594672", "0.414893", "0.4132223", "0.41298813", "0.41276568", "0.41260207", "0.41259718", "0.4124502", "0.4114459", "0.40978017", "0.40944663", "0.4083881", "0.40769708", "0.40758872", "0.4068424" ]
0.67197263
2
Creates a service, and returns the new service.
public void createService( com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }", "public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }", "Service newService();", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }", "public CreateServiceRequest withServiceName(String serviceName) {\n setServiceName(serviceName);\n return this;\n }", "static Service create(String hostIp, String user, String password) {\n return new ServiceImpl(hostIp, user, password);\n }", "public static WPVService createInstance() {\n if ( CONFIG != null )\n return new WPVService( CONFIG );\n return null;\n }", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "IServiceContext createService(Class<?>... serviceModules);", "SourceBuilder createService();", "Fog_Services createFog_Services();", "Service_Resource createService_Resource();", "public abstract ServiceLocator create(String name);", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "void addService(ServiceInfo serviceInfo);", "public Collection<Service> createServices();", "IServiceContext createService(String childContextName, Class<?>... serviceModules);", "public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }", "public abstract T addService(ServerServiceDefinition service);", "public <T extends Service> T getService(Class<T> clazz) throws ServiceException{\n\t\ttry {\n\t\t\treturn clazz.getDeclaredConstructor().newInstance();\n\t\t} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }", "public Tracing create(String serviceName) {\n return Tracing.newBuilder()\n .localServiceName(serviceName)\n .currentTraceContext(RequestContextCurrentTraceContext.ofDefault())\n .spanReporter(spanReporter())\n .build();\n }", "public static <S> S createService(Class<S> serviceClass, String baseUrl) {\n return createService(serviceClass, baseUrl, null);\n }", "@Transactional\n public abstract OnmsServiceType createServiceTypeIfNecessary(String serviceName);", "Object getService(String serviceName);", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public static <T> T buildService(Class<T> type) {\n\n\n return retrofit.create(type);\n }", "public static <S> S createService(Class<S> serviceClass, String url) {\n Retrofit.Builder retrofit = new Retrofit.Builder()\n .baseUrl(url)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create());\n\n //set the necessary querys in the request\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n httpClient.addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n HttpUrl originalHttpUrl = original.url();\n String mTimeStamp = Md5HashGenerator.getTimeStamp();\n HttpUrl url = originalHttpUrl.newBuilder()\n .addQueryParameter(\"ts\", mTimeStamp)\n .addQueryParameter(\"apikey\", Constants.PUBLIC_KEY)\n .addQueryParameter(\"hash\", Md5HashGenerator.generateMd5(mTimeStamp))\n .build();\n\n // Request customization: add request headers\n Request.Builder requestBuilder = original.newBuilder()\n .url(url);\n\n Request request = requestBuilder.build();\n return chain.proceed(request);\n }\n });\n retrofit.client(httpClient.build());\n return retrofit.build().create(serviceClass);\n }", "public static Service getInstance()\n\t{\n\t\tif (serviceInstance == null)\n\t\t{\n\t\t\tserviceInstance = new Service(LocalDao.getInstance());\n\t\t}\n\t\treturn serviceInstance;\n\t}", "public Object getService(String serviceName);", "public interface Provider {\n Service newService();\n }", "public static synchronized ServiceDomain createDomain(final String name) {\n if (!isInitialized()) {\n init();\n }\n\n if (domains.containsKey(name)) {\n throw new RuntimeException(\"Domain already exists: \" + name);\n }\n\n ServiceDomain domain = new DomainImpl(\n name, registry, endpointProvider, transformers);\n domains.put(name, domain);\n return domain;\n }", "@Override\n public CreateServiceProfileResult createServiceProfile(CreateServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeCreateServiceProfile(request);\n }", "public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}", "CdapService createCdapService();", "private ServiceFactory() {}", "ServiceDataResource createServiceDataResource();", "protected OpUserServiceImpl createServiceImpl() {\r\n return new OpUserServiceImpl();\r\n }", "ProgramActuatorService createProgramActuatorService();", "public static EpitrelloDataServerice creator() {\n\t\tif(dataServerice == null) {\n\t\t\tdataServerice = new DataService();\n\t\t}\n\t\treturn dataServerice;\n\t}", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "public Service getService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service res){\n\t\tService service = new Service();\n\t\t\n\t\tservice.setServiceCode( res.getServiceCode() );\n\t\tservice.setServiceName( res.getServiceName() );\n\t\tservice.setGateway( res.getGateway() );\n\t\tservice.setCurrency( res.getCurrency() );\n\t\tservice.setDestination( res.getDestination() );\n\t\tservice.setUnitOfMeasure( res.getUnitOfMeasure() );\n\t\tservice.setGroupCode( res.getGroupCode() );\n\t\tservice.setGroupDescription( res.getGroupDescription() );\n\t\tservice.setFlightMaterialCode( res.getFlightMaterialCode() );\n\t\tservice.setHotelMaterialCode( res.getHotelMaterialCode() );\n\t\tservice.setParentItemRph( res.getParentItemRph() );\n\t\tservice.setGuestAllocation( res.getGuestAllocation() );\n\t\tservice.setPosnr( res.getPosnr() );\n\t\tservice.setOldPosnr( res.getOldPosnr() );\n\t\tif( res.isMandatory() != null ){\n\t\t\tservice.setMandatory( res.isMandatory().booleanValue() );\n\t\t}\n\t\tif( res.isFree() != null ){\n\t\t\tservice.setFree( res.isFree().booleanValue() );\n\t\t}\n\t\tif( res.isOccupancyBased() != null ){\n\t\t\tservice.setOccupancyBased( res.isOccupancyBased().booleanValue() );\n\t\t}\n\t\tif( res.isDateSpecific() != null ){\n\t\t\tservice.setDateSpecific( res.isDateSpecific().booleanValue() );\n\t\t}\n\t\tif( res.isAllOrNothing() != null ){\n\t\t\tservice.setAllOrNothing( res.isAllOrNothing().booleanValue() );\n\t\t}\n\t\tif( res.isWeightBased() != null ){\n\t\t\tservice.setWeightBased( res.isWeightBased().booleanValue() );\n\t\t}\n\t\tif( res.isTierBased() != null ){\n\t\t\tservice.setTierBased( res.isTierBased().booleanValue() );\n\t\t}\n\t\tif( res.isMonday() != null ){\n\t\t\tservice.setMonday( res.isMonday().booleanValue() );\n\t\t}\n\t\tif( res.isTuesday() != null ){\n\t\t\tservice.setTuesday( res.isTuesday().booleanValue() );\n\t\t}\n\t\tif( res.isWednesday() != null ){\n\t\t\tservice.setWednesday( res.isWednesday().booleanValue() );\n\t\t}\n\t\tif( res.isThursday() != null ){\n\t\t\tservice.setThursday( res.isThursday().booleanValue() );\n\t\t}\n\t\tif( res.isFriday() != null ){\n\t\t\tservice.setFriday( res.isFriday().booleanValue() );\n\t\t}\n\t\tif( res.isSaturday() != null ){\n\t\t\tservice.setSaturday( res.isSaturday().booleanValue() );\n\t\t}\n\t\tif( res.isSunday() ){\n\t\t\tservice.setSunday( res.isSunday().booleanValue() );\n\t\t}\n\t\tif( res.getSelectedDate() != null ){\n\t\t\tservice.setSelectedDate( this.getDate( res.getSelectedDate() ) );\n\t\t}\n\t\tif( res.getDepatureDate() != null ){\n\t\t\tservice.setDepatureDate( this.getDate( res.getDepatureDate() ) );\n\t\t}\n\t\tif( res.getReturnDate() != null ){\n\t\t\tservice.setReturnDate( this.getDate( res.getReturnDate() ) );\n\t\t}\n\t\tif( res.getAdultQty() != null ){\n\t\t\tservice.setAdultQty( res.getAdultQty().byteValue() );\n\t\t}\n\t\tif( res.getChild1Qty() != null ){\n\t\t\tservice.setChild1Qty( res.getChild1Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild2Qty() != null ){\n\t\t\tservice.setChild2Qty( res.getChild2Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild3Qty() != null ){\n\t\t\tservice.setChild3Qty( res.getChild3Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild1MinAge() != null ){\n\t\t\tservice.setChild1MinAge( res.getChild1MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MinAge() != null ){\n\t\t\tservice.setChild2MinAge( res.getChild2MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MinAge() != null ){\n\t\t\tservice.setChild3MinAge( res.getChild3MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild1MaxAge() != null ){\n\t\t\tservice.setChild1MaxAge( res.getChild1MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MaxAge() != null ){\n\t\t\tservice.setChild2MaxAge( res.getChild2MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MaxAge() != null ){\n\t\t\tservice.setChild3MaxAge( res.getChild3MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getTravelAgentFee() != null ){\n\t\t\tservice.setTravelAgentFee( res.getTravelAgentFee().doubleValue() );\n\t\t}\n\t\tif( res.getTotalPrice() != null ){\n\t\t\tservice.setTotalPrice( res.getTotalPrice().doubleValue() );\n\t\t}\n\t\tif( res.getMaxQuantity() != null ){\n\t\t\tservice.setMaxQuantity( res.getMaxQuantity().doubleValue() );\n\t\t}\n\t\tif( res.getAdultPrice() != null ){\n\t\t\tservice.setAdultPrice( res.getAdultPrice().doubleValue() );\n\t\t}\n\t\tif( res.getChild1Price() != null ){\n\t\t\tservice.setChild1Price( res.getChild1Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild2Price() != null ){\n\t\t\tservice.setChild2Price( res.getChild2Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild3Price() != null ){\n\t\t\tservice.setChild3Price( res.getChild3Price().doubleValue() );\n\t\t}\n\t\tif( (res.getAvailableDates() != null) && (res.getAvailableDates().size() > 0) ){\n\t\t\tservice.setAvailableDates( this.convertXMLGregorianCalendarList( res.getAvailableDates() ) );\n\t\t}\n\t\tservice.setServiceDescription( res.getServiceDescription());\n\t\t\n\t\treturn service;\n\t}", "InboundServicesType createInboundServicesType();", "public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "CdapServiceInstance createCdapServiceInstance();", "void addService(Long orderId, Long serviceId);", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "@Produces @IWSBean\n public ServiceFactory produceServiceFactory() {\n return new ServiceFactory(iwsEntityManager, notifications, settings);\n }", "Object getService(String serviceName, boolean checkExistence);", "public Builder withService(final String service) {\n this.service = service;\n return this;\n }", "@Override\n\tpublic CreateServiceInstanceBindingResponse createServiceInstanceBinding(\n\t\t\tCreateServiceInstanceBindingRequest request) {\n\t\tString appId = request.getBindingId();\n\t\tString id = request.getServiceInstanceId();\n\t\tString apikey = userManager.getAPIKey(id, appId);\n\t\tMap<String, Object> credentials = Collections.singletonMap(\"APIKEY\", (Object) apikey);\n\n\t\treturn new CreateServiceInstanceBindingResponse(credentials);\n\t}", "public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}", "public interface Provider {\n Service newService();\n}", "public interface Provider {\n Service newService();\n}", "public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer create(\n long layerId);", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public static ShoppingCartService createShoppingCartService() {\n\t\treturn null;\r\n\t}", "public interface Provider{\n Service newService();\n}", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "public com.vodafone.global.er.decoupling.binding.request.BasicServiceType createBasicServiceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasicServiceTypeImpl();\n }", "@Override\n\tpublic SpringSupplierExtension createService(ServiceContext context) throws Throwable {\n\t\treturn this;\n\t}", "public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}", "public com.vodafone.global.er.decoupling.binding.request.ServiceStatusType createServiceStatusType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ServiceStatusTypeImpl();\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "@Override\r\n\tpublic sn.ucad.master.assurance.bo.Service consulterService(Integer idService) {\n\t\tService service= (Service) serviceRepository.findOne(idService);\r\n\t\tif(service==null) throw new RuntimeException(\"Service introuvable\");\r\n\t\treturn (sn.ucad.master.assurance.bo.Service) service;\r\n\t}", "public static ServiceFactory init() {\n\t\ttry {\n\t\t\tServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI);\n\t\t\tif (theServiceFactory != null) {\n\t\t\t\treturn theServiceFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ServiceFactoryImpl();\n\t}", "public void registerService(String serviceName, Object service);", "public Service(){\n\t\t\n\t}", "public SSLService createDynamicSSLService() {\n return new SSLService(env, sslConfigurations, sslContexts) {\n\n @Override\n Map<SSLConfiguration, SSLContextHolder> loadSSLConfigurations() {\n // we don't need to load anything...\n return Collections.emptyMap();\n }\n\n /**\n * Returns the existing {@link SSLContextHolder} for the configuration\n * @throws IllegalArgumentException if not found\n */\n @Override\n SSLContextHolder sslContextHolder(SSLConfiguration sslConfiguration) {\n SSLContextHolder holder = sslContexts.get(sslConfiguration);\n if (holder == null) {\n // normally we'd throw here but let's create a new one that is not cached and will not be monitored for changes!\n holder = createSslContext(sslConfiguration);\n }\n return holder;\n }\n };\n }", "public Service(int serviceID, String serviceName, double serviceFee, String serviceDescrp){\r\n\t\tthis.serviceName = serviceName;\r\n\t\tthis.serviceID = serviceID;\r\n\t\tthis.serviceFee = serviceFee;\r\n\t\tthis.serviceDescrp = serviceDescrp;\r\n\t}", "public ChromeService getOrCreate(final String path, final ImmutableMap<String, Object> args) {\n return _cache.computeIfAbsent(new ChromeServiceKey(path, args), this::create);\n }", "private Service() {}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "public void forceServiceInstantiation()\n {\n getService();\n\n _serviceModelObject.instantiateService();\n }", "public void startService(String service)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public com.vodafone.global.er.decoupling.binding.request.GetServiceRequest createGetServiceRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetServiceRequestImpl();\n }", "protected static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) {\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(endPoint)\n .client(new OkHttpClient())\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n T service = retrofit.create(clazz);\n return service;\n }", "public CreateTaskSetRequest withService(String service) {\n setService(service);\n return this;\n }", "private ChromeService create(final ChromeServiceKey key) {\n final ImmutableMap<String, String> env = ImmutableMap.of(\n ChromeLauncher.ENV_CHROME_PATH, key._path\n );\n // ^^^ In order to pass this environment in, we need to use a many-argument constructor,\n // which doesn't have obvious default values. So I stole the arguments from the fewer-argument constructor:\n // CHECKSTYLE.OFF: LineLength\n // https://github.com/kklisura/chrome-devtools-java-client/blob/master/cdt-java-client/src/main/java/com/github/kklisura/cdt/launch/ChromeLauncher.java#L105\n // CHECKSTYLE.ON: LineLength\n final ChromeLauncher launcher = new ChromeLauncher(\n new ProcessLauncherImpl(),\n env::get,\n new ChromeLauncher.RuntimeShutdownHookRegistry(),\n new ChromeLauncherConfiguration()\n );\n return launcher.launch(ChromeArguments.defaults(true)\n .additionalArguments(key._args)\n .build());\n }", "IServiceContext createService(String childContextName,\n\t\t\tIBackgroundWorkerParamDelegate<IBeanContextFactory> registerPhaseDelegate,\n\t\t\tClass<?>... serviceModules);", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "public DCAEServiceObject(String serviceId, DCAEServiceRequest request) {\n DateTime now = DateTime.now(DateTimeZone.UTC);\n this.setServiceId(serviceId);\n this.setTypeId(request.getTypeId());\n this.setVnfId(request.getVnfId());\n this.setVnfType(request.getVnfType());\n this.setVnfLocation(request.getVnfLocation());\n this.setDeploymentRef(request.getDeploymentRef());\n this.setCreated(now);\n this.setModified(now);\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public void startService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public DestinationService getDestinationService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.destinationservice.v1.DestinationService res){\n\t\tDestinationService destinationService = new DestinationService();\n\t\t\n\t\tdestinationService.setServiceCode( res.getServiceCode() );\n\t\tdestinationService.setServiceName( res.getServiceName() );\n\t\tdestinationService.setCurrency( res.getCurrency() );\n\t\tif( res.getPrice() != null ){\n\t\t\tdestinationService.setPrice( res.getPrice().doubleValue() );\n\t\t}\n\t\t\n\t\treturn destinationService;\n\t}", "protected abstract ServiceRegistry getNewServiceRegistry();", "public TestService() {}", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }" ]
[ "0.76713836", "0.74637413", "0.7330456", "0.70256", "0.691736", "0.68569607", "0.6646501", "0.6585979", "0.65856147", "0.6390318", "0.63590884", "0.63134885", "0.62800133", "0.62596047", "0.62260824", "0.62159216", "0.61834675", "0.61606604", "0.611251", "0.6106685", "0.61004186", "0.60069764", "0.60059", "0.5997334", "0.5965245", "0.595609", "0.5935195", "0.58693326", "0.5829512", "0.5767085", "0.5759685", "0.5730148", "0.572187", "0.57130456", "0.57038766", "0.5702707", "0.56918633", "0.56877166", "0.5674055", "0.5670263", "0.5650356", "0.5634945", "0.56334496", "0.56263185", "0.56260943", "0.56122607", "0.56099516", "0.56022906", "0.55985767", "0.55890745", "0.55759615", "0.5571365", "0.5567903", "0.5560762", "0.5560357", "0.5551488", "0.5545893", "0.5544228", "0.55273104", "0.55256104", "0.5517709", "0.5491939", "0.54808176", "0.54571307", "0.54571307", "0.54433805", "0.54393595", "0.5423449", "0.5417947", "0.5411103", "0.54016143", "0.53953403", "0.53647536", "0.53396815", "0.5332552", "0.53268784", "0.53261894", "0.5316843", "0.53081566", "0.5307722", "0.5298624", "0.5284755", "0.5277395", "0.5277207", "0.5243533", "0.5243262", "0.52165323", "0.5210355", "0.52099806", "0.51989007", "0.5196324", "0.51962805", "0.5196262", "0.51948607", "0.5191798", "0.5189261", "0.5181945", "0.5163958", "0.51593834", "0.51593834" ]
0.6522692
9
Lists all services belonging to a namespace.
public void listServices( com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }", "List<Service> services();", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "public List<CatalogService> getService(String service);", "public List<ServerServices> listServerServices();", "public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }", "public List<String> getServices() throws IOException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();", "public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }", "public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "Namespaces namespaces();", "public List<ServiceInstance> getAllInstances(String serviceName);", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "AGServiceDescription[] getServices()\n throws IOException, SoapException;", "public ArrayList getNamespaces() {\n return m_namespaces;\n }", "public List<ServiceInstance> getAllInstances();", "public List<Service> findAll();", "public Iterator getServices() {\r\n\t\treturn services == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(services.values());\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()), request);\n }", "public List<Servicio> findAll();", "@Test\n\tvoid testAllNamespacesTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = true;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(NAMESPACE_ALL);\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 2);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertTrue(result.contains(\"service-b\"));\n\t}", "public String getAllRunningServices() {\n return \"\";\n }", "public List<ServiceInstance> lookupInstances(String serviceName);", "ImmutableList<T> getServices();", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public com.google.cloud.servicedirectory.v1beta1.ListServicesResponse listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListServicesMethod(), getCallOptions(), request);\n }", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();", "public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}", "Collection<Service> getAllSubscribeService();", "default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "Collection<Service> getAllPublishedService();", "public Map<String, List<String>> getServices();", "java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();", "public ServiceType[] getAllServices() throws LoadSupportedServicesException{\r\n\t\tthis.loadServices();\r\n\t\treturn this.services;\r\n\t}", "public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }", "public java.util.List<String> getServiceArns() {\n return serviceArns;\n }", "@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceCat> listServiceCat() {\r\n\t\tList<ServiceCat> courses = null;\r\n\t\ttry {\r\n\t\t\tcourses = session.createQuery(\"from ServiceCat\").list();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn courses;\r\n\t}", "public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);\n }", "public Vector getServiceNames(String serviceType) throws ServiceException {\n return namingService.getServiceNames(serviceType);\n }", "@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }", "public List<Function> getFunctions(String namespace, String name);", "public List<Service> getServicesByCategory(Category cat) {\n ServiceRecords sr = company.getServiceRecords();\n List<Service> serviceList = sr.getServiceByCat(cat);\n return serviceList;\n }", "@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "public Map<String,String> getNamespaces() {\n return namespaces;\n }", "ServicesPackage getServicesPackage();", "@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }", "public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);", "@Test\n public void listServiceAccountNamesTest() throws ApiException {\n String owner = null;\n Integer offset = null;\n Integer limit = null;\n String sort = null;\n String query = null;\n Boolean bookmarks = null;\n String mode = null;\n Boolean noPage = null;\n V1ListServiceAccountsResponse response = api.listServiceAccountNames(owner, offset, limit, sort, query, bookmarks, mode, noPage);\n // TODO: test validations\n }", "public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}", "public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {\n final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();\n Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);\n for (Endpoint ep : deployment.getService().getEndpoints()) {\n endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));\n }\n return endpointServiceNames;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceListOrBuilder getServiceListOrBuilder();", "static Set getServiceNames(SSOToken token) throws SMSException,\n SSOException {\n // Get the service names from ServiceManager\n CachedSubEntries cse = CachedSubEntries.getInstance(token,\n DNMapper.serviceDN);\n return (cse.getSubEntries(token));\n }", "public java.util.Map<String,String> getNamespaces() {\n return (_namespaces);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public Collection<Service> createServices();", "public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }", "public Vector getServiceTypes() throws ServiceException {\n return namingService.getServiceTypes();\n }", "@ManagedAttribute(description = \"Retrieves the list of Registered Services in a slightly friendlier output.\")\n public final List<String> getRegisteredServicesAsStrings() {\n final List<String> services = new ArrayList<>();\n\n for (final RegisteredService r : this.servicesManager.getAllServices()) {\n services.add(new StringBuilder().append(\"id: \").append(r.getId())\n .append(\" name: \").append(r.getName())\n .append(\" serviceId: \").append(r.getServiceId())\n .toString());\n }\n\n return services;\n }", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "public ListSubscriptionForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List listar() {\n Query query = Database.manager.createNamedQuery(\"StatussistemaDTO.findAll\");\n query.setHint(QueryHints.MAINTAIN_CACHE, HintValues.FALSE);// evita consulta em cache\n List lista = query.getResultList();\n return lista;\n }", "private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException {\n \tSubscriptionResource sr = namespaceCache.get( baseNS );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNS, null, null );\n\t\t\t\tnamespaceCache.put( baseNS, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "public ServiceCombo getServices()\n {\n return services;\n }", "public static List<String> getPrinterServiceNameList() {\n\n // get list of all print services\n PrintService[] services = PrinterJob.lookupPrintServices();\n List<String> list = new ArrayList<>();\n\n for (PrintService service : services) {\n list.add(service.getName());\n }\n return list;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces();", "List<ServiceChargeSubscription> getSCPackageList() throws EOTException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces(\n @QueryMap ListComponentForAllNamespaces queryParameters);", "public Object _getLSservices(CommandInterpreter ci) {\n\t\tSet<Registration> regs = identityManager.getLocalServices();\n\t\tci.print(\"Local Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\n\t\tregs = identityManager.getRemoteServices();\n\t\tci.print(\"Remote Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public List<ServiceInstance<InstanceDetails>> listInstances() throws Exception {\n\t\tCollection<String> serviceNames = serviceDiscovery.queryForNames();\n\t\tSystem.out.println(serviceNames.size() + \" type(s)\");\n\t\tList<ServiceInstance<InstanceDetails>> list = new ArrayList<>();\n\t\tfor (String serviceName : serviceNames) {\n\t\t\tCollection<ServiceInstance<InstanceDetails>> instances = serviceDiscovery.queryForInstances(serviceName);\n\t\t\tSystem.out.println(serviceName);\n\t\t\tfor (ServiceInstance<InstanceDetails> instance : instances) {\n\t\t\t\toutputInstance(instance);\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "@GetMapping (\"/servicos\")\n\t\tpublic List<ServicoModel> pegarTodos() {\t\t\n\t\t\treturn repository.findAll();\n\t\t}", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "public ListComponentForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }", "public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET)\n public List<MedicalService> getAllMedServices(){\n return medicalServiceService.getAllMedServices();\n }" ]
[ "0.6493551", "0.64549595", "0.6434717", "0.6354583", "0.6311621", "0.6306959", "0.6250276", "0.62462157", "0.61580026", "0.61180186", "0.60715204", "0.60534793", "0.5988863", "0.59662145", "0.59362334", "0.59362334", "0.5891551", "0.5849733", "0.5812682", "0.57960397", "0.57931805", "0.5748968", "0.57244575", "0.56951916", "0.56678414", "0.5660266", "0.5636796", "0.56264085", "0.5617853", "0.5617853", "0.56147784", "0.560543", "0.560543", "0.5592284", "0.5559006", "0.55512685", "0.5550483", "0.5550318", "0.5550318", "0.54969275", "0.54908913", "0.54878026", "0.5485214", "0.5466597", "0.5455596", "0.5446607", "0.5428825", "0.54189104", "0.5413229", "0.53815675", "0.5380396", "0.53670496", "0.5358721", "0.5344856", "0.53443784", "0.5334874", "0.53319585", "0.53284436", "0.5322806", "0.5320224", "0.5305707", "0.5293936", "0.5272822", "0.5267433", "0.5263776", "0.5250956", "0.5249366", "0.5218573", "0.52118963", "0.52062356", "0.5196397", "0.5196397", "0.5183499", "0.5144488", "0.5143055", "0.51427215", "0.5136453", "0.51269644", "0.5113645", "0.5107374", "0.51061124", "0.51061124", "0.5100996", "0.50900984", "0.5085859", "0.5072191", "0.5065709", "0.50569916", "0.5041247", "0.5033521", "0.50230604", "0.502173", "0.5017677", "0.5015007", "0.50093704", "0.50029826", "0.49962288", "0.4982256", "0.4978955", "0.49752414" ]
0.57229745
23
Deletes a service. This also deletes all endpoints associated with the service.
public void deleteService( com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteService(){\r\n \tif(editService != null){\r\n \t\tint id = editService.getId();\r\n \t\ttry {\r\n\t \t\tif(id == 0){\r\n\t \t\t\tthis.getLog().error(\" unable to deleteService(). No id selected\");\r\n\t \t\t}else{\r\n\t \t\t\tthis.getLog().info(\" deleteService(\" + id + \")\");\r\n\t \t\t\tConnectionFactory.createConnection().deleteservice(editService.getId());\r\n\t \t\t}\r\n \t\t\tthis.getServiceList().populateServiceListFromDB();\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "public void deleteService(String serviceName) {\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\").child(serviceName);\n dR.getParent().child(serviceName).removeValue();\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteService(com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request);\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "public com.google.protobuf.Empty deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteServiceMethod(), getCallOptions(), request);\n }", "@GetMapping(\"/delete_service\")\n public String deleteService(@RequestParam(value = \"serviceID\") int serviceID){\n serviceServiceIF.deleteService(serviceServiceIF.getServiceByID(serviceID));\n return \"redirect:/admin/service/setup_service\";\n }", "public void markServiceDelete() throws JNCException {\n markLeafDelete(\"service\");\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;", "void delete(ServiceSegmentModel serviceSegment);", "default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "LinkedService deleteById(String id);", "void removeServices() throws IOException, SoapException;", "@Override\n public DeleteServiceProfileResult deleteServiceProfile(DeleteServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteServiceProfile(request);\n }", "@Override\n\tpublic Integer deleteServices(com.easybooking.model.BookedServices services) {\n\t\tint i = 0;\n\t\tSessionFactory factory = HibernateUtil.getSesssionFactory();\n\t\tSession session = factory.openSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(services);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\tfactory.close();\n\t\treturn i;\n\t}", "public void verifyToDeleteService() throws Throwable{\r\n\t\tServicesPage srvpage=new ServicesPage();\r\n\t\tselServicOpt.click();\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\t\r\n\t\tif(getServiceText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getServiceText().getText()+\" is deleted\",true);\r\n\t\t\tselServiceBtn.click();\r\n\t\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\t\tsrvpage.selectServices();\r\n\t\t\tdeleteService();\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdeleteService();\r\n\t\t}\r\n\t}", "boolean removeService(T service);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "public void serviceRemoved(String serviceID);", "public void clearServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete(); \n }\n \n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceUri, String endpointName, String serviceConfigurationName);", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "@DeleteMapping(\"/costo-servicios/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCostoServicio(@PathVariable Long id) {\n log.debug(\"REST request to delete CostoServicio : {}\", id);\n costoServicioService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteServiceCat(String serviceItemId) {\r\n\t\ttry {\r\n\t\t\tServiceCat serviceItem = (ServiceCat) session.get(ServiceCat.class, serviceItemId);\r\n\t\t\tsession.delete(serviceItem);\r\n\t\t} catch (Exception e) {\r\n\t\t\ttransaction.rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "@Override\n\tpublic void delete(ServiceFee entites) {\n\t\tservicefeerepo.delete(entites);\n\t}", "void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);", "@Override\n\tpublic String removeService(String serviceName) {\n\t\tServiceManager serviceManager = loadBalance.search(serviceName);\n\t\tif (serviceManager == null) {\n\t\t\treturn \"Service Invalid\";\n\t\t}\n\t\tArrayList<String> hostNames = serviceManager.getHostnames();\n\t\twhile (hostNames.size() > 0) {\n\t\t\tthis.removeInstance(serviceName, hostNames.get(0));\n\t\t}\n\n\t\t// remove service from cluster/loadbalancer/Trie structure\n\t\tif (loadBalance.deleteService(serviceName)) {\n\t\t\treturn \"Service Removed\";\n\t\t}\n\t\treturn \"Service Invalid\";\n\t}", "public void onDeleteService(final ForwardEvent event) {\r\n\t\t// Get the listitem from the event's target (button)\r\n\t\t// parent(hbox)->parent(listcell)->parent(listitem)\r\n\t\tfinal Listitem li = (Listitem) event.getOrigin().getTarget().getParent().getParent().getParent();\r\n\t\tfinal MasterService service = (MasterService) li.getValue();\r\n\r\n\t\t// delete the service\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tpaymentDAO.deleteService(service);\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tint indx = getListIndex(service, services);\r\n\t\tservices.remove(indx);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tClients.evalJavaScript(\"$.jGrowl(\\\"Successfully Deleted the service\\\", {life:2000});\");\r\n\t}", "public static <T extends NetworkEntity> void testAddDelete(\n EndpointService service, T entity, TestDataFactory testDataFactory) {\n List<Endpoint> endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints, \"Endpoint list should be empty, not null when no endpoints exist\");\n assertTrue(endpoints.isEmpty(), \"Endpoint should be empty when none added\");\n\n // test additions\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(2, endpoints.size(), \"2 endpoints have been added\");\n assertEquals(\n 1, endpoints.get(0).getMachineTags().size(), \"The endpoint should have 1 machine tag\");\n\n // test deletion, ensuring correct one is deleted\n service.deleteEndpoint(entity.getKey(), endpoints.get(0).getKey());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(1, endpoints.size(), \"1 endpoint should remain after the deletion\");\n Endpoint expected = testDataFactory.newEndpoint();\n Endpoint created = endpoints.get(0);\n assertLenientEquals(\"Created entity does not read as expected\", expected, created);\n }", "boolean removeServiceSubscriber(Service service);", "public void deleteAllCommands(Service service) throws Exception {\n ArrayList<CommandOfService> allCommands = DAO.getPendingCommandsOfOneService(service);\n for(CommandOfService command : allCommands) {\n this.declineTransaction(command);\n }\n\n }", "void delete(\n String resourceGroupName,\n String searchServiceName,\n String sharedPrivateLinkResourceName,\n UUID clientRequestId,\n Context context);", "void deleteSegmentByIdAndType(ServiceSegmentModel serviceSegment);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "void clearService();", "@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}", "private void removeServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n //Remove directory from map \"servicesDirectories\"\n servicesDirectories.remove(serviceID);\n \n }\n \n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "public void unRegisterService(String serviceKey, Node node) {\n\t\tlog.info(\"UnRegistering the service \" + serviceKey);\n\t\ttry {\n\t\t\tString authToken = getAuthToken(node.getSecurityUrl()); \n\t\t\tDeleteService deleteService = new DeleteService();\n\t\t\tdeleteService.setAuthInfo(authToken);\n\t\t\tdeleteService.getServiceKey().add(serviceKey);\n\t\t\tgetUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteService(deleteService);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Unable to register service \" + serviceKey\n\t\t\t\t\t+ \" .\" + e.getMessage(),e);\n\t\t}\n\t}", "@DeleteMapping(value = {\"/deleteOfferedServiceById/{offeredServiceId}\", \"/deleteOfferedServiceById/{offeredServiceId}/\"})\n\tpublic OfferedServiceDto deleteOfferedServiceById(@PathVariable(\"offeredServiceId\") String offeredServiceId) throws InvalidInputException{\n\t\tOfferedService offeredService = new OfferedService();\n\t\ttry {\n\t\t\tofferedService = offeredServiceService.deleteOfferedService(offeredServiceId);\n\t\t}catch (RuntimeException e) {\n\t\t\tthrow new InvalidInputException(e.getMessage());\n\t\t}\n\n\t\treturn convertToDto(offeredService);\n\t}", "void delete(\n String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "public void stopService(String service)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "public void removeServiceConfig(String serviceName) throws SMSException {\n try {\n ServiceConfigManager scm = new ServiceConfigManager(serviceName,\n token);\n scm.deleteOrganizationConfig(orgName);\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager: Unable to \"\n + \"delete Service Config\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n }", "void delete(String id) throws PSDataServiceException, PSNotFoundException;", "public void unsetServiceValue() throws JNCException {\n delete(\"service\");\n }", "public boolean delete() {\n return delete(Datastore.fetchDefaultService());\n }", "public void removeServiceDomain(QName serviceName) {\n _serviceDomains.remove(serviceName);\n }", "public void delete(URI url) throws RestClientException {\n restTemplate.delete(url);\n }", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "net.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;", "@DEL\n @Path(\"/{id}\")\n @Consumes({\"application/json\"})\n @Produces({\"application/json\"})\n public RestRsp<Tp> deleteSite(@PathParam(\"id\") final String id) throws ServiceException {\n if(!UuidUtil.validate(id)) {\n ServiceExceptionUtil.throwBadRequestException();\n }\n return new RestRsp<Tp>(ResultConstants.SUCCESS, service.deleteTp(id));\n }", "public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }", "@RequestMapping(path = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable long id) {\n service.delete(id);\n }", "public void unregisterService(String serviceName){\n jmc.unregisterService(serviceName);\n }", "public void removeServiceClient(final String serviceName) {\n boolean needToSave = ProjectManager.mutex().writeAccess(new Action<Boolean>() {\n public Boolean run() {\n boolean needsSave = false;\n boolean needsSave1 = false;\n\n /** Remove properties from project.properties\n */\n String featureProperty = \"wscompile.client.\" + serviceName + \".features\"; // NOI18N\n String packageProperty = \"wscompile.client.\" + serviceName + \".package\"; // NOI18N\n String proxyProperty = \"wscompile.client.\" + serviceName + \".proxy\"; //NOI18N\n\n EditableProperties ep = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties ep1 = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n if(ep.getProperty(featureProperty) != null) {\n ep.remove(featureProperty);\n needsSave = true;\n }\n\n if(ep.getProperty(packageProperty) != null) {\n ep.remove(packageProperty);\n needsSave = true;\n }\n\n if(ep1.getProperty(proxyProperty) != null) {\n ep1.remove(proxyProperty);\n needsSave1 = true;\n }\n\n if(needsSave) {\n helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n\n if(needsSave1) {\n helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep1);\n }\n\n /** Locate root of web service client node structure in project,xml\n */\n Element data = helper.getPrimaryConfigurationData(true);\n NodeList nodes = data.getElementsByTagName(WEB_SERVICE_CLIENTS);\n Element clientElements = null;\n\n /* If there is a root, get all the names of the child services and search\n * for the one we want to remove.\n */\n if(nodes.getLength() >= 1) {\n clientElements = (Element) nodes.item(0);\n NodeList clientNameList = clientElements.getElementsByTagNameNS(AppClientProjectType.PROJECT_CONFIGURATION_NAMESPACE, WEB_SERVICE_CLIENT_NAME);\n for(int i = 0; i < clientNameList.getLength(); i++ ) {\n Element clientNameElement = (Element) clientNameList.item(i);\n NodeList nl = clientNameElement.getChildNodes();\n if(nl.getLength() == 1) {\n Node n = nl.item(0);\n if(n.getNodeType() == Node.TEXT_NODE) {\n if(serviceName.equalsIgnoreCase(n.getNodeValue())) {\n // Found it! Now remove it.\n Node serviceNode = clientNameElement.getParentNode();\n clientElements.removeChild(serviceNode);\n helper.putPrimaryConfigurationData(data, true);\n needsSave = true;\n }\n }\n }\n }\n }\n return needsSave || needsSave1;\n }\n });\n \n // !PW Lastly, save the project if we actually made any changes to any\n // properties or the build script.\n if(needToSave) {\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch(IOException ex) {\n NotifyDescriptor desc = new NotifyDescriptor.Message(\n NbBundle.getMessage(AppClientProjectWebServicesClientSupport.class,\"MSG_ErrorSavingOnWSClientRemove\", serviceName, ex.getMessage()), // NOI18N\n NotifyDescriptor.ERROR_MESSAGE);\n DialogDisplayer.getDefault().notify(desc);\n }\n }\n removeServiceRef(serviceName);\n }", "public boolean delete(Service servico){\n for (Service servicoLista : Database.servico) {\n if(idSaoIguais(servicoLista,servico)){\n Database.servico.remove(servicoLista);\n return true;\n }\n }\n return false;\n }", "@DELETE\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response deleteServicioDeAlojamiento(ServicioDeAlojamiento servicioDeAlojamiento) {\n\t\ttry{\n\t\t\tAlohAndesTransactionManager tm = new AlohAndesTransactionManager( getPath( ) );\n\t\t\ttm.deleteServicioDeAlojamiento(servicioDeAlojamiento);\n\t\t\treturn Response.status(200).entity(servicioDeAlojamiento).build();\n\t\t}\n\t\tcatch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}", "public void doStopService() throws ServiceException {\r\n // Nothing to do\r\n super.doStopService();\r\n }", "public boolean delete(Object[] obj) {\n\t\tString sql=\"delete from services where ServiceID=?\";\n\t\tDbManager db=new DbManager();\n\n\t\treturn db.execute(sql, obj);\n\t}", "void stopServices() throws IOException, SoapException;", "@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }", "@PostMapping(\"/delete\")\n public ResponseEntity<ServiceResult> deleteTest(@RequestBody Integer id) {\n return new ResponseEntity<ServiceResult>(testService.deleteTest(id), HttpStatus.OK);\n }", "void unsetServiceId();", "public export.serializers.avro.DeviceInfo.Builder clearService() {\n service = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "@DeleteMapping(\"/operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete Operation : {}\", id);\n operationService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteEntity(final String entityId) throws OAuthServiceException {\n if (entityId != null) {\n final WebResource deleteResource = tokenResource.path(entityId);\n final ClientResponse resp =\n deleteResource.cookie(getCookie()).delete(ClientResponse.class);\n if (resp != null) {\n final int status = resp.getStatus();\n if (status != TOKEN_UPDATED) {\n throw new OAuthServiceException(\n \"failed to delete the token: status code=\" + status);\n }\n }\n }\n }", "public void removeDeviceServiceLink();", "public void stopService();", "@DeleteMapping(\"/usuarios/{id}\")\n\t public void delete(@PathVariable Integer id) {\n\t service.delete(id);\n\t }", "@RequestMapping( value = \"/{id}\", method = RequestMethod.DELETE )\n public void delete(@PathVariable(value=\"id\") int id){\n classService.delete(id);\n }", "public void deleteById(String id);", "public void unassignService(String serviceName) throws SMSException {\n // if (coexistMode) {\n // amsdk.unassignService(serviceName);\n // } else {\n removeServiceConfig(serviceName);\n // }\n }", "public void removeFiles() throws ServiceException;", "@Override\n public void removedService(final ServiceReference<ComponentFactory> reference, final ComponentFactory service)\n {\n final String productType = (String)reference.getProperty(ComponentConstants.COMPONENT_NAME);\n \n m_Logging.info(\"Unregistering factory for: %s\", productType);\n \n final FactoryInternal factory = m_Factories.get(productType);\n \n //make unavailable via framework\n tryMakeFactoryUnavailable(factory);\n \n // allow proxy services to do clean up first\n tryProxyOnRemoveFactory(factory);\n \n //remove all associated factory objects\n tryRemoveAllFactoryObjects(factory);\n //unreg the rest of the services and other cleanup\n tryCleanupFactory(factory);\n \n //make unavailable to management services\n tryRemoveFactory(productType);\n \n //dispose of the factory instance\n tryDisposeFactory(productType);\n \n //remove reference to service\n tryUngetService(reference);\n }", "void delete(String id, boolean force) throws PSDataServiceException, PSNotFoundException;", "LinkedService deleteByIdWithResponse(String id, Context context);", "@Override\n\tpublic int deleteCallServiceByIds(String s) {\n\t\tList ids = new ArrayList();\n\t\tCollections.addAll(ids, s.split(\",\"));\n\t\treturn dgCallServiceMapper.deleteIds(ids);\n\t}", "void deleteById(final String id);", "void removeHost(Service oldHost);", "void delete(URI url) throws RestClientException;", "@Override\n\tpublic void deleteServiceInstanceBinding(DeleteServiceInstanceBindingRequest request) {\n\t\tuserManager.deleteUser(request.getServiceInstanceId());\n\t}", "public void deleteDirectoryEntriesFromCollection(\n TableServiceClient tableServiceClient, String tableName) {\n if (TableServiceClientUtils.tableExists(tableServiceClient, tableName)) {\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n tableClient.deleteTable();\n } else {\n logger.warn(\n \"No storage table {} found to be removed. This should only happen when deleting a file-less dataset.\",\n tableName);\n }\n }", "@DeleteMapping(\"/deleteStaff/{id}\")\n\tpublic void deleteStaff(@PathVariable(\"id\") int id) {\n\t\tstaffService.deleteStaff(id);\n\t}", "private void unregister(final ServiceReference serviceReference) {\n final ServiceRegistration proxyRegistration;\n synchronized (this.proxies) {\n proxyRegistration = this.proxies.remove(serviceReference);\n }\n\n if (proxyRegistration != null) {\n log.debug(\"Unregistering {}\", proxyRegistration);\n this.bundleContext.ungetService(serviceReference);\n proxyRegistration.unregister();\n }\n }", "@DeleteMapping(\"/person/{id}\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate void deletePerson(@PathVariable(\"id\") int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n }\r\n}", "@Secured(\"ROLE_ADMIN\")\n @DeleteMapping(value = \"/{id}\")\n public ResponseEntity<Map<String, Object>> delete(@PathVariable Long id) {\n\n try {\n \t\n \tList<ServicioOfrecido> listaServiciosOfrecidos = servOfreServ.buscarPorProfesional(profesionalService.findOne(id));\n \tfor (ServicioOfrecido servOfre : listaServiciosOfrecidos) {\n\t\t\t\tservOfreServ.delete(servOfre.getId_servicioOfrecido());\n\t\t\t}\n \tprofesionalService.delete(id);\n \t\n }catch(DataAccessException e) {\n return new ResponseEntity<Map<String,Object>>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity<Map<String,Object>>(HttpStatus.OK);\n }", "@Override\n\tpublic void unregisterService(String service) {\n\t\tassert((service!=null)&&(!\"\".equals(service))); //$NON-NLS-1$\n\t\tsuper.unregisterService(service);\n\t\t// Informs the other kernels about this registration\n\t\tgetMTS(NetworkMessageTransportService.class).broadcast(new KernelMessage(YellowPages.class,KernelMessage.Type.YELLOW_PAGE_UNREGISTERING,service,null));\n\t}", "@DeleteMapping(\"/api/students\")\n public void deleteStudentById(@PathVariable(value = \"id\") Long id) {\n this.studentService.deleteStudentById(id);\n }", "public void deleteSiteStats () throws DataServiceException;", "@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }", "public void delete() throws NotAuthorizedException, ConflictException,\n\t\t\tBadRequestException {\n\t}", "@DeleteMapping(\"/data-set-operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDataSetOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete DataSetOperation : {}\", id);\n dataSetOperationRepository.delete(id);\n dataSetOperationSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void serviceRemoved(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"removed serivce: \" + event);\n\t\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Ads : {}\", id);\n adsRepository.delete(id);\n adsSearchRepository.delete(id);\n }", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "public void stopService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n return beginDeleteWithResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)\n .flatMap((Response<Void> res) -> Mono.empty());\n }", "@DeleteMapping(\"/statuts/{id}\")\n public void deletStatut(@PathVariable(\"id\") int id) {\n \tserviceStatut.deletStatut(id);\n }" ]
[ "0.70450443", "0.67593014", "0.66541475", "0.65834814", "0.65828335", "0.6460537", "0.64594084", "0.6347396", "0.6284119", "0.62804425", "0.62102234", "0.6108679", "0.6106046", "0.60682994", "0.60645527", "0.58558565", "0.5839294", "0.5808563", "0.5804006", "0.5756423", "0.5747112", "0.5726717", "0.57241875", "0.5702624", "0.56764156", "0.56697875", "0.5665625", "0.5659889", "0.5648281", "0.5603389", "0.55829763", "0.5561277", "0.5548073", "0.55315274", "0.5491906", "0.54662174", "0.54646283", "0.54513633", "0.5433002", "0.54255736", "0.5411827", "0.53982407", "0.53903794", "0.53282475", "0.532687", "0.5301939", "0.52671015", "0.52353466", "0.5221709", "0.5206328", "0.52047706", "0.51925236", "0.51877487", "0.5179684", "0.51765466", "0.5175395", "0.51737547", "0.5163081", "0.51511574", "0.5121296", "0.5110555", "0.5108109", "0.5103516", "0.510232", "0.50974673", "0.5093182", "0.5092203", "0.50919497", "0.5084722", "0.5040488", "0.5038452", "0.5026586", "0.5026192", "0.5020031", "0.50196624", "0.50157815", "0.5005474", "0.49884576", "0.49871337", "0.49838", "0.4981143", "0.49676016", "0.49477962", "0.4938727", "0.4928821", "0.49246097", "0.49220797", "0.49220532", "0.4914359", "0.4912198", "0.4908454", "0.4907959", "0.49064294", "0.489305", "0.48838612", "0.48790187", "0.48723456", "0.48553354", "0.4849594", "0.4847693" ]
0.66451925
3
Creates an endpoint, and returns the new endpoint.
public void createEndpoint( com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request, io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public CreateEndpointResult createEndpoint(CreateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeCreateEndpoint(request);\n }", "public com.google.cloud.servicedirectory.v1beta1.Endpoint createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateEndpointMethod(), getCallOptions(), request);\n }", "EndPoint createEndPoint();", "public abstract Endpoint createEndpoint(String bindingId, Object implementor);", "public org.hl7.fhir.Uri addNewEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().add_element_user(ENDPOINT$8);\n return target;\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Endpoint>\n createEndpoint(com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request);\n }", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "public Endpoint addNewEndpoint(String entity)\n\t\t{\n\t\t\tElement endpointElement = document.createElement(ENDPOINT_ELEMENT_NAME);\n\t\t\tEndpoint endpoint = new Endpoint(endpointElement);\n\t\t\tendpoint.setEntity(entity);\n\n\t\t\tuserElement.appendChild(endpointElement);\n\t\t\tendpointsList.add(endpoint);\n\n\t\t\treturn endpoint;\n\t\t}", "default void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateEndpointMethod(), responseObserver);\n }", "public String createEndpoint(EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties);\n }", "public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "String createEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public Endpoint createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Endpoint createAndPublishEndpoint(String address, Object implementor,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public void addEndpoint(Endpoint endpoint)\r\n {\r\n getEndpoints().add(endpoint);\r\n }", "public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection addNewEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n return target;\r\n }\r\n }", "UMOImmutableEndpoint createOutboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void configureEndpoint(Endpoint endpoint);", "public Builder setEndpoint(String endpoint) {\n this.endpoint = Preconditions.checkNotNull(endpoint, \"Endpoint is null.\");\n return this;\n }", "@WebMethod\n URI exposeEndpoint(Endpoint endpoint);", "public Endpoint getEndpoint(String uri) {\n Endpoint answer;\n synchronized (endpoints) {\n answer = endpoints.get(uri);\n if (answer == null) {\n try {\n\n String splitURI[] = ObjectHelper.splitOnCharacter(uri, \":\", 2);\n if (splitURI[1] != null) {\n String scheme = splitURI[0];\n Component component = getComponent(scheme);\n\n if (component != null) {\n answer = component.createEndpoint(uri);\n\n if (answer != null && LOG.isDebugEnabled()) {\n LOG.debug(uri + \" converted to endpoint: \" + answer + \" by component: \"+ component);\n }\n }\n }\n if (answer == null) {\n answer = createEndpoint(uri);\n }\n\n if (answer != null && answer.isSingleton()) {\n startServices(answer);\n endpoints.put(uri, answer);\n \tlifecycleStrategy.onEndpointAdd(answer);\n }\n } catch (Exception e) {\n throw new ResolveEndpointFailedException(uri, e);\n }\n }\n }\n return answer;\n }", "public static EndpointMBean getAddEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "void setEndpoint(String endpoint);", "public Builder url(URI endpoint) {\n return server(endpoint);\n }", "UMOImmutableEndpoint createResponseEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void addPeerEndpoint(PeerEndpoint peer);", "@Override\n public UpdateEndpointResult updateEndpoint(UpdateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateEndpoint(request);\n }", "Endpoint<R> borrowEndpoint() throws EndpointBalancerException;", "public HttpEndpoint( String theEndpoint ) {\n\t\tthis( theEndpoint, true );\n\t}", "UMOImmutableEndpoint createInboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder getEndpointBuilder() {\n return getEndpointFieldBuilder().getBuilder();\n }", "public void setEndpointId(String endpointId);", "public RgwAdminBuilder endpoint(String endpoint) {\n this.endpoint = endpoint;\n return this;\n }", "@Override\n public Endpoint build() throws ConstraintViolationException {\n VocabUtil.getInstance().validate(endpointImpl);\n return endpointImpl;\n }", "public ReplicationObject withEndpointType(EndpointType endpointType) {\n this.endpointType = endpointType;\n return this;\n }", "EndpointType endpointType();", "public void addEndpoint(Endpoint endpoint)\n\t\t{\n\t\t\tEndpoint newEndpoint = addNewEndpoint(endpoint.getEntity());\n\t\t\tnewEndpoint.setStatus(endpoint.getStatus());\n\t\t\tnewEndpoint.setState(endpoint.getState());\n\t\t\tfor (Media media : endpoint.getMedias())\n\t\t\t\tnewEndpoint.addMedia(media);\n\t\t}", "private EndPoint createDotEndPoint(EndPointAnchor anchor)\r\n {\r\n DotEndPoint endPoint = new DotEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setTarget(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n\r\n return endPoint;\r\n }", "public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder getEndpointBuilder() {\n \n onChanged();\n return getEndpointFieldBuilder().getBuilder();\n }", "Adresse createAdresse();", "Endpoint getDefaultEndpoint();", "void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "String endpoint();", "public W3CEndpointReference createW3CEndpointReference(String address, QName interfaceName,\n QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters, List<Element> elements, Map<QName, String> attributes) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Builder mergeEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (endpoint_ != null) {\n endpoint_ =\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.newBuilder(endpoint_).mergeFrom(value).buildPartial();\n } else {\n endpoint_ = value;\n }\n onChanged();\n } else {\n endpointBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName,\n QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters);", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "public EndpointDetail() {\n }", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "public interface ApiEndpointDefinition extends Serializable {\n\n\t/**\n\t * Get the endpoint class.\n\t * @return the endpoint class\n\t */\n\tClass<?> getEndpointClass();\n\n\t/**\n\t * Get the endpoint type.\n\t * @return the endpoint type\n\t */\n\tApiEndpointType getType();\n\n\t/**\n\t * Get the scanner type.\n\t * @return the scanner type\n\t */\n\tJaxrsScannerType getScannerType();\n\n\t/**\n\t * Get the endpoint path.\n\t * @return the endpoint path\n\t */\n\tString getPath();\n\n\t/**\n\t * Get the API context id to which the endpoint is bound.\n\t * @return the API context id to which the endpoint is bound\n\t */\n\tString getContextId();\n\n\t/**\n\t * Init the endpoint context.\n\t * @return <code>true</code> if initialized, <code>false</code> if already initialized\n\t */\n\tboolean init();\n\n\t/**\n\t * Create a new {@link ApiEndpointDefinition}.\n\t * @param endpointClass The endpoint class (not null)\n\t * @param type The endpoint type\n\t * @param scannerType The scanner type\n\t * @param path The endpoint path\n\t * @param contextId the API context id to which the endpoint is bound\n\t * @param initializer Initializer (not null)\n\t * @return A new {@link ApiEndpointDefinition} instance\n\t */\n\tstatic ApiEndpointDefinition create(Class<?> endpointClass, ApiEndpointType type, JaxrsScannerType scannerType,\n\t\t\tString path, String contextId, Callable<Void> initializer) {\n\t\treturn new DefaultApiEndpointDefinition(endpointClass, type, scannerType, path, contextId, initializer);\n\t}\n\n}", "public InputEndpoint withEndpointName(String endpointName) {\n this.endpointName = endpointName;\n return this;\n }", "Address createAddress();", "EndpointDetails getEndpointDetails();", "public Builder clearEndpoint() {\n if (endpointBuilder_ == null) {\n endpoint_ = null;\n onChanged();\n } else {\n endpoint_ = null;\n endpointBuilder_ = null;\n }\n\n return this;\n }", "synchronized MutableSpan setEndpoint(Endpoint endpoint) {\n for (int i = 0; i < annotations.size(); i++) {\n V1Annotation a = annotations.get(i);\n if (a.endpoint().equals(Endpoints.UNKNOWN)) {\n annotations.set(i, V1Annotation.create(a.timestamp(), a.value(), endpoint));\n }\n }\n this.endpoint = endpoint;\n return this;\n }", "public VersionInfo withEndpointUrl(String endpointUrl) {\n this.endpointUrl = endpointUrl;\n return this;\n }", "interface WithPrivateEndpoint {\n /**\n * Specifies privateEndpoint.\n * @param privateEndpoint The resource of private end point\n * @return the next update stage\n */\n Update withPrivateEndpoint(PrivateEndpointInner privateEndpoint);\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder> \n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n endpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder>(\n getEndpoint(),\n getParentForChildren(),\n isClean());\n endpoint_ = null;\n }\n return endpointBuilder_;\n }", "PortDefinition createPortDefinition();", "public static EndpointMBean getSubtractEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}", "public final EObject entryRuleEndpoint() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEndpoint = null;\n\n\n try {\n // InternalMappingDsl.g:3450:49: (iv_ruleEndpoint= ruleEndpoint EOF )\n // InternalMappingDsl.g:3451:2: iv_ruleEndpoint= ruleEndpoint EOF\n {\n newCompositeNode(grammarAccess.getEndpointRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEndpoint=ruleEndpoint();\n\n state._fsp--;\n\n current =iv_ruleEndpoint; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "@Override\n public GetServiceEndpointResult getServiceEndpoint(GetServiceEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceEndpoint(request);\n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "public static EndpointMBean getMultiplyEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private void createEndpointElement(JsonObject swaggerObject, String swaggerVersion) throws RegistryException {\n\t\t/*\n\t\tExtracting endpoint url from the swagger document.\n\t\t */\n\t\tif (SwaggerConstants.SWAGGER_VERSION_12.equals(swaggerVersion)) {\n\t\t\tJsonElement endpointUrlElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tif (endpointUrlElement == null) {\n\t\t\t\tlog.warn(\"Endpoint url is not specified in the swagger document. Endpoint creation might fail. \");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tendpointUrl = endpointUrlElement.getAsString();\n\t\t\t}\n\t\t} else if (SwaggerConstants.SWAGGER_VERSION_2.equals(swaggerVersion)) {\n\t\t\tJsonElement transportsElement = swaggerObject.get(SwaggerConstants.SCHEMES);\n\t\t\tJsonArray transports = (transportsElement != null) ? transportsElement.getAsJsonArray() : null;\n\t\t\tString transport = (transports != null) ? transports.get(0).getAsString() + \"://\" : DEFAULT_TRANSPORT;\n\t\t\tJsonElement hostElement = swaggerObject.get(SwaggerConstants.HOST);\n\t\t\tString host = (hostElement != null) ? hostElement.getAsString() : null;\n if (host == null) {\n log.warn(\"Endpoint(host) url is not specified in the swagger document. \"\n + \"The host serving the documentation is to be used(including the port) as endpoint host\");\n\n if(requestContext.getSourceURL() != null) {\n URL sourceURL = null;\n try {\n sourceURL = new URL(requestContext.getSourceURL());\n } catch (MalformedURLException e) {\n throw new RegistryException(\"Error in parsing the source URL. \", e);\n }\n host = sourceURL.getAuthority();\n }\n }\n\n if (host == null) {\n log.warn(\"Can't derive the endpoint(host) url when uploading swagger from file. \"\n + \"Endpoint creation might fail. \");\n return;\n }\n\n\t\t\tJsonElement basePathElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tString basePath = (basePathElement != null) ? basePathElement.getAsString() : DEFAULT_BASE_PATH;\n\n\t\t\tendpointUrl = transport + host + basePath;\n\t\t}\n\t\t/*\n\t\tCreating endpoint artifact\n\t\t */\n\t\tOMFactory factory = OMAbstractFactory.getOMFactory();\n\t\tendpointLocation = EndpointUtils.deriveEndpointFromUrl(endpointUrl);\n\t\tString endpointName = EndpointUtils.deriveEndpointNameWithNamespaceFromUrl(endpointUrl);\n\t\tString endpointContent = EndpointUtils\n\t\t\t\t.getEndpointContentWithOverview(endpointUrl, endpointLocation, endpointName, documentVersion);\n\t\ttry {\n\t\t\tendpointElement = AXIOMUtil.stringToOM(factory, endpointContent);\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RegistryException(\"Error in creating the endpoint element. \", e);\n\t\t}\n\n\t}", "public boolean hasEndpoint() { return true; }", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint getEndpoint();", "public void addEndpoint(String endpoint) {\n\t\tif (sessionMap.putIfAbsent(endpoint, new ArrayList<Session>()) != null)\n\t\t\tLOG.warn(\"Endpoint {} already exists\", endpoint);\n\t\telse\n\t\t\tLOG.info(\"Added new endpoint {}\", endpoint);\n\t}", "@Override\n public TTransportWrapper getTransport(HostAndPort endpoint) throws Exception {\n return new TTransportWrapper(connectToServer(new InetSocketAddress(endpoint.getHostText(),\n endpoint.getPort())),\n endpoint);\n }", "private EndPoint createRectangleEndPoint(EndPointAnchor anchor)\r\n {\r\n RectangleEndPoint endPoint = new RectangleEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setSource(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n return endPoint;\r\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "public Builder setEndpoint(\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder builderForValue) {\n if (endpointBuilder_ == null) {\n endpoint_ = builderForValue.build();\n onChanged();\n } else {\n endpointBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "String serviceEndpoint();", "public Builder setApiEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n apiEndpoint_ = value;\n bitField0_ |= 0x00080000;\n onChanged();\n return this;\n }", "String createEndpointFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>\n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n if (!(stepInfoCase_ == 8)) {\n stepInfo_ = com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance();\n }\n endpointBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>(\n (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_,\n getParentForChildren(),\n isClean());\n stepInfo_ = null;\n }\n stepInfoCase_ = 8;\n onChanged();\n return endpointBuilder_;\n }", "URISegment createURISegment();", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "EndpointElement getEndpointByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public InterfaceEndpointInner withEndpointService(EndpointService endpointService) {\n this.endpointService = endpointService;\n return this;\n }", "public boolean addEndpoint(String endpointData) throws AxisFault {\n EndpointAdminServiceClient endpointAdminServiceClient = getEndpointAdminServiceClient();\n return endpointAdminServiceClient.addEndpoint(endpointData);\n }", "public Builder setEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n endpoint_ = value;\n onChanged();\n } else {\n endpointBuilder_.setMessage(value);\n }\n\n return this;\n }", "Port createPort();", "Port createPort();", "RESTElement createRESTElement();", "public String getEndpoint() {\n return this.endpoint;\n }", "public String getEndpoint() {\n return this.endpoint;\n }", "@Override\n public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeEndpoint(request);\n }", "public ResourceTypeExtension withEndpointUri(String endpointUri) {\n this.endpointUri = endpointUri;\n return this;\n }", "ServiceEndpointPolicy.DefinitionStages.Blank define(String name);", "public String createEndpointFromTemplate(String networkAddress,\n String templateGUID,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpointFromTemplate(userId, null, null, networkAddress, templateGUID, templateProperties);\n }", "private AdjListEdge createEdge(Edge e) {\n\t\t// check if present\n\t\tif (edges.get(e.getIndex()) != null) return edges.get(e.getIndex());\n\t\t\n\t\tAdjListVertex uThis = vertices.get(e.getFirstVertex().getIndex());\n\t\tAdjListVertex vThis = vertices.get(e.getSecondVertex().getIndex());\n\t\tAdjListEdge eThis = new AdjListEdge(uThis, vThis, e.getIndex());\n\t\tedges.set(e.getIndex(), eThis);\n\t\tllEdges.add(eThis);\n\t\t\n\t\tnotifyEdgeCreated(eThis);\n\t\treturn eThis;\n\t}", "public static NodeEndPoint copy(final NodeEndPoint other) {\n return new NodeEndPoint(other.getHostName(), other.getIpAddress(), other.getPort());\n }", "public String getEndpointId();", "public String createAPI(String endpointGUID,\n APIProperties apiProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return apiManagerClient.createAPI(userId, apiManagerGUID, apiManagerName, apiManagerIsHome, endpointGUID, apiProperties);\n }", "public org.hl7.fhir.Uri getEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().find_element_user(ENDPOINT$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "Delivery createDelivery();" ]
[ "0.8141555", "0.74981654", "0.74090993", "0.7352013", "0.72639024", "0.72448915", "0.70077705", "0.6772564", "0.6664593", "0.6562055", "0.64564395", "0.6345143", "0.63025427", "0.62226665", "0.61407346", "0.59696996", "0.5953576", "0.5943257", "0.5931083", "0.5923559", "0.5873572", "0.57946455", "0.56653124", "0.56120557", "0.55825275", "0.5551159", "0.54616976", "0.54614407", "0.5435791", "0.54073536", "0.53979474", "0.5380633", "0.5364688", "0.5359052", "0.53569585", "0.53377724", "0.53130513", "0.5292854", "0.52619267", "0.52616054", "0.52593684", "0.52288145", "0.51907974", "0.5173529", "0.5147081", "0.51312536", "0.5117001", "0.51123315", "0.51091534", "0.5103051", "0.5098654", "0.50895035", "0.5084562", "0.50792545", "0.50679344", "0.5064536", "0.5028622", "0.49980417", "0.4986557", "0.49853596", "0.49819177", "0.4977967", "0.49555016", "0.49543223", "0.49482778", "0.49475202", "0.4946748", "0.4942943", "0.49413806", "0.4931033", "0.49230018", "0.49119028", "0.49027961", "0.49019083", "0.48924515", "0.48801318", "0.48615736", "0.4853506", "0.48509455", "0.48492673", "0.48408714", "0.4840331", "0.48396552", "0.48390266", "0.48299655", "0.48188955", "0.48188955", "0.48086745", "0.48007807", "0.48007807", "0.47897157", "0.47853917", "0.4781269", "0.4776563", "0.47702315", "0.4767995", "0.4765194", "0.47606903", "0.47599274", "0.47598797" ]
0.6784688
7
Gets the IAM Policy for a resource
public void getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetIamPolicyMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>\n getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request);\n }", "private Resource getPolicyResource(String policyId) throws EntitlementException {\n String path = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving entitlement policy\");\n }\n\n try {\n path = policyStorePath + policyId;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n return registry.get(path);\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy : \" + policyId, e);\n throw new EntitlementException(\"Error while retrieving entitlement policy : \" + policyId, e);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "private PolicyDTO readPolicy(Resource resource) throws EntitlementException {\n \n String policy = null;\n AbstractPolicy absPolicy = null;\n PolicyDTO dto = null;\n\n try {\n policy = new String((byte[]) resource.getContent(), Charset.forName(\"UTF-8\"));\n absPolicy = PolicyReader.getInstance(null).getPolicy(policy);\n dto = new PolicyDTO();\n dto.setPolicyId(absPolicy.getId().toASCIIString());\n dto.setPolicy(policy);\n\n String policyOrder = resource.getProperty(\"policyOrder\");\n if(policyOrder != null){\n dto.setPolicyOrder(Integer.parseInt(policyOrder));\n } else {\n dto.setPolicyOrder(0);\n } // TODO policy refe IDs ???\n PolicyAttributeBuilder policyAttributeBuilder = new PolicyAttributeBuilder();\n dto.setAttributeDTOs(policyAttributeBuilder.\n getPolicyMetaDataFromRegistryProperties(resource.getProperties()));\n return dto;\n } catch (RegistryException e) {\n log.error(\"Error while loading entitlement policy\", e);\n throw new EntitlementException(\"Error while loading entitlement policy\", e);\n }\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "Policy _get_policy(int policy_type);", "@Override\n\tpublic Optional<Policy> findPolicyById(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\treturn policyDao.findById(policyId);\n\t}", "public static String getPublicReadPolicy(String bucket_name) {\r\n Policy bucket_policy = new Policy().withStatements(\r\n new Statement(Statement.Effect.Allow)\r\n .withPrincipals(Principal.AllUsers)\r\n .withActions(S3Actions.GetObject)\r\n .withResources(new Resource(\r\n \"arn:aws:s3:::\" + bucket_name + \"/*\")));\r\n return bucket_policy.toJson();\r\n }", "public com.amazon.s3.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy(com.amazon.s3.GetBucketAccessControlPolicy getBucketAccessControlPolicy);", "ServiceEndpointPolicy getById(String id);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "PolicyRecord findOne(Long id);", "public PolicyMap getPolicyMap();", "public com.amazon.s3.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy(com.amazon.s3.GetObjectAccessControlPolicy getObjectAccessControlPolicy);", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "Resource getAbilityResource();", "public PolicyDTO readPolicy(String policyId) throws EntitlementException {\n\n Resource resource = null;\n \n resource = getPolicyResource(policyId);\n\n if (resource == null) {\n return new PolicyDTO();\n }\n\n return readPolicy(resource);\n }", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public Privilege get(int actionId, int resourceId) {\n\t\tTypedQuery<Privilege> q = getEntityManager().createQuery(\"SELECT p FROM Privilege p WHERE p.actionId = :actionId AND p.resourceId = :resourceId\", Privilege.class)\n\t\t\t\t.setParameter(\"actionId\", actionId).setParameter(\"resourceId\", resourceId);\n\t\ttry {\n\t\t\treturn q.getSingleResult();\n\t\t} catch (NoResultException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public int getPermission(Integer resourceId);", "public CompanyPolicy getPolicy(int policyNo) {\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo); \n return cPolicy;\n\t}", "@Override\r\n\tpublic List<Policy> getPolicies() {\n\t\tList<Policy> policy=dao.getPolicies();\r\n\t\treturn policy;\r\n\t}", "@Nullable\n public ManagedAppPolicy get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "private static String getBucketPolicyFromFile(String policy_file) {\r\n StringBuilder file_text = new StringBuilder();\r\n try {\r\n List<String> lines = Files.readAllLines(\r\n Paths.get(policy_file), Charset.forName(\"UTF-8\"));\r\n for (String line : lines) {\r\n file_text.append(line);\r\n }\r\n } catch (IOException e) {\r\n System.out.format(\"Problem reading file: \\\"%s\\\"\", policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n // Verify the policy by trying to load it into a Policy object.\r\n Policy bucket_policy = null;\r\n try {\r\n bucket_policy = Policy.fromJson(file_text.toString());\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Invalid policy text in file: \\\"%s\\\"\",\r\n policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n return bucket_policy.toJson();\r\n }", "public abstract List<AbstractPolicy> getPolicies();", "public RegistryKeyProperty getPolicyKey();", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "Resource getResource() {\n\t\treturn resource;\n\t}", "public EvictionPolicy getEvictionPolicy()\n {\n return m_policy;\n }", "public Set<Policy> findPolicyByPerson(String id);", "public ResourceReadPolicy getReadPolicy(Class<?> resourceClass, User user)\n\t{\n\t\tString resourceAlias = resourceClass.getSimpleName();\n\t\tresourceAlias = resourceAlias.substring(0, 1).toLowerCase() + resourceAlias.substring(1);\n\t\tString projectAlias = \"project\";\n\t\t\n\t\tif (this.getLogicOperator() == LogicOperator.AND)\n\t\t{\n\t\t\tResourceReadPolicy readPolicy = new ResourceReadPolicy();\n\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(true);\n\t\t\t\tString conditions = this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\n\t\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t\t{\n\t\t\t\t\tif (subPolicy.isEntityAccessGranted(user))\n\t\t\t\t\t{\n\t\t\t\t\t\tString groupConditions = subPolicy.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!groupConditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = conditions + \" \" + this.logicOperator + \" \" + groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // If subgroup entity access is not granted\n\t\t\t\t\t{\n\t\t\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\t\t\treadPolicy.setReadConditions(null);\n\t\t\t\t\t\treturn readPolicy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treadPolicy.setReadConditions(conditions);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t\telse // If group entity access is not granted\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t}\n\t\telse // If Logic Operator is OR \n\t\t{\n\t\t\tResourceReadPolicy resourceReadPolicy = new ResourceReadPolicy();\n\t\t\t\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\tresourceReadPolicy.setReadConditions(this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user));\t\t\t\t\n\t\t\t}\n\n\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t{\n\t\t\t\tResourceReadPolicy groupReadPolicy = subPolicy.readGroupPolicy(resourceAlias, projectAlias, user);\n\t\t\t\tif (groupReadPolicy.isReadGranted())\n\t\t\t\t{\n\t\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\t\t\n\t\t\t\t\tString conditions = resourceReadPolicy.getReadConditions();\n\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions = groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\telse if (!groupReadPolicy.getReadConditions().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions += \" \" + this.logicOperator + \" \" + groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresourceReadPolicy.setReadConditions(conditions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn resourceReadPolicy;\n\t\t}\n\t}", "protected Resource getResource() {\n return resource;\n }", "static JackrabbitAccessControlList getPolicy(AccessControlManager acM, String path, Principal principal) throws RepositoryException,\n AccessDeniedException, NotExecutableException {\n AccessControlPolicyIterator itr = acM.getApplicablePolicies(path);\n while (itr.hasNext()) {\n AccessControlPolicy policy = itr.nextAccessControlPolicy();\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // try if there is an acl that has been set before:\n AccessControlPolicy[] pcls = acM.getPolicies(path);\n for (AccessControlPolicy policy : pcls) {\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // no applicable or existing ACLTemplate to edit -> not executable.\n throw new NotExecutableException();\n }", "public Resource getResource() {\n return resource;\n }", "public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n return new PolicyDTO[0];\n }\n policies = new PolicyDTO[resources.length];\n\n List<PolicyDTO> policyDTOList = new ArrayList<PolicyDTO>();\n int[] policyOrder = new int[resources.length];\n\n for(int i = 0; i < resources.length; i++){\n PolicyDTO policyDTO = readPolicy(resources[i]);\n policyDTOList.add(policyDTO);\n policyOrder[i] = policyDTO.getPolicyOrder();\n }\n\n // sorting array TODO : with Comparator class\n int[] tempArray = new int[policyOrder.length];\n Arrays.sort(policyOrder);\n for (int i = 0; i < tempArray.length; i++) {\n int j = (policyOrder.length-1)-i;\n tempArray[j] = policyOrder[i];\n }\n policyOrder = tempArray;\n\n for (int i = 0; i < policyOrder.length; i++) {\n for(PolicyDTO policyDTO : policyDTOList){\n if(policyOrder[i] == policyDTO.getPolicyOrder()){\n policies[i] = policyDTO;\n }\n }\n }\n \n return policies;\n }", "public static BackupPolicy get(String name, Output<String> id, @Nullable BackupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {\n return new BackupPolicy(name, id, state, options);\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "ServiceEndpointPolicy getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "@JsonIgnore public BoardingPolicyType getBoardingPolicy() {\n return (BoardingPolicyType) getValue(\"boardingPolicy\");\n }", "RequiredResourceType getRequiredResource();", "ResourceRequirement getRequirementFor(AResourceType type);", "private Resource[] getAllPolicyResource() throws EntitlementException {\n\n String path = null;\n Collection collection = null;\n List<Resource> resources = new ArrayList<Resource>();\n String[] children = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving all entitlement policies\");\n }\n\n try {\n path = policyStorePath;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n collection = (Collection) registry.get(path);\n children = collection.getChildren();\n\n for (String aChildren : children) {\n resources.add(registry.get(aChildren));\n }\n\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy\", e);\n throw new EntitlementException(\"Error while retrieving entitlement policies\", e);\n }\n\n return resources.toArray(new Resource[resources.size()]);\n }", "public Jedis getResource() {\n\t\tif (jedisPool == null) {\n\t\t\tsynchronized (this) {\n\t\t\t\tif (jedisPool == null){\n\t\t\t\t\tjedisPool = new JedisPool(jedisPoolConfig, host, port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jedisPool.getResource();\n\t}", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "public NatPolicy getNatPolicy();", "Iterable<PrimaryPolicyMetadata> getApplicablePolicies();", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "@XmlElement(name = \"source_policy\")\r\n public ProtectionSourcePolicy getSourcePolicy() {\r\n return sourcePolicy;\r\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public SigningPolicy getSigningPolicy(String subject) {\n \n if (this.policyDNMap == null) {\n return null;\n }\n\n return (SigningPolicy) this.policyDNMap.get(subject);\n }", "public static Policy getEndpointEffectivePolicy(Definitions wsdl, QName serviceQName, String portName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n //obtain port\n Endpoint port = srv.getEndpoint(portName);\n if (port == null) {\n throw new IllegalArgumentException(\"Cannot find port with name '\" + portName + \"' in service with qname \" + serviceQName);\n }\n //obtain binding\n QName bQName = port.getBinding();\n Binding binding = wsdl.getBinding(bQName);\n //obtain portType\n QName intQName = binding.getInterface();\n Interface portType = wsdl.getInterface(intQName);\n \n Element wsdlEl = (Element) binding.getDomElement().getParentNode();\n \n Policy portPolicy = ConfigurationBuilder.loadPolicies(port, wsdlEl);\n Policy bindingPolicy = ConfigurationBuilder.loadPolicies(binding, wsdlEl);\n Policy portTypePolicy = ConfigurationBuilder.loadPolicies(portType, wsdlEl);\n \n Policy res = Policy.mergePolicies(new Policy[]{portPolicy, bindingPolicy, portTypePolicy});\n return res;\n }", "PolicyDetail findPolicyByID(int policyId, int lenderId);", "@Deprecated\n Policy getEvictionPolicy();", "private RoutingPolicy getExportPolicy() {\n\t String exportPolicyName = null;\n switch(this.getType()) {\n case BGP:\n // String constant from\n // org.batfish.representation.cisco.CiscoConfiguration.toBgpProcess\n exportPolicyName = \"~BGP_COMMON_EXPORT_POLICY:\" \n + this.getVrf().getName() + \"~\";\n break;\n case OSPF:\n exportPolicyName = this.ospfConfig.getExportPolicy();\n break;\n default:\n return null;\n }\n\n return this.getDevice().getRoutingPolicy(exportPolicyName);\n\t}", "PolicyDetail findPolicyDetail(int policyId, Lender lender);", "public ResourceInfo getResource() {\n\t\treturn resource;\n\t}", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy getAuthorizationPolicies(int index);", "SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName);", "@Deprecated\n public List<V2beta2HPAScalingPolicy> getPolicies();", "PolicyDecision getDecision();", "public CertificateAttributesPolicy getCertificateAttributesPolicy() {\n if (trustedCAs.size() != 0) {\n TrustedCaPolicy tc = (TrustedCaPolicy)trustedCAs.get(0);\n if (tc.getCertificateAttributesPolicy() != null) {\n return tc.getCertificateAttributesPolicy();\n }\n }\n return certificateAttributesPolicy;\n }", "public String getRuntimePolicyFile(IPath configPath);", "String privacyPolicy();", "public MPProcessesResponse getMonitoringPolicyProcess(String policyId, String processId) throws RestClientException, IOException {\n return client.get(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), null, MPProcessesResponse.class);\n }", "public static APIPolicy createDefaultAPIPolicy() {\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1000, 10000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n apiPolicy.setPipelines(createDefaultPipelines());\n return apiPolicy;\n }", "public ImNotifPolicy getImNotifPolicy();", "public static short[] getPolicies() {\n\t\treturn POLICIES;\n\t}", "public List<Policy> getReferencedPolicies(Rule rule) {\n return getReferencedPolicies(rule, null);\n }", "public interface TilePolicy {\n\n\tpublic boolean getEnterableAt(Pair xy);\n\tpublic boolean getPassableAt(Pair xy);\n\tpublic boolean getJumpableAt(Pair xy);\n\t\n\tpublic boolean getWalkableAt(Pair xy, Player player);\n\tpublic boolean getEnterableAt(Pair xy, CellLogic ignore);\n\t\n\t/**\n\t * All policies must return a name so they can be enumerated\n\t * and a group of grunts all moving at once can share policies\n\t * if they have the same movement. Comparing getName is\n\t * equivalent to an equality test between policies.\n\t * \n\t * @return The name of the Policy\n\t */\n\tpublic String getName();\n\t\n}", "com.yandex.ydb.rate_limiter.ResourceOrBuilder getResourceOrBuilder();", "PolicyStatsManager getStats();", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "java.util.List<com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy> \n getAuthorizationPoliciesList();", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "com.yandex.ydb.rate_limiter.Resource getResource();", "@JsonIgnore\n public String getResource() {\n return this.resource;\n }", "public String getResourceOWL()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceOWL);\r\n }", "public ResourceVO getResource() {\n\treturn resource;\n}" ]
[ "0.653043", "0.6203847", "0.6186254", "0.6138413", "0.6095201", "0.6080963", "0.5858935", "0.58587104", "0.57901645", "0.57883555", "0.5769761", "0.5749365", "0.56901425", "0.5656458", "0.56230205", "0.5586617", "0.55617374", "0.54347295", "0.54000455", "0.5365061", "0.532694", "0.53233534", "0.5305755", "0.53039086", "0.5281342", "0.5172531", "0.51078", "0.50747687", "0.5036701", "0.5017904", "0.50159967", "0.50155324", "0.5007601", "0.4984229", "0.49525255", "0.4936179", "0.49048913", "0.4882294", "0.4877851", "0.48755404", "0.4865805", "0.4852528", "0.48485568", "0.48409018", "0.48399106", "0.48397526", "0.48180217", "0.4815235", "0.48144487", "0.47985482", "0.4792524", "0.4792524", "0.476152", "0.47521234", "0.4747377", "0.4746634", "0.47458917", "0.4731587", "0.47285128", "0.4728462", "0.47019297", "0.46738178", "0.46651825", "0.46579656", "0.46517384", "0.46486062", "0.4648384", "0.46377066", "0.46292397", "0.46263087", "0.46016318", "0.45975277", "0.45967382", "0.45901135", "0.45837587", "0.45748332", "0.45745614", "0.45457208", "0.45425373", "0.4539839", "0.45378953", "0.4534552", "0.45323947", "0.44856772", "0.4437109", "0.44298336", "0.4415657", "0.4414741", "0.44132158", "0.44037345", "0.44033006", "0.44005507", "0.44005507", "0.44005507", "0.4392923", "0.43816966", "0.4380282", "0.43778735", "0.4370531", "0.43694538" ]
0.5213906
25
Sets the IAM Policy for a resource
public void setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "public com.amazon.s3.SetBucketAccessControlPolicyResponse setBucketAccessControlPolicy(com.amazon.s3.SetBucketAccessControlPolicy setBucketAccessControlPolicy);", "public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSetIamPolicyMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>\n setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request);\n }", "public com.amazon.s3.SetObjectAccessControlPolicyResponse setObjectAccessControlPolicy(com.amazon.s3.SetObjectAccessControlPolicy setObjectAccessControlPolicy);", "public void setPolicy(com.vmware.converter.DVSPolicy policy) {\r\n this.policy = policy;\r\n }", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "default void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSetIamPolicyMethod(), responseObserver);\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "public void setPolicy(String policy) {\r\n if (policy != null && !policy.equals(\"\")) {\r\n String[] rules = policy.trim().split(\",\");\r\n if (rules != null && rules.length > 0) {\r\n emptyPolicy();\r\n \r\n for (String s : rules) {\r\n addRule(new AccessRule(s));\r\n }\r\n }\r\n }\r\n }", "public String setPolicy(String asgName, String policyName, int capacity,\n\t\t\tString adjustmentType) {\n\t\t// asClient.setRegion(usaRegion);\n\t\tPutScalingPolicyRequest request = new PutScalingPolicyRequest();\n\n\t\trequest.setAutoScalingGroupName(asgName);\n\t\trequest.setPolicyName(policyName); // This scales up so I've put up at\n\t\t\t\t\t\t\t\t\t\t\t// the end.\n\t\trequest.setScalingAdjustment(capacity); // scale up by specific capacity\n\t\trequest.setAdjustmentType(adjustmentType);\n\n\t\tPutScalingPolicyResult result = asClient.putScalingPolicy(request);\n\t\tString arn = result.getPolicyARN(); // You need the policy ARN in the\n\t\t\t\t\t\t\t\t\t\t\t// next step so make a note of it.\n\n\t\tEnableMetricsCollectionRequest request1 = new EnableMetricsCollectionRequest()\n\t\t\t\t.withAutoScalingGroupName(asgName).withGranularity(\"1Minute\");\n\t\tEnableMetricsCollectionResult response1 = asClient\n\t\t\t\t.enableMetricsCollection(request1);\n\n\t\treturn arn;\n\t}", "public void setPolicyArn(String policyArn) {\n this.policyArn = policyArn;\n }", "public void setPolicy(String policyName, TPPPolicy tppPolicy) throws VCertException {\n if (!policyName.startsWith(TppPolicyConstants.TPP_ROOT_PATH))\n policyName = TppPolicyConstants.TPP_ROOT_PATH + policyName;\n\n tppPolicy.policyName( policyName );\n\n //if the policy doesn't exist\n if(!TppConnectorUtils.dnExist(policyName, tppAPI)){\n\n //verifying that the policy's parent exists\n String parentName = tppPolicy.getParentName();\n if(!parentName.equals(TppPolicyConstants.TPP_ROOT_PATH) && !TppConnectorUtils.dnExist(parentName, tppAPI))\n throw new VCertException(String.format(\"The policy's parent %s doesn't exist\", parentName));\n\n //creating the policy\n TppConnectorUtils.createPolicy( policyName, tppAPI );\n } else\n TppConnectorUtils.resetAttributes(policyName, tppAPI);\n\n //creating policy's attributes.\n TppConnectorUtils.setPolicyAttributes(tppPolicy, tppAPI);\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "protected void setAccessPolicies(Map<String, PolicyDocument> policies)\n {\n policies.put(\"GlueAthenaS3AccessPolicy\", getGlueAthenaS3AccessPolicy());\n policies.put(\"S3SpillBucketAccessPolicy\", getS3SpillBucketAccessPolicy());\n connectorAccessPolicy.ifPresent(policyDocument -> policies.put(\"ConnectorAccessPolicy\", policyDocument));\n }", "public void setResource(int newResource) throws java.rmi.RemoteException;", "public void setRWResource(RWResource theResource) {\n resource = theResource;\n }", "public void setPolicyLine(java.lang.String value);", "@Test\n public void testSetPolicy2() throws Exception {\n setupPermission(PathUtils.ROOT_PATH, getTestUser().getPrincipal(), true, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n setupPermission(null, getTestUser().getPrincipal(), true, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n\n setupPermission(getTestRoot(), null, EveryonePrincipal.getInstance(), false, JCR_NAMESPACE_MANAGEMENT);\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public synchronized void setEvictionPolicy(EvictionPolicy policy)\n {\n int nType = (policy == null ? EVICTION_POLICY_HYBRID\n : EVICTION_POLICY_EXTERNAL);\n configureEviction(nType, policy);\n }", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public void setPolicyURL(java.lang.String policyURL) {\n this.policyURL = policyURL;\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "protected void checkSetPolicyPermission() {\n\tSecurityManager sm = System.getSecurityManager();\n\tif (sm != null) {\n\t if (setPolicyPermission == null) {\n\t\tsetPolicyPermission = new java.security.SecurityPermission(\"setPolicy\");\n\t }\n\t sm.checkPermission(setPolicyPermission);\n\t}\n }", "public void setResource(ResourceInfo resource) {\n\t\tif (this.resource != null) {\n\t\t\tthrow new IllegalStateException(\"The resource pointer can only be set once for Resource [\" + name + \"]\");\n\t\t}\n\t\tthis.resource = resource;\n\t}", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "void clearPolicy() {\n policy = new Policy();\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "protected void setResource(final Resource resource) {\n this.resource = resource;\n }", "void setResourceID(String resourceID);", "public void setPolicyType(Enumerator newValue);", "@Override\n public void replaceAllItemPolicies(Context context, Item item, List<ResourcePolicy> newpolicies) throws SQLException,\n AuthorizeException\n {\n // remove all our policies, add new ones\n authorizeService.removeAllPolicies(context, item);\n authorizeService.addPolicies(context, newpolicies, item);\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}", "public void setScalePolicy(ScalePolicy policy) {\n\n\t}", "public static void apiManagementCreateProductPolicy(\n com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {\n manager\n .productPolicies()\n .createOrUpdateWithResponse(\n \"rg1\",\n \"apimService1\",\n \"5702e97e5157a50f48dce801\",\n PolicyIdName.POLICY,\n new PolicyContractInner()\n .withValue(\n \"<policies>\\r\\n\"\n + \" <inbound>\\r\\n\"\n + \" <rate-limit calls=\\\"{{call-count}}\\\" renewal-period=\\\"15\\\"></rate-limit>\\r\\n\"\n + \" <log-to-eventhub logger-id=\\\"16\\\">\\r\\n\"\n + \" @( string.Join(\\\",\\\", DateTime.UtcNow,\"\n + \" context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress,\"\n + \" context.Operation.Name) ) \\r\\n\"\n + \" </log-to-eventhub>\\r\\n\"\n + \" <quota-by-key calls=\\\"40\\\" counter-key=\\\"cc\\\" renewal-period=\\\"3600\\\"\"\n + \" increment-count=\\\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\\\" />\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </inbound>\\r\\n\"\n + \" <backend>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </backend>\\r\\n\"\n + \" <outbound>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </outbound>\\r\\n\"\n + \"</policies>\")\n .withFormat(PolicyContentFormat.XML),\n null,\n com.azure.core.util.Context.NONE);\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public FractalTrace setAbyssPolicy(String value)\n {\n\t\n m_AbyssPolicy = value;\n setProperty(\"abyss-policy\", value);\n return this;\n }", "void register(PolicyDefinition policyDefinition);", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void updatePolicy(CompanyPolicy cP ) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, cP.getPolicyNo());\n\t\t//Update fields which are allowed to modify\n\t\tcPolicy.setPolicyTag1(cP.getPolicyTag1());\n\t\tcPolicy.setPolicyTag2(cP.getPolicyTag2());\n\t\tcPolicy.setPolicyDesc(cP.getPolicyDesc());\n\t\tcPolicy.setPolicyDoc(cP.getPolicyDoc());\n\t\tsession.update(cPolicy); \n\t\ttx.commit();\n\t}", "@Override\r\n\tpublic void setGiveResource(ResourceType resource) {\n\t\t\r\n\t}", "@Override\r\n public void setImageResource(int resourceId)\r\n {\r\n new LoadResourceTask().execute(resourceId);\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public void setPolicyEffectiveDate(java.lang.String policyEffectiveDate) {\n this.policyEffectiveDate = policyEffectiveDate;\n }", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setDefaultPolicy(Policy defaultPolicy) {\n\t\tif (defaultPolicy == null)\n\t\t\tthrow new NullPointerException();\n\t\tthis.defaultPolicy = defaultPolicy;\n\t}", "public SharedActivationPolicyPermission(String policy) {\n\tthis(policy, init(policy));\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request, responseObserver);\n }", "public ActiveIAMPolicyAssignment withPolicyArn(String policyArn) {\n setPolicyArn(policyArn);\n return this;\n }", "@Override\n\tpublic void setResourcePrimKey(long resourcePrimKey) {\n\t\t_changesetEntry.setResourcePrimKey(resourcePrimKey);\n\t}", "public LinkedIntegrationRuntimeRbacAuthorization setResourceId(String resourceId) {\n this.resourceId = resourceId;\n return this;\n }", "public void setLoadBalancerPolicy(String loadBalancerPolicy) {\n this.loadBalancerPolicy = loadBalancerPolicy;\n }", "public EditPolicy() {\r\n super();\r\n }", "@Nullable\n public ManagedAppPolicy put(@Nonnull final ManagedAppPolicy newManagedAppPolicy) throws ClientException {\n return send(HttpMethod.PUT, newManagedAppPolicy);\n }", "public int setCurrentResource(final Resource newResource) {\n currentSpinePos = book.getSpine().getResourceIndex(newResource);\n currentResource = newResource;\n return currentSpinePos;\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public MonitoringPoliciesResponse updateMonitoringPolicyProcess(UpdateMPProcessesRequest object, String policyId, String processId) throws RestClientException, IOException {\n return client.update(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), object, MonitoringPoliciesResponse.class, 202);\n }", "public DistributionPolicyInternal setName(String name) {\n this.name = name;\n return this;\n }", "public Object\n _set_policy_override(Policy[] policies,\n SetOverrideType set_add) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "public void initResourceOfPlayer(Resource resource) throws IOException, InterruptedException {\n try {\n\n currentPlayer.initResource(resource);\n } catch (CallForCouncilException e) {\n exceptionHandler(e);\n } catch (LastSpaceReachedException e) {\n exceptionHandler(e);\n }\n currentPlayer.setInitResource(true);\n notifyToOneObserver(new UpdateInitResourceMessage(resource));\n notifyAllObserverLessOne(new UpdateForNotCurrentResourceMessage(resource));\n\n\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdPut(String policyId, String contentType,\n AdvancedThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n\n //overridden parameters\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n apiProvider.updatePolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void giveResourcesToPlayer(Resource resource){\n resources.addResource(resource);\n }", "public Optional<CancellationPolicy> updatePolicy(long policyId, CancellationPolicy editedPolicy) throws Exception{\n Optional<CancellationPolicy> updatedPolicy = cancellationPolicyRepository.findById(policyId).map((selectedPolicy) -> {\n selectedPolicy.getRules().clear();\n selectedPolicy.getRules().addAll(editedPolicy.getRules());\n selectedPolicy.getRules().forEach((rule) -> {\n rule.setPolicy(editedPolicy);\n });\n selectedPolicy.setPolicyId(editedPolicy.getPolicyId());\n selectedPolicy.setPolicyName(editedPolicy.getPolicyName());\n selectedPolicy.setPolicySource(editedPolicy.getPolicySource());\n selectedPolicy.setPolicyDescription(editedPolicy.getPolicyDescription());\n selectedPolicy.setPolicyUpdatedBy(editedPolicy.getPolicyUpdatedBy());\n selectedPolicy.setPolicyUpdatedOn();\n selectedPolicy.setPolicyCancelRestrictionDays(editedPolicy.getPolicyCancelRestrictionDays());\n selectedPolicy.setPolicyCancelRestrictionHours(editedPolicy.getPolicyCancelRestrictionHours());\n return cancellationPolicyRepository.save(selectedPolicy);\n });\n return updatedPolicy;\n }", "@Override\n\tprotected void createEditPolicies()\n\t{\n\t\t\n\t}", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "protected ValidatableResponse updateResource(String path, JSONObject newResource) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .contentType(ContentType.JSON)\n .body(newResource.toString())\n .when()\n .put(path)\n .then()\n .statusCode(204);\n }", "public void setStrategyResource(String strategyResource) {\n this.strategyResource = strategyResource;\n }", "@JsonProperty(\"resource\")\n public void setResource(String resource) {\n this.resource = resource;\n }", "public void setResource(URI resource) {\n this.resource = resource;\n }", "public void setPolicyGroupName(String policyGroupName)\n {\n \tthis.policyGroupName = policyGroupName;\n }", "PolicyController createPolicyController(String name, Properties properties);", "public void setContainerPolicy(ContainerPolicy containerPolicy) {\n this.containerPolicy = containerPolicy;\n }", "public void setResourceTo(ServiceCenterITComputingResource newResourceTo) {\n addPropertyValue(getResourcesProperty(), newResourceTo);\r\n }", "public boolean setRateLimit (String sliceName, String rate) \n\t\t\tthrows PermissionDeniedException;", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "AgentPolicyBuilder setJobPriority(JobPriority jobPriority);", "public PolicyIDImpl(String idString) {\n super(idString);\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateChannelPolicyMethod(), responseObserver);\n }", "@Override\n public void replaceAllBitstreamPolicies(Context context, Item item, List<ResourcePolicy> newpolicies)\n throws SQLException, AuthorizeException\n {\n // remove all policies from bundles, add new ones\n // Remove bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n bundleService.replaceAllBitstreamPolicies(context, mybundle, newpolicies);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "public void setNatPolicy(NatPolicy policy);", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public lnrpc.Rpc.PolicyUpdateResponse updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request) {\n return blockingUnaryCall(\n getChannel(), getUpdateChannelPolicyMethod(), getCallOptions(), request);\n }", "public AssignTagTabItem(Resource resource){\n\t\tthis.resource = resource;\n\t\tthis.resourceId = resource.getId();\n\t}", "public void setRating(Rating rating) {\n double boundedRating = this.boundedRating(rating);\n this.normalisedRating = this.normaliseRating(boundedRating);\n this.ratingCount++;\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }" ]
[ "0.66972566", "0.6082597", "0.603994", "0.58559775", "0.5677932", "0.5533153", "0.55294746", "0.54336023", "0.54295254", "0.5386457", "0.5322885", "0.5307284", "0.5242436", "0.50387615", "0.5026891", "0.50065285", "0.49567696", "0.49369815", "0.49298045", "0.4895639", "0.48891863", "0.48862508", "0.48624665", "0.48426878", "0.48366866", "0.48312998", "0.48273727", "0.48075646", "0.47941887", "0.47936183", "0.47679532", "0.47602433", "0.47508904", "0.47296184", "0.46621573", "0.46162933", "0.45881912", "0.4579893", "0.4577294", "0.45694926", "0.4552101", "0.45490006", "0.45384145", "0.4532844", "0.45296696", "0.45157316", "0.4507783", "0.44923484", "0.44883838", "0.44883838", "0.44874197", "0.44849795", "0.4479074", "0.4472625", "0.4464273", "0.4445344", "0.44427216", "0.44418812", "0.4432885", "0.4429717", "0.44274044", "0.44241577", "0.44066086", "0.44009677", "0.43787515", "0.4372247", "0.43720973", "0.4356897", "0.43564215", "0.4355487", "0.435446", "0.43498212", "0.4349567", "0.43441963", "0.43313757", "0.43304297", "0.4317681", "0.43174452", "0.431093", "0.430341", "0.42971444", "0.4296209", "0.4292298", "0.4277988", "0.4277988", "0.4277988", "0.427148", "0.42690822", "0.42557612", "0.4251575", "0.4238082", "0.42305496", "0.42201197", "0.42008317", "0.42004794", "0.41995704", "0.4199074", "0.41974437", "0.41969106", "0.4195941" ]
0.6077283
2
Tests IAM permissions for a resource (namespace, service or service workload only).
public void testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request, responseObserver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasResourceActionAllowPermissions(Resource resource,\n String action) {\n String whereClause = \"p.resource = :resource AND (\"\n + \"(p.action = :action AND p.type = :typeAllow) OR \"\n + \"(p.type = :typeAllowAll))\";\n Map<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"resource\", resource.getIdentifier());\n parameters.put(\"action\", action);\n parameters.put(\"typeAllow\", PermissionType.ALLOW);\n parameters.put(\"typeAllowAll\", PermissionType.ALLOW_ALL);\n\n Long count = FacadeFactory.getFacade().count(PermissionEntity.class,\n whereClause, parameters);\n\n return count > 0 ? true : false;\n }", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "public int getPermission(Integer resourceId);", "public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request);\n }", "@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}", "public boolean checkPermissions(String account,String group, String resource, String action)\n throws Exception\n {\n return checkPermissions(new PolicyCredentials(account,group),resource,action);\n }", "@Test\n public void testJdoeAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/jdoe\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"jdoe\");\n\n // jdoe can access information about alice because he is granted with \"people-manager\" role\n response = makeRequest(\"http://localhost:8080/api/alice\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"alice\");\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "default void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getTestIamPermissionsMethod(), responseObserver);\n }", "public boolean checkPermissions(PolicyCredentials credentials, String resource, String action) throws Exception {\n //\n // Set our permissions to null.\n perm = null ;\n //\n // Check if we have a service reference.\n if (null != service)\n {\n perm = service.checkPermissions(credentials,resource,action);\n }\n //\n // Return true if we got a result, and the permissions are valid.\n return (null != perm) ? perm.isValid() : false ;\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.iam.v1.TestIamPermissionsResponse>\n testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request);\n }", "@Test\n\tpublic void testIsPermitted_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isHasPermissions();", "void checkPermission(T request) throws AuthorizationException;", "@Test\n\tpublic void testIsPermitted_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isWritePermissionGranted();", "@Test\n public void testWithExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n AuthorizationResponse response = authzClient.authorization(\"marta\", \"password\", \"foo\")\n .authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource A with client scope bar.\n request = new PermissionRequest(\"Resource A\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource B with client scope bar.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n }", "@Test\n\tpublic void testIsPermitted_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = null;\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "public boolean checkPermission(Permission permission);", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target,\n IPermissionPolicy policy)\n throws AuthorizationException;", "@Test\n public void testWithoutExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"baz\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n\n // Access Resource B with client scope foo.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"foo\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n }", "@Test\n public void testCheckExistsPermission() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE\");\n assertFalse(permissionManager.checkExists(permission2));\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Test\n\tpublic void testIsPermitted_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permissions[] getPermissionsNeeded(ContainerRequestContext context) throws Exception {\n Secured auth = resourceInfo.getResourceMethod().getAnnotation(Secured.class);\n\n // If there's no authentication required on method level, check class level.\n if (auth == null) {\n auth = resourceInfo.getResourceClass().getAnnotation(Secured.class);\n }\n\n // Else, there's no permission required, thus we chan continue;\n if (auth == null) {\n log.log(Level.INFO, \"AUTHENTICATION: Method: \" + context.getMethod() + \", no permission required\");\n return new Permissions[0];\n }\n\n return auth.value();\n }", "public abstract boolean checkRolesAllowed(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}", "@Test\n\tpublic void testIsPermitted_7()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n public void testDenyAccessWithRoleCondition() {\n denyAccessWithRoleCondition(false);\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "boolean hasPermission(final Player sniper, final String permission);", "@Test\n\tpublic void testCheckPermissions_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "Resource getAbilityResource();", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;", "public boolean hasPermission(Context paramContext, String paramString) {\n }", "@Test\n\tpublic void testCheckPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test(expected = org.jsecurity.authz.UnauthorizedException.class)\n\tpublic void testCheckPermission_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void testCheckExistsPermissionWithString() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE2\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission.getName()));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE2\");\n assertFalse(permissionManager.checkExists(permission2.getName()));\n }", "@Test\n\tpublic void testIsPermitted_8()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(null);\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void testIsPermitted_9()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void testGetSetPermission() throws Exception {\n\t Namespace n = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t n.getItem();\n\t String newName = UUID.randomUUID().toString();\n\t Namespace newNamespace = n.createNamespace(newName, \"Created for the purposes of testing\");\n\t // Lets set a strange permission on the namespace so we know what we're checking when \n\t // we get it back\n\t Permission p = new Permission(Policy.OPEN, new String[]{\"fluiddb\"});\n\t newNamespace.setPermission(Namespace.Actions.CREATE, p);\n\t \n\t // OK... lets try getting the newly altered permission back\n\t Permission checkP = newNamespace.getPermission(Namespace.Actions.CREATE);\n\t assertEquals(p.GetPolicy(), checkP.GetPolicy());\n\t assertEquals(p.GetExceptions()[0], checkP.GetExceptions()[0]);\n\t \n\t // Housekeeping to clean up after ourselves...\n\t newNamespace.delete();\n\t}", "@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}", "public abstract boolean canEditAccessRights(OwObject object_p) throws Exception;", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "@Test\n public void testGetPermissionInstance() throws Exception\n {\n permission = permissionManager.getPermissionInstance();\n assertNotNull(permission);\n assertTrue(permission.getName() == null);\n }", "@Test\n\tpublic void testGetPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;", "@Test\n\tpublic void testCheckPermission_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testGetPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public static boolean isReadStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "@Test\n\tpublic void testIsPermittedAll_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "void permissionGranted(int requestCode);", "@Test\n public void testRequestGrantedPermission() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // Request the permission and allow it\n BasePermissionActivity.Result firstResult = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(firstResult, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Request the permission and do nothing\n BasePermissionActivity.Result secondResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 1,\n BasePermissionActivity.class, null);\n\n // Expect the permission is granted\n assertPermissionRequestResult(secondResult, REQUEST_CODE_PERMISSIONS + 1,\n permissions, new boolean[] {true});\n }", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "@Override\n public void checkPermission(Permission perm) {\n }", "boolean memberHasPermission(String perm, Member m);", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "private boolean checkReadOnlyAndNull(Shell shell, IResource currentResource)\n\t{\n\t\t// Do a quick read only and null check\n\t\tif (currentResource == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do a quick read only check\n\t\tfinal ResourceAttributes attributes = currentResource\n\t\t\t\t.getResourceAttributes();\n\t\tif (attributes != null && attributes.isReadOnly())\n\t\t{\n\t\t\treturn MessageDialog.openQuestion(shell, Messages.RenameResourceAction_checkTitle,\n\t\t\t\t\tMessageFormat.format(Messages.RenameResourceAction_readOnlyCheck, new Object[]\n\t\t\t\t\t\t{ currentResource.getName() }));\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }", "private void usersCheckPermission(PermissionRequest.ActionType grantedAction, IEntity entity)\n {\n authGrantedUser();\n try {\n executeAction(grantedAction, entity);\n } catch (AccessDeniedException e) {\n fail(\"Action \" + grantedAction.name() + \" was granted but could not be executed \" + entity.getEntityName());\n }\n\n authNotGrantedUser();\n try {\n executeAction(grantedAction, entity);\n fail(\"Action \" + grantedAction.name() + \" was not granted but could be executed \" + entity.getEntityName());\n } catch (AccessDeniedException e) {\n //\n }\n }", "@Test\n\tpublic void testIsPermittedAll_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Override\n\tpublic void authorize(String resourceName, String action, String rpcName)\n\t\t\tthrows Exception {\n\t}", "public interface IPermissions {\n}", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "@Test\n\tpublic void testIsPermittedAll_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "@Test\n\tpublic void testIsPermitted_6()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private static boolean isPermissionGranted(Context context, String permission) {\n if (ContextCompat.checkSelfPermission(context, permission)\n == PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG, permission + \" granted\");\n return true;\n }\n Log.i(TAG, permission + \" not granted yet\");\n return false;\n }", "@Override\n\tpublic boolean hasPermission(String string) {\n\t\treturn true;\n\t}", "@Test\n public void testDenyAccessWithNegateRoleCondition() {\n denyAccessWithRoleCondition(true);\n }", "@Test\n public void testPermissions() throws IOException {\n Note note = notebook.createNote(\"note1\", anonymous);\n NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();\n // empty owners, readers or writers means note is public\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n notebookAuthorization.setOwners(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n notebookAuthorization.setReaders(note.getId(), new HashSet(Arrays.asList(\"user1\", \"user2\")));\n notebookAuthorization.setRunners(note.getId(), new HashSet(Arrays.asList(\"user3\")));\n notebookAuthorization.setWriters(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), false);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user3\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n // Test clearing of permissions\n notebookAuthorization.setReaders(note.getId(), Sets.<String>newHashSet());\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), true);\n notebook.removeNote(note.getId(), anonymous);\n }", "abstract public void getPermission();", "public boolean checkReadPermission(final String bucket_path) {\r\n\t\t\treturn checkReadPermission(BeanTemplateUtils.build(DataBucketBean.class).with(DataBucketBean::full_name, bucket_path).done().get());\r\n\t\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "@Test(dependsOnMethods = {\"modifyResource\"})\n public void modifyNotExistingResource() throws Exception {\n showTitle(\"modifyNotExistingResource\");\n\n try {\n UmaResource resource = new UmaResource();\n resource.setName(\"Photo Album 3\");\n resource.setIconUri(\"http://www.example.com/icons/flower.png\");\n resource.setScopes(Arrays.asList(\"http://photoz.example.com/dev/scopes/view\", \"http://photoz.example.com/dev/scopes/all\"));\n\n getResourceService().updateResource(\"Bearer \" + pat.getAccessToken(), \"fake_resource_id\", resource);\n } catch (ClientErrorException ex) {\n System.err.println(ex.getResponse().readEntity(String.class));\n int status = ex.getResponse().getStatus();\n assertTrue(status != Response.Status.OK.getStatusCode(), \"Unexpected response status\");\n }\n }", "int getPermissionRead();", "@Override\n public void checkPermission(final Permission permission) {\n List<Class> stack = Arrays.asList(getClassContext());\n\n // if no blacklisted classes are in the stack (or not recursive)\n if (stack.subList(1, stack.size()).contains(getClass()) || Collections.disjoint(stack, classBlacklist)) {\n // allow everything\n return;\n }\n // if null/custom and blacklisted classes present, something tried to access this class\n if (permission == null || permission instanceof StudentTesterAccessPermission) {\n throw new SecurityException(\"Security check failed.\");\n }\n // else iterate over all active policies and call their respective methods\n PermissionContext pc = new PermissionContext(stack, permission, instance);\n for (var policy : policies) {\n try {\n policy.getConsumer().accept(pc);\n } catch (SecurityException e) {\n triggered = true;\n // Illegal attempt caught, log an error or do smth\n LOG.severe(String.format(\"Illegal attempt caught: %s\", permission.toString()));\n throw e;\n }\n\n }\n }", "@Test\n public void testMatchValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n assertTrue(\"no match\", filter.isResourceAccess(mtch));\n }", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "@Test\n\tpublic void testIsPermittedAll_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public interface TestService {\n// @PreAuthorize(\"hasAuthority('test')\")\n String test();\n}", "public interface RuntimePermissionRequester {\n /**\n * Asks user for specific permissions needed to proceed\n *\n * @param requestCode Request permission using this code, allowing for\n * callback distinguishing\n */\n void requestNeededPermissions(int requestCode);\n}", "boolean isPermissionsReviewRequired(@NonNull String packageName,\n @UserIdInt int userId);", "public static boolean isWriteStorageAllowed(FragmentActivity act) {\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "PermissionService getPermissionService();", "boolean needsStoragePermission();", "public interface PermissionsInstance {\n\n\t/**\n\t * Check whether the specified member has permission for the following action\n\t * @param perm The permission name\n\t * @param m The member\n\t * @return True, if the member can do the action\n\t */\n\tboolean memberHasPermission(String perm, Member m);\n\t\n}", "public static void checkPermission(com.tangosol.net.Cluster cluster, String sServiceName, String sCacheName, String sAction)\n {\n // import com.tangosol.net.ClusterPermission;\n // import com.tangosol.net.security.Authorizer;\n // import com.tangosol.net.security.DoAsAction;\n // import java.security.AccessController;\n // import javax.security.auth.Subject;\n \n Authorizer authorizer = getAuthorizer();\n Security security = Security.getInstance();\n \n if (authorizer == null && security == null)\n {\n return;\n }\n \n _assert(sServiceName != null, \"Service must be specified\");\n \n String sTarget = \"service=\" + sServiceName +\n (sCacheName == null ? \"\" : \",cache=\" + sCacheName);\n ClusterPermission permission = new ClusterPermission(cluster == null || !cluster.isRunning() ? null :\n cluster.getClusterName(), sTarget, sAction);\n Subject subject = null;\n \n if (authorizer != null)\n {\n subject = authorizer.authorize(subject, permission);\n }\n \n if (security != null)\n {\n Security.CheckPermissionAction action = new Security.CheckPermissionAction();\n action.setCluster(cluster);\n action.setPermission(permission);\n action.setSubject(subject);\n action.setSecurity(security);\n \n AccessController.doPrivileged(new DoAsAction(action));\n }\n }", "void requestNeededPermissions(int requestCode);", "@Override\n public boolean hasPermission(User user, E entity, Permission permission) {\n\n // always grant READ access (\"unsecured\" object)\n if (permission.equals(Permission.READ)) {\n logger.trace(\"Granting READ access on \" + entity.getClass().getSimpleName() + \" with ID \" + entity.getId());\n return true;\n }\n\n // call parent implementation\n return super.hasPermission(user, entity, permission);\n }", "int getPermissionWrite();", "public boolean hasPermission(T object, Permission permission, User user);", "@Test\n public void testRuntimeGroupGrantSpecificity() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // request only one permission from the 'contacts' permission group\n BasePermissionActivity.Result result = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class,\n () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(result, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Make sure no undeclared as used permissions are granted\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n }" ]
[ "0.626141", "0.6143579", "0.60582566", "0.60410976", "0.58795595", "0.58387005", "0.5828776", "0.57359004", "0.5704171", "0.5687395", "0.5651673", "0.5646067", "0.5641807", "0.5605156", "0.557404", "0.55634123", "0.5554017", "0.55476123", "0.5529396", "0.5502352", "0.5498456", "0.5493375", "0.5480557", "0.5465804", "0.5438496", "0.5432041", "0.54313684", "0.54295355", "0.5428414", "0.54246414", "0.5422935", "0.5418173", "0.5416088", "0.53846776", "0.5357873", "0.5350551", "0.5344094", "0.5340742", "0.53322273", "0.53306174", "0.53206706", "0.5301777", "0.5271372", "0.5268096", "0.5252603", "0.5240376", "0.523475", "0.5234298", "0.5230403", "0.5223688", "0.5221463", "0.52094436", "0.52040255", "0.51964396", "0.5188684", "0.51835316", "0.51829976", "0.5182017", "0.5176002", "0.5174576", "0.5163766", "0.51576054", "0.51575184", "0.5141274", "0.5141052", "0.51386786", "0.51369864", "0.5134427", "0.51247907", "0.5117473", "0.51125836", "0.5107093", "0.50991553", "0.5091838", "0.50825554", "0.50802684", "0.50725186", "0.50698406", "0.5068458", "0.5053956", "0.50515556", "0.5046983", "0.503903", "0.5037097", "0.5030365", "0.5030044", "0.50209546", "0.5014474", "0.50078636", "0.500299", "0.499788", "0.49959636", "0.4989969", "0.49894166", "0.49864867", "0.49806154", "0.4974804", "0.49725083", "0.49688065", "0.49673074" ]
0.60512483
3
Creates a namespace, and returns the new namespace.
public com.google.cloud.servicedirectory.v1beta1.Namespace createNamespace( com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateNamespaceMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static NamespaceContext create() {\n return new NamespaceContext();\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Namespace>\n createNamespace(com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request);\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "public void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "protected NamespaceStack createNamespaceStack() {\r\n // actually returns a XMLOutputter.NamespaceStack (see below)\r\n return new NamespaceStack();\r\n }", "default void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateNamespaceMethod(), responseObserver);\n }", "abstract XML addNamespace(Namespace ns);", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public String createNamespace(IProject p, String ns) throws ThinklabException {\r\n \t\t\t\t\r\n \t\tFile ret = new File(getSourceDirectory() + File.separator + \r\n \t\t\t\t\t\t\tns.replace('.', File.separatorChar) + \".tql\");\r\n \t\tFile dir = new File(MiscUtilities.getFilePath(ret.toString()));\r\n \t\t\r\n \t\ttry {\r\n \t\t\tdir.mkdirs();\r\n \t\t\tPrintWriter out = new PrintWriter(ret);\r\n \t\t\tout.println(\"namespace \" + ns + \";\\n\");\r\n \t\t\tout.close();\r\n \t\t} catch (Exception e) {\r\n \t\t\tthrow new ThinklabClientException(e);\r\n \t\t}\r\n \t\t\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}", "Namespaces namespaces();", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "void setNamespace(java.lang.String namespace);", "public static IRIRewriter createNamespaceBased(\n\t\t\tfinal String originalNamespace, final String rewrittenNamespace) {\n\t\tif (originalNamespace.equals(rewrittenNamespace)) {\n\t\t\treturn identity;\n\t\t}\n\t\tif (originalNamespace.startsWith(rewrittenNamespace) ||\n\t\t\t\trewrittenNamespace.startsWith(originalNamespace)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Cannot rewrite overlapping namespaces, \" + \n\t\t\t\t\t\"this would be ambiguous: \" + originalNamespace + \n\t\t\t\t\t\" => \" + rewrittenNamespace);\n\t\t}\n\t\treturn new IRIRewriter() {\n\t\t\t@Override\n\t\t\tpublic String rewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\treturn rewrittenNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\toriginalNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't rewrite already rewritten IRI: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic String unrewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\treturn originalNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\trewrittenNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't unrewrite IRI that already is in the original namespace: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t};\n\t}", "String getNamespace();", "String getNamespace();", "String getNamespace();", "void setNamespace(String namespace);", "public static NamespaceRegistrationTransactionFactory createRootNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final BigInteger duration) {\n NamespaceId namespaceId = NamespaceId.createFromName(namespaceName);\n return create(networkType, namespaceName,\n namespaceId, NamespaceRegistrationType.ROOT_NAMESPACE, Optional.of(duration), Optional.empty());\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public Namespace(String alias) {\n this(DSL.name(alias), NAMESPACE);\n }", "public Namespace(Name alias) {\n this(alias, NAMESPACE);\n }", "java.lang.String getNamespace();", "private NamespaceHelper() {}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "public XMLNamespaces() {\n this(libsbmlJNI.new_XMLNamespaces__SWIG_0(), true);\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function Attr createAttributeNS(String namespaceURI, String qualifiedName);", "public String getNamespace();", "protected MapNamespaceContext createNamespaceContext() {\r\n // create the xpath with fedora namespaces built in\r\n MapNamespaceContext nsc = new MapNamespaceContext();\r\n nsc.setNamespace(\"fedora-types\", \"http://www.fedora.info/definitions/1/0/types/\");\r\n nsc.setNamespace(\"sparql\", \"http://www.w3.org/2001/sw/DataAccess/rf1/result\");\r\n nsc.setNamespace(\"foxml\", \"info:fedora/fedora-system:def/foxml#\");\r\n nsc.setNamespace(\"rdf\", \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\r\n nsc.setNamespace(\"fedora\", \"info:fedora/fedora-system:def/relations-external#\");\r\n nsc.setNamespace(\"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\");\r\n nsc.setNamespace(\"fedora-model\", \"info:fedora/fedora-system:def/model#\");\r\n nsc.setNamespace(\"oai\", \"http://www.openarchives.org/OAI/2.0/\");\r\n nsc.setNamespace(\"oai_dc\", \"http://www.openarchives.org/OAI/2.0/oai_dc/\", \"http://www.openarchives.org/OAI/2.0/oai_dc.xsd\");\r\n nsc.setNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\"); \r\n nsc.setNamespace(\"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\r\n nsc.setNamespace(\"fedora-management\", \"http://www.fedora.info/definitions/1/0/management/\", \"http://www.fedora.info/definitions/1/0/datastreamHistory.xsd\");\r\n return nsc;\r\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static NamespaceRegistrationTransactionFactory createSubNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId parentId) {\n NamespaceId namespaceId = NamespaceId\n .createFromNameAndParentId(namespaceName, parentId.getId());\n return create(networkType, namespaceName, namespaceId,\n NamespaceRegistrationType.SUB_NAMESPACE, Optional.empty(),\n Optional.of(parentId));\n }", "public NsNamespaces(Name alias) {\n this(alias, NS_NAMESPACES);\n }", "private void internalAddNamespace(NamespaceDefinition def) {\n String uri = def.getUri();\n String prefix = def.getPrefix();\n def.setIndex(m_container.getBindingRoot().\n getNamespaceUriIndex(uri, prefix));\n m_namespaces.add(def);\n m_uriMap.put(uri, def);\n }", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public NsNamespaces(String alias) {\n this(DSL.name(alias), NS_NAMESPACES);\n }", "public static Namespace getDefault() {\n if (instance == null) {\n new R_OSGiWSNamespace();\n }\n return instance;\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public static QualifiedName create(final String uri) {\n\t\tif (cache.containsKey(uri)) {\n\t\t\treturn cache.get(uri);\n\t\t} else {\n\t\t\tfinal QualifiedName qn = new QualifiedName(uri);\n\t\t\tcache.put(uri, qn);\n\t\t\treturn qn;\n\t\t}\n\t}", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "Rule PhpNamespace() {\n return Sequence(\n \"php_namespace\",\n Literal(),\n actions.pushPhpNamespaceNode());\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "Rule NamespaceScope() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n \"* \",\n \"cpp \",\n \"java \",\n \"py \",\n \"perl \",\n \"php \",\n \"rb \",\n \"cocoa \",\n \"csharp \"),\n actions.pushLiteralNode());\n }", "public Resource createFromNsAndLocalName(String nameSpace, String localName)\n\t{\n\t\treturn new ResourceImpl(model.getNsPrefixMap().get(nameSpace), localName);\n\t}", "public S create() {\n\t\tS style = createDefault();\n\t\tint id = nextID();\n\t\tstyle.setId(id);\n\t\taddStyle(style);\n\t\treturn style;\n\t}", "protected abstract void defineNamespace(int index, String prefix)\n throws IOException;", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "String getTargetNamespace();", "private void addNamespace(ClassTree tree, GenerationContext<JS> context, List<JS> stmts) {\r\n\t\tElement type = TreeUtils.elementFromDeclaration(tree);\r\n\t\tif (JavaNodes.isInnerType(type)) {\r\n\t\t\t// this is an inner (anonymous or not) class - no namespace declaration is generated\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString namespace = context.getCurrentWrapper().getNamespace();\r\n\t\tif (!namespace.isEmpty()) {\r\n\t\t\tJavaScriptBuilder<JS> js = context.js();\r\n\t\t\tJS target = js.property(js.name(GeneratorConstants.STJS), \"ns\");\r\n\t\t\tstmts.add(js.expressionStatement(js.functionCall(target, Collections.singleton(js.string(namespace)))));\r\n\t\t}\r\n\t}", "Package createPackage();", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "void declarePrefix(String prefix, String namespace);", "public String getNamespace() {\n return namespace;\n }", "public NamespaceContext getNamespaceContext() {\n LOGGER.entering(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\");\n NamespaceContext result = new JsonNamespaceContext();\n LOGGER.exiting(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\", result);\n return result;\n }", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "Namespace getGpmlNamespace();", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public final void rule__AstNamespace__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3851:1: ( ( 'namespace' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3853:1: 'namespace'\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n match(input,53,FOLLOW_53_in_rule__AstNamespace__Group__1__Impl8326); \n after(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static LabelToNode createScopeByGraph() {\n return new LabelToNode(new GraphScopePolicy(), nodeAllocatorByGraph());\n }", "public TriGWriter getTriGWriter() {\n\t\tTriGWriter writer = new TriGWriter();\n\t\tMap map = this.getNsPrefixMap();\n\t\tfor (Object key : map.keySet()) {\n\t\t\twriter.addNamespace((String) key, (String) map.get(key));\n\t\t}\n\t\treturn writer;\n\t}", "Scope createScope();", "public final void rule__AstNamespace__NamespacesAssignment_4_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22720:1: ( ( ruleAstNamespace ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22722:1: ruleAstNamespace\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n pushFollow(FOLLOW_ruleAstNamespace_in_rule__AstNamespace__NamespacesAssignment_4_645513);\n ruleAstNamespace();\n\n state._fsp--;\n\n after(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "int getNamespaceUri();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespacePrefix(Object ns);", "public abstract INameSpace getNameSpace();", "public YANG_NameSpace getNameSpace() {\n\t\treturn namespace;\n\t}", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static Namespace valueOf( String namespaceName ) {\n return ( Namespace ) allowedValues.get( namespaceName.toLowerCase() );\n }", "public Element insertNamespaces(final Element element) throws Exception {\r\n\r\n element.setAttribute(\"xmlns:prefix-container\", Constants.NS_IR_CONTAINER);\r\n //element.setAttribute(\"xmlns:prefix-content-type\", CONTENT_TYPE_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-context\", Constants.NS_IR_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-dc\", Constants.NS_EXTERNAL_DC);\r\n element.setAttribute(\"xmlns:prefix-dcterms\", Constants.NS_EXTERNAL_DC_TERMS);\r\n element.setAttribute(\"xmlns:prefix-grants\", Constants.NS_AA_GRANTS);\r\n //element.setAttribute(\"xmlns:prefix-internal-metadata\", INTERNAL_METADATA_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-item\", Constants.NS_IR_ITEM);\r\n //element.setAttribute(\"xmlns:prefix-member-list\", MEMBER_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-member-ref-list\", MEMBER_REF_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadata\", METADATA_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadatarecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:escidocMetadataRecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:escidocComponents\", Constants.NS_IR_COMPONENTS);\r\n element.setAttribute(\"xmlns:prefix-organizational-unit\", Constants.NS_OUM_OU);\r\n //element.setAttribute(\"xmlns:prefix-properties\", PROPERTIES_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-schema\", SCHEMA_NS_URI); TODO: huh???\r\n element.setAttribute(\"xmlns:prefix-staging-file\", Constants.NS_ST_FILE);\r\n element.setAttribute(\"xmlns:prefix-user-account\", Constants.NS_AA_USER_ACCOUNT);\r\n element.setAttribute(\"xmlns:prefix-xacml-context\", Constants.NS_EXTERNAL_XACML_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-xacml-policy\", Constants.NS_EXTERNAL_XACML_POLICY);\r\n element.setAttribute(\"xmlns:prefix-xlink\", Constants.NS_EXTERNAL_XLINK);\r\n element.setAttribute(\"xmlns:prefix-xsi\", Constants.NS_EXTERNAL_XSI);\r\n return element;\r\n }", "String getNameSpace();", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "protected static void addOrUpdateNamespace(MasterProcedureEnv env, NamespaceDescriptor ns)\n throws IOException {\n getTableNamespaceManager(env).addOrUpdateNamespace(ns);\n }", "public static NamespaceRegistrationTransactionFactory create(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId namespaceId,\n final NamespaceRegistrationType namespaceRegistrationType,\n final Optional<BigInteger> duration,\n final Optional<NamespaceId> parentId) {\n return new NamespaceRegistrationTransactionFactory(networkType, namespaceName, namespaceId,\n namespaceRegistrationType, duration, parentId);\n }", "Definition createDefinition();", "String getReferenceNamespace();", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@Fluent\npublic interface NamespaceAuthorizationRule extends\n AuthorizationRule<NamespaceAuthorizationRule>,\n Updatable<NamespaceAuthorizationRule.Update> {\n /**\n * @return the name of the parent namespace name\n */\n String namespaceName();\n\n /**\n * Grouping of Service Bus namespace authorization rule definition stages.\n */\n interface DefinitionStages {\n /**\n * The first stage of namespace authorization rule definition.\n */\n interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage<WithCreate> {\n }\n\n /**\n * The stage of the definition which contains all the minimum required inputs for\n * the resource to be created (via {@link WithCreate#create()}), but also allows\n * for any other optional settings to be specified.\n */\n interface WithCreate extends Creatable<NamespaceAuthorizationRule> {\n }\n }\n\n /**\n * The entirety of the namespace authorization rule definition.\n */\n interface Definition extends\n NamespaceAuthorizationRule.DefinitionStages.Blank,\n NamespaceAuthorizationRule.DefinitionStages.WithCreate {\n }\n\n /**\n * The entirety of the namespace authorization rule update.\n */\n interface Update extends\n Appliable<NamespaceAuthorizationRule>,\n AuthorizationRule.UpdateStages.WithListenOrSendOrManage<Update> {\n }\n}", "public String getNamespace() {\n return this.namespace;\n }", "public String getNameSpace() {\n return this.namespace;\n }", "public final void mT__51() throws RecognitionException {\n try {\n int _type = T__51;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:49:7: ( 'namespace' )\n // InternalSpeADL.g:49:9: 'namespace'\n {\n match(\"namespace\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static String copyNamespace(String absoluteName, String nonabsoluteName) {\r\n\t\tString namespace;\t\t\t\t//The namespace of the absolute name\r\n\t\t\r\n\t\tnamespace = absoluteName.replaceFirst(\"#.*\",\"\");\r\n\t\treturn namespace + \"#\" + nonabsoluteName;\r\n\t}", "public void addImpliedNamespace(NamespaceDefinition def) {\n if (!checkDuplicateNamespace(def)) {\n internalAddNamespace(def);\n }\n }", "private String getNamespace(int endIndex) {\n return data.substring(tokenStart, endIndex);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "public String generate(String namespace) {\n return generate(namespace, Http.Context.current().lang());\n }", "public void addNamespace(NamespaceDefinition def) {\n \n // override prior defaults with this namespace definition\n if (def.isAttributeDefault()) {\n m_attributeDefault = def;\n }\n if (def.isElementDefault()) {\n m_elementDefault = def;\n }\n if (checkDuplicateNamespace(def)) {\n \n // replace current definition for URI if this one sets defaults\n if (def.isAttributeDefault() || def.isElementDefault()) {\n NamespaceDefinition prior =\n (NamespaceDefinition)m_uriMap.put(def.getUri(), def);\n def.setIndex(prior.getIndex());\n if (m_overrideMap == null) {\n m_overrideMap = new HashMap();\n }\n m_overrideMap.put(def, prior);\n }\n \n } else {\n \n // no conflicts, add it\n internalAddNamespace(def);\n \n }\n }", "public String getNamespaceName() {\n return namespaceName;\n }", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "STYLE createSTYLE();", "private static java.lang.String generatePrefix(java.lang.String namespace) {\r\n if(namespace.equals(\"http://www.huawei.com.cn/schema/common/v2_1\")){\r\n return \"ns1\";\r\n }\r\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }" ]
[ "0.7193204", "0.70756084", "0.6679203", "0.64466196", "0.62799984", "0.6225282", "0.609216", "0.6031081", "0.60155785", "0.5985649", "0.5965543", "0.59310496", "0.5920755", "0.58899885", "0.58899885", "0.58899885", "0.587757", "0.58642954", "0.5818866", "0.57947177", "0.5753951", "0.5739687", "0.57241327", "0.56759906", "0.564118", "0.56011164", "0.55961347", "0.5498052", "0.5482498", "0.5480035", "0.54636407", "0.54569805", "0.54306155", "0.5387308", "0.5384732", "0.5368188", "0.5364818", "0.5356382", "0.5328098", "0.5310261", "0.5300536", "0.5297614", "0.52730304", "0.5261739", "0.5259119", "0.524975", "0.5249159", "0.524418", "0.5228972", "0.5221297", "0.5202515", "0.52020466", "0.5201973", "0.5197897", "0.516971", "0.50743747", "0.5052942", "0.50529087", "0.5046999", "0.50385964", "0.50385964", "0.50385964", "0.5026728", "0.50205743", "0.49661314", "0.49637443", "0.49608788", "0.49572524", "0.49475047", "0.49467397", "0.49467397", "0.49345535", "0.48996326", "0.4889173", "0.48734498", "0.48259333", "0.48159927", "0.47959077", "0.47951272", "0.4769707", "0.476528", "0.476208", "0.4750937", "0.4744949", "0.474333", "0.47337922", "0.47288465", "0.4727744", "0.47238734", "0.47156954", "0.47154963", "0.4712829", "0.47098252", "0.46947935", "0.4694368", "0.4677295", "0.46614414", "0.4659828", "0.46477342", "0.46441463" ]
0.7329979
0
Deletes a namespace. This also deletes all services and endpoints in the namespace.
public com.google.protobuf.Empty deleteNamespace( com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteNamespaceMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteNamespace(com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()), request);\n }", "public void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void deleteNamespace(String nsName) throws NamespacePropertiesDeleteException {\n long nsContext;\n\n nsContext = NamespaceUtil.nameToContext(nsName);\n // sufficient for ZKImpl as clientside actions for now\n deleteNamespaceProperties(nsContext);\n }", "default void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteNamespaceMethod(), responseObserver);\n }", "void unsetNamespace();", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace);", "@Beta(Beta.SinceVersion.V1_7_0)\n void deleteByName(String resourceGroupName, String namespaceName, String name);", "public void clearContext(String namespace) {\n if (context != null) {\n context.remove(namespace);\n }\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id) {\n respond(request, responder, namespace, ns -> {\n NamespacedId namespacedId = new NamespacedId(ns, id);\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n if (registry.hasSchema(namespacedId)) {\n throw new NotFoundException(\"Id \" + id + \" not found.\");\n }\n registry.delete(namespacedId);\n });\n return new ServiceResponse<Void>(\"Successfully deleted schema \" + id);\n });\n }", "public void delete(String namespace, String key) {\n \t\tthis.init();\n \t\tthis._del(this.getKey(namespace, key));\n \t}", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedSubscription queryParameters);", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "@Test\n\tpublic void testDelete() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\t\n\t}", "protected void tearDown() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {\n cm.removeNamespace((String) iter.next());\n }\n }", "abstract protected void deleteNamespaceProperties(long nsContext) throws NamespacePropertiesDeleteException;", "public void deleteAllVersions(String namespace, String id) throws StageException;", "protected void tearDown() throws Exception {\n ConfigManager manager = ConfigManager.getInstance();\n for (Iterator iter = manager.getAllNamespaces(); iter.hasNext();) {\n manager.removeNamespace((String) iter.next());\n }\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedConfiguration queryParameters);", "static void cleanConfiguration() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n List namespaces = new ArrayList();\n\n // iterate through all the namespaces and delete them.\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n namespaces.add(it.next());\n }\n\n for (Iterator it = namespaces.iterator(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "public void delete(String namespace, String id, long version) throws StageException;", "protected void tearDown() throws Exception {\n super.tearDown();\n\n ConfigManager cm = ConfigManager.getInstance();\n Iterator allNamespaces = cm.getAllNamespaces();\n while (allNamespaces.hasNext()) {\n cm.removeNamespace((String) allNamespaces.next());\n }\n }", "static void clearConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n Iterator it = cm.getAllNamespaces();\n List nameSpaces = new ArrayList();\n\n while (it.hasNext()) {\n nameSpaces.add(it.next());\n }\n\n for (int i = 0; i < nameSpaces.size(); i++) {\n cm.removeNamespace((String) nameSpaces.get(i));\n }\n }", "protected abstract void undefineNamespace(int index);", "public void deleteTable(String resourceGroupName, String accountName, String tableName) {\n deleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().last().body();\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedComponent queryParameters);", "public static void unloadConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "private void closeNamespaces() {\n \n // revert prefixes for namespaces included in last declaration\n DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop();\n int[] deltas = info.m_deltas;\n String[] priors = info.m_priors;\n for (int i = deltas.length - 1; i >= 0; i--) {\n int index = deltas[i];\n undefineNamespace(index);\n if (index < m_prefixes.length) {\n m_prefixes[index] = priors[i];\n } else if (m_extensionUris != null) {\n index -= m_prefixes.length;\n for (int j = 0; j < m_extensionUris.length; j++) {\n int length = m_extensionUris[j].length;\n if (index < length) {\n m_extensionPrefixes[j][index] = priors[i];\n } else {\n index -= length;\n }\n }\n }\n }\n \n // set up for clearing next nested set\n if (m_namespaceStack.empty()) {\n m_namespaceDepth = -1;\n } else {\n m_namespaceDepth =\n ((DeclarationInfo)m_namespaceStack.peek()).m_depth;\n }\n }", "Namespaces namespaces();", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "void removeServices() throws IOException, SoapException;", "void setNamespace(java.lang.String namespace);", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Beta(Beta.SinceVersion.V1_7_0)\n Completable deleteByNameAsync(String resourceGroupName, String namespaceName, String name);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "public void beginDeleteTable(String resourceGroupName, String accountName, String tableName) {\n beginDeleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().single().body();\n }", "public void deleteBucket() {\n\n logger.debug(\"\\n\\nDelete bucket\\n\");\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n blobStore.deleteContainer( bucketName );\n }", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}/versions/{version}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id, @PathParam(\"version\") long version) {\n respond(request, responder, namespace, ns -> {\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n registry.remove(new NamespacedId(ns, id), version);\n });\n return new ServiceResponse<Void>(\"Successfully deleted version '\" + version + \"' of schema \" + id);\n });\n }", "java.lang.String getNamespace();", "void deleteTable(String tableName) {\n\t\tthis.dynamoClient.deleteTable(new DeleteTableRequest().withTableName(tableName));\n\t}", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public void deleteTable(final String tableName) throws IOException {\n deleteTable(Bytes.toBytes(tableName));\n }", "public String getNamespace();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public com.amazon.s3.DeleteBucketResponse deleteBucket(com.amazon.s3.DeleteBucket deleteBucket);", "private static void deleteBucketsWithPrefix() {\n\n logger.debug(\"\\n\\nDelete buckets with prefix {}\\n\", bucketPrefix );\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n final PageSet<? extends StorageMetadata> blobStoreList = blobStore.list();\n\n for ( Object o : blobStoreList.toArray() ) {\n StorageMetadata s = (StorageMetadata)o;\n\n if ( s.getName().startsWith( bucketPrefix )) {\n try {\n blobStore.deleteContainer(s.getName());\n } catch ( ContainerNotFoundException cnfe ) {\n logger.warn(\"Attempted to delete bucket {} but it is already deleted\", cnfe );\n }\n logger.debug(\"Deleted bucket {}\", s.getName());\n }\n }\n }", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "public String getNamespace() {\n return namespace;\n }", "public void deleteCatalog(Catalog catalog) throws BackendException;", "static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "public void deletePersistentVolumeClaim(String pvcName, String namespace) throws ApiException {\n try {\n V1Status result = coreApi.deleteNamespacedPersistentVolumeClaim(\n pvcName, namespace, \"true\",\n null, null, null,\n null, null\n );\n } catch (ApiException e) {\n LOG.error(\"Exception when deleting persistent volume claim \" + e.getMessage(), e);\n throw e;\n } catch (JsonSyntaxException e) {\n if (e.getCause() instanceof IllegalStateException) {\n IllegalStateException ise = (IllegalStateException) e.getCause();\n if (ise.getMessage() != null && ise.getMessage().contains(\"Expected a string but was BEGIN_OBJECT\"))\n LOG.debug(\"Catching exception because of issue \" +\n \"https://github.com/kubernetes-client/java/issues/86\", e);\n else throw e;\n }\n else throw e;\n }\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@Override\n\tpublic int snsDelete(SnsVO vo) {\n\t\treturn map.snsDelete(vo);\n\t}", "public String getNamespace()\n {\n return NAMESPACE;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "void deleteFunctionLibrary(String functionLibraryName, String tenantDomain)\n throws FunctionLibraryManagementException;", "void setNamespace(String namespace);", "public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "@Nullable public String getNamespace() {\n return namespace;\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/dnses\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionDNS();", "public void removeContext(String namespace, String key) {\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap != null) {\n namespaceMap.remove(key);\n }\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "void deleteAllPaymentTerms() throws CommonManagementException;", "public void deleteSNS(String foreignID, final IRequestListener iRequestListener) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_DELETE_SNS.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken)\r\n .replace(\"{SNS_ID}\", foreignID);\r\n AsyncHttpDelete deleteSNS = new AsyncHttpDelete(mContext, new AsyncHttpResponseProcess(mContext, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response deleteSNS :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }, null, true);\r\n AIOLog.d(url);\r\n deleteSNS.execute(url);\r\n }", "public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String profileName, String customDomainName, Context context);", "public void deleteTable(String tableName) {\n try {\n connectToDB(\"jdbc:mysql://localhost/EmployeesProject\");\n } catch (Exception e) {\n System.out.println(\"The EmployeesProject db does not exist!\\n\"\n + e.getMessage());\n }\n String sqlQuery = \"drop table \" + tableName;\n try {\n stmt.executeUpdate(sqlQuery);\n } catch (SQLException ex) {\n System.err.println(\"Failed to delete '\" + tableName + \n \"' table.\\n\" + ex.getMessage());\n }\n }", "int getNamespaceUri();", "@DeleteMapping(\"/ap-constants/{id}\")\n @Timed\n public ResponseEntity<Void> deleteApConstants(@PathVariable Long id) {\n log.debug(\"REST request to delete ApConstants : {}\", id);\n apConstantsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "IndexDeleted deleteIndex(String names) throws ElasticException;", "@DELETE\n\t@Produces(\"application/json\")\n\tpublic Response deleteGraphNodes() {\n\t\tcurrentGraph.getNodes().clear();\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(DB.grafos)\n\t\t\t\t\t.build();\n\t}", "public String getNamespaceName() {\n return namespaceName;\n }", "public void deleteNetWS() {\r\n/* 142 */ this._has_netWS = false;\r\n/* */ }", "void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context);", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String systemTopicName, Context context);", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "void stopServices() throws IOException, SoapException;", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public static void deleteCacheFile(Context context, String cacheFileName) {\n context.deleteFile(cacheFileName);\n }", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}" ]
[ "0.68513477", "0.67180836", "0.6577453", "0.61689264", "0.58192265", "0.5816018", "0.55479234", "0.5509337", "0.5462654", "0.54282033", "0.5407257", "0.53038645", "0.5228044", "0.5187067", "0.51777446", "0.51310426", "0.5120906", "0.5080304", "0.5070093", "0.50403285", "0.5033211", "0.49937022", "0.49450347", "0.48303652", "0.48233366", "0.4801974", "0.4795106", "0.4776913", "0.47601813", "0.47449395", "0.47330323", "0.46569744", "0.46356955", "0.45735928", "0.4568542", "0.45629162", "0.45526502", "0.4548671", "0.45459455", "0.45381412", "0.4534218", "0.45250878", "0.45127305", "0.4505786", "0.44944873", "0.44890106", "0.44890106", "0.44890106", "0.44864795", "0.44654724", "0.44635198", "0.44635198", "0.44446012", "0.4428963", "0.44097754", "0.44088638", "0.44041163", "0.43934983", "0.43736693", "0.43564138", "0.43547916", "0.43541545", "0.43541545", "0.43541545", "0.4351101", "0.43510786", "0.4327035", "0.43147537", "0.43052027", "0.43036422", "0.42712525", "0.42530593", "0.4248455", "0.4221365", "0.42091888", "0.41964662", "0.41887715", "0.41872904", "0.41864827", "0.41850966", "0.41846964", "0.41796598", "0.41783556", "0.4175018", "0.41636124", "0.41588998", "0.41469437", "0.4131984", "0.41277382", "0.4125921", "0.41259181", "0.41234383", "0.41224366", "0.41130447", "0.40964094", "0.4092621", "0.40818933", "0.4077247", "0.40761396", "0.40674758" ]
0.69191414
0
Creates a service, and returns the new service.
public com.google.cloud.servicedirectory.v1beta1.Service createService( com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateServiceMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }", "Service newService();", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }", "static Service create(String hostIp, String user, String password) {\n return new ServiceImpl(hostIp, user, password);\n }", "public CreateServiceRequest withServiceName(String serviceName) {\n setServiceName(serviceName);\n return this;\n }", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public static WPVService createInstance() {\n if ( CONFIG != null )\n return new WPVService( CONFIG );\n return null;\n }", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "IServiceContext createService(Class<?>... serviceModules);", "SourceBuilder createService();", "Fog_Services createFog_Services();", "Service_Resource createService_Resource();", "public abstract ServiceLocator create(String name);", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "void addService(ServiceInfo serviceInfo);", "public Collection<Service> createServices();", "IServiceContext createService(String childContextName, Class<?>... serviceModules);", "public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }", "public abstract T addService(ServerServiceDefinition service);", "public <T extends Service> T getService(Class<T> clazz) throws ServiceException{\n\t\ttry {\n\t\t\treturn clazz.getDeclaredConstructor().newInstance();\n\t\t} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }", "public Tracing create(String serviceName) {\n return Tracing.newBuilder()\n .localServiceName(serviceName)\n .currentTraceContext(RequestContextCurrentTraceContext.ofDefault())\n .spanReporter(spanReporter())\n .build();\n }", "public static <S> S createService(Class<S> serviceClass, String baseUrl) {\n return createService(serviceClass, baseUrl, null);\n }", "@Transactional\n public abstract OnmsServiceType createServiceTypeIfNecessary(String serviceName);", "Object getService(String serviceName);", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public static <T> T buildService(Class<T> type) {\n\n\n return retrofit.create(type);\n }", "public static <S> S createService(Class<S> serviceClass, String url) {\n Retrofit.Builder retrofit = new Retrofit.Builder()\n .baseUrl(url)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create());\n\n //set the necessary querys in the request\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n httpClient.addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n HttpUrl originalHttpUrl = original.url();\n String mTimeStamp = Md5HashGenerator.getTimeStamp();\n HttpUrl url = originalHttpUrl.newBuilder()\n .addQueryParameter(\"ts\", mTimeStamp)\n .addQueryParameter(\"apikey\", Constants.PUBLIC_KEY)\n .addQueryParameter(\"hash\", Md5HashGenerator.generateMd5(mTimeStamp))\n .build();\n\n // Request customization: add request headers\n Request.Builder requestBuilder = original.newBuilder()\n .url(url);\n\n Request request = requestBuilder.build();\n return chain.proceed(request);\n }\n });\n retrofit.client(httpClient.build());\n return retrofit.build().create(serviceClass);\n }", "public static Service getInstance()\n\t{\n\t\tif (serviceInstance == null)\n\t\t{\n\t\t\tserviceInstance = new Service(LocalDao.getInstance());\n\t\t}\n\t\treturn serviceInstance;\n\t}", "public Object getService(String serviceName);", "public interface Provider {\n Service newService();\n }", "public static synchronized ServiceDomain createDomain(final String name) {\n if (!isInitialized()) {\n init();\n }\n\n if (domains.containsKey(name)) {\n throw new RuntimeException(\"Domain already exists: \" + name);\n }\n\n ServiceDomain domain = new DomainImpl(\n name, registry, endpointProvider, transformers);\n domains.put(name, domain);\n return domain;\n }", "@Override\n public CreateServiceProfileResult createServiceProfile(CreateServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeCreateServiceProfile(request);\n }", "public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}", "CdapService createCdapService();", "private ServiceFactory() {}", "ServiceDataResource createServiceDataResource();", "protected OpUserServiceImpl createServiceImpl() {\r\n return new OpUserServiceImpl();\r\n }", "ProgramActuatorService createProgramActuatorService();", "public static EpitrelloDataServerice creator() {\n\t\tif(dataServerice == null) {\n\t\t\tdataServerice = new DataService();\n\t\t}\n\t\treturn dataServerice;\n\t}", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "public Service getService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service res){\n\t\tService service = new Service();\n\t\t\n\t\tservice.setServiceCode( res.getServiceCode() );\n\t\tservice.setServiceName( res.getServiceName() );\n\t\tservice.setGateway( res.getGateway() );\n\t\tservice.setCurrency( res.getCurrency() );\n\t\tservice.setDestination( res.getDestination() );\n\t\tservice.setUnitOfMeasure( res.getUnitOfMeasure() );\n\t\tservice.setGroupCode( res.getGroupCode() );\n\t\tservice.setGroupDescription( res.getGroupDescription() );\n\t\tservice.setFlightMaterialCode( res.getFlightMaterialCode() );\n\t\tservice.setHotelMaterialCode( res.getHotelMaterialCode() );\n\t\tservice.setParentItemRph( res.getParentItemRph() );\n\t\tservice.setGuestAllocation( res.getGuestAllocation() );\n\t\tservice.setPosnr( res.getPosnr() );\n\t\tservice.setOldPosnr( res.getOldPosnr() );\n\t\tif( res.isMandatory() != null ){\n\t\t\tservice.setMandatory( res.isMandatory().booleanValue() );\n\t\t}\n\t\tif( res.isFree() != null ){\n\t\t\tservice.setFree( res.isFree().booleanValue() );\n\t\t}\n\t\tif( res.isOccupancyBased() != null ){\n\t\t\tservice.setOccupancyBased( res.isOccupancyBased().booleanValue() );\n\t\t}\n\t\tif( res.isDateSpecific() != null ){\n\t\t\tservice.setDateSpecific( res.isDateSpecific().booleanValue() );\n\t\t}\n\t\tif( res.isAllOrNothing() != null ){\n\t\t\tservice.setAllOrNothing( res.isAllOrNothing().booleanValue() );\n\t\t}\n\t\tif( res.isWeightBased() != null ){\n\t\t\tservice.setWeightBased( res.isWeightBased().booleanValue() );\n\t\t}\n\t\tif( res.isTierBased() != null ){\n\t\t\tservice.setTierBased( res.isTierBased().booleanValue() );\n\t\t}\n\t\tif( res.isMonday() != null ){\n\t\t\tservice.setMonday( res.isMonday().booleanValue() );\n\t\t}\n\t\tif( res.isTuesday() != null ){\n\t\t\tservice.setTuesday( res.isTuesday().booleanValue() );\n\t\t}\n\t\tif( res.isWednesday() != null ){\n\t\t\tservice.setWednesday( res.isWednesday().booleanValue() );\n\t\t}\n\t\tif( res.isThursday() != null ){\n\t\t\tservice.setThursday( res.isThursday().booleanValue() );\n\t\t}\n\t\tif( res.isFriday() != null ){\n\t\t\tservice.setFriday( res.isFriday().booleanValue() );\n\t\t}\n\t\tif( res.isSaturday() != null ){\n\t\t\tservice.setSaturday( res.isSaturday().booleanValue() );\n\t\t}\n\t\tif( res.isSunday() ){\n\t\t\tservice.setSunday( res.isSunday().booleanValue() );\n\t\t}\n\t\tif( res.getSelectedDate() != null ){\n\t\t\tservice.setSelectedDate( this.getDate( res.getSelectedDate() ) );\n\t\t}\n\t\tif( res.getDepatureDate() != null ){\n\t\t\tservice.setDepatureDate( this.getDate( res.getDepatureDate() ) );\n\t\t}\n\t\tif( res.getReturnDate() != null ){\n\t\t\tservice.setReturnDate( this.getDate( res.getReturnDate() ) );\n\t\t}\n\t\tif( res.getAdultQty() != null ){\n\t\t\tservice.setAdultQty( res.getAdultQty().byteValue() );\n\t\t}\n\t\tif( res.getChild1Qty() != null ){\n\t\t\tservice.setChild1Qty( res.getChild1Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild2Qty() != null ){\n\t\t\tservice.setChild2Qty( res.getChild2Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild3Qty() != null ){\n\t\t\tservice.setChild3Qty( res.getChild3Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild1MinAge() != null ){\n\t\t\tservice.setChild1MinAge( res.getChild1MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MinAge() != null ){\n\t\t\tservice.setChild2MinAge( res.getChild2MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MinAge() != null ){\n\t\t\tservice.setChild3MinAge( res.getChild3MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild1MaxAge() != null ){\n\t\t\tservice.setChild1MaxAge( res.getChild1MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MaxAge() != null ){\n\t\t\tservice.setChild2MaxAge( res.getChild2MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MaxAge() != null ){\n\t\t\tservice.setChild3MaxAge( res.getChild3MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getTravelAgentFee() != null ){\n\t\t\tservice.setTravelAgentFee( res.getTravelAgentFee().doubleValue() );\n\t\t}\n\t\tif( res.getTotalPrice() != null ){\n\t\t\tservice.setTotalPrice( res.getTotalPrice().doubleValue() );\n\t\t}\n\t\tif( res.getMaxQuantity() != null ){\n\t\t\tservice.setMaxQuantity( res.getMaxQuantity().doubleValue() );\n\t\t}\n\t\tif( res.getAdultPrice() != null ){\n\t\t\tservice.setAdultPrice( res.getAdultPrice().doubleValue() );\n\t\t}\n\t\tif( res.getChild1Price() != null ){\n\t\t\tservice.setChild1Price( res.getChild1Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild2Price() != null ){\n\t\t\tservice.setChild2Price( res.getChild2Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild3Price() != null ){\n\t\t\tservice.setChild3Price( res.getChild3Price().doubleValue() );\n\t\t}\n\t\tif( (res.getAvailableDates() != null) && (res.getAvailableDates().size() > 0) ){\n\t\t\tservice.setAvailableDates( this.convertXMLGregorianCalendarList( res.getAvailableDates() ) );\n\t\t}\n\t\tservice.setServiceDescription( res.getServiceDescription());\n\t\t\n\t\treturn service;\n\t}", "InboundServicesType createInboundServicesType();", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}", "CdapServiceInstance createCdapServiceInstance();", "void addService(Long orderId, Long serviceId);", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "@Produces @IWSBean\n public ServiceFactory produceServiceFactory() {\n return new ServiceFactory(iwsEntityManager, notifications, settings);\n }", "Object getService(String serviceName, boolean checkExistence);", "public Builder withService(final String service) {\n this.service = service;\n return this;\n }", "@Override\n\tpublic CreateServiceInstanceBindingResponse createServiceInstanceBinding(\n\t\t\tCreateServiceInstanceBindingRequest request) {\n\t\tString appId = request.getBindingId();\n\t\tString id = request.getServiceInstanceId();\n\t\tString apikey = userManager.getAPIKey(id, appId);\n\t\tMap<String, Object> credentials = Collections.singletonMap(\"APIKEY\", (Object) apikey);\n\n\t\treturn new CreateServiceInstanceBindingResponse(credentials);\n\t}", "public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}", "public interface Provider {\n Service newService();\n}", "public interface Provider {\n Service newService();\n}", "public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer create(\n long layerId);", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public static ShoppingCartService createShoppingCartService() {\n\t\treturn null;\r\n\t}", "public interface Provider{\n Service newService();\n}", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "public com.vodafone.global.er.decoupling.binding.request.BasicServiceType createBasicServiceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasicServiceTypeImpl();\n }", "@Override\n\tpublic SpringSupplierExtension createService(ServiceContext context) throws Throwable {\n\t\treturn this;\n\t}", "public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}", "public com.vodafone.global.er.decoupling.binding.request.ServiceStatusType createServiceStatusType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ServiceStatusTypeImpl();\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "@Override\r\n\tpublic sn.ucad.master.assurance.bo.Service consulterService(Integer idService) {\n\t\tService service= (Service) serviceRepository.findOne(idService);\r\n\t\tif(service==null) throw new RuntimeException(\"Service introuvable\");\r\n\t\treturn (sn.ucad.master.assurance.bo.Service) service;\r\n\t}", "public static ServiceFactory init() {\n\t\ttry {\n\t\t\tServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI);\n\t\t\tif (theServiceFactory != null) {\n\t\t\t\treturn theServiceFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ServiceFactoryImpl();\n\t}", "public void registerService(String serviceName, Object service);", "public Service(){\n\t\t\n\t}", "public SSLService createDynamicSSLService() {\n return new SSLService(env, sslConfigurations, sslContexts) {\n\n @Override\n Map<SSLConfiguration, SSLContextHolder> loadSSLConfigurations() {\n // we don't need to load anything...\n return Collections.emptyMap();\n }\n\n /**\n * Returns the existing {@link SSLContextHolder} for the configuration\n * @throws IllegalArgumentException if not found\n */\n @Override\n SSLContextHolder sslContextHolder(SSLConfiguration sslConfiguration) {\n SSLContextHolder holder = sslContexts.get(sslConfiguration);\n if (holder == null) {\n // normally we'd throw here but let's create a new one that is not cached and will not be monitored for changes!\n holder = createSslContext(sslConfiguration);\n }\n return holder;\n }\n };\n }", "public Service(int serviceID, String serviceName, double serviceFee, String serviceDescrp){\r\n\t\tthis.serviceName = serviceName;\r\n\t\tthis.serviceID = serviceID;\r\n\t\tthis.serviceFee = serviceFee;\r\n\t\tthis.serviceDescrp = serviceDescrp;\r\n\t}", "public ChromeService getOrCreate(final String path, final ImmutableMap<String, Object> args) {\n return _cache.computeIfAbsent(new ChromeServiceKey(path, args), this::create);\n }", "private Service() {}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "public void startService(String service)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public void forceServiceInstantiation()\n {\n getService();\n\n _serviceModelObject.instantiateService();\n }", "public com.vodafone.global.er.decoupling.binding.request.GetServiceRequest createGetServiceRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetServiceRequestImpl();\n }", "public CreateTaskSetRequest withService(String service) {\n setService(service);\n return this;\n }", "protected static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) {\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(endPoint)\n .client(new OkHttpClient())\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n T service = retrofit.create(clazz);\n return service;\n }", "private ChromeService create(final ChromeServiceKey key) {\n final ImmutableMap<String, String> env = ImmutableMap.of(\n ChromeLauncher.ENV_CHROME_PATH, key._path\n );\n // ^^^ In order to pass this environment in, we need to use a many-argument constructor,\n // which doesn't have obvious default values. So I stole the arguments from the fewer-argument constructor:\n // CHECKSTYLE.OFF: LineLength\n // https://github.com/kklisura/chrome-devtools-java-client/blob/master/cdt-java-client/src/main/java/com/github/kklisura/cdt/launch/ChromeLauncher.java#L105\n // CHECKSTYLE.ON: LineLength\n final ChromeLauncher launcher = new ChromeLauncher(\n new ProcessLauncherImpl(),\n env::get,\n new ChromeLauncher.RuntimeShutdownHookRegistry(),\n new ChromeLauncherConfiguration()\n );\n return launcher.launch(ChromeArguments.defaults(true)\n .additionalArguments(key._args)\n .build());\n }", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "public DCAEServiceObject(String serviceId, DCAEServiceRequest request) {\n DateTime now = DateTime.now(DateTimeZone.UTC);\n this.setServiceId(serviceId);\n this.setTypeId(request.getTypeId());\n this.setVnfId(request.getVnfId());\n this.setVnfType(request.getVnfType());\n this.setVnfLocation(request.getVnfLocation());\n this.setDeploymentRef(request.getDeploymentRef());\n this.setCreated(now);\n this.setModified(now);\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "IServiceContext createService(String childContextName,\n\t\t\tIBackgroundWorkerParamDelegate<IBeanContextFactory> registerPhaseDelegate,\n\t\t\tClass<?>... serviceModules);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public void startService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public DestinationService getDestinationService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.destinationservice.v1.DestinationService res){\n\t\tDestinationService destinationService = new DestinationService();\n\t\t\n\t\tdestinationService.setServiceCode( res.getServiceCode() );\n\t\tdestinationService.setServiceName( res.getServiceName() );\n\t\tdestinationService.setCurrency( res.getCurrency() );\n\t\tif( res.getPrice() != null ){\n\t\t\tdestinationService.setPrice( res.getPrice().doubleValue() );\n\t\t}\n\t\t\n\t\treturn destinationService;\n\t}", "protected abstract ServiceRegistry getNewServiceRegistry();", "public TestService() {}", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }" ]
[ "0.7673243", "0.7330246", "0.7026831", "0.6918558", "0.6857777", "0.66468114", "0.65873075", "0.65867895", "0.6523027", "0.6390872", "0.63591254", "0.6314166", "0.6281377", "0.6261366", "0.6227418", "0.62184316", "0.61826664", "0.61612153", "0.6112579", "0.6107516", "0.6101168", "0.6008246", "0.6007262", "0.5999226", "0.59658647", "0.595746", "0.59366626", "0.5871322", "0.5830118", "0.5767995", "0.5761437", "0.5729881", "0.572255", "0.5714636", "0.57047397", "0.5703381", "0.5691859", "0.56879044", "0.56756866", "0.56715137", "0.5650661", "0.5637306", "0.5635961", "0.5627831", "0.5627101", "0.5614417", "0.5610254", "0.56028485", "0.5599389", "0.5590262", "0.5577301", "0.5572628", "0.55687326", "0.5563449", "0.5561303", "0.55515766", "0.5547182", "0.5545116", "0.55284613", "0.55263305", "0.5521158", "0.5492559", "0.5482249", "0.54573154", "0.54573154", "0.5443404", "0.54408836", "0.5424288", "0.54182154", "0.541078", "0.5402881", "0.5396444", "0.5365863", "0.53421515", "0.5334897", "0.53294533", "0.53273493", "0.5317595", "0.5311245", "0.530765", "0.53012615", "0.52842826", "0.5279977", "0.52767104", "0.5244774", "0.52444494", "0.52180654", "0.52137935", "0.5211637", "0.5200977", "0.51976717", "0.5197607", "0.5197042", "0.5195032", "0.5193314", "0.51916283", "0.5182347", "0.51662827", "0.5160173", "0.5160173" ]
0.746299
1
Lists all services belonging to a namespace.
public com.google.cloud.servicedirectory.v1beta1.ListServicesResponse listServices( com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListServicesMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }", "List<Service> services();", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "public List<CatalogService> getService(String service);", "public List<ServerServices> listServerServices();", "public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }", "public List<String> getServices() throws IOException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();", "public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }", "public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "Namespaces namespaces();", "public List<ServiceInstance> getAllInstances(String serviceName);", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "AGServiceDescription[] getServices()\n throws IOException, SoapException;", "public ArrayList getNamespaces() {\n return m_namespaces;\n }", "public List<ServiceInstance> getAllInstances();", "public List<Service> findAll();", "public Iterator getServices() {\r\n\t\treturn services == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(services.values());\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()), request);\n }", "public void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public List<Servicio> findAll();", "@Test\n\tvoid testAllNamespacesTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = true;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(NAMESPACE_ALL);\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 2);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertTrue(result.contains(\"service-b\"));\n\t}", "public String getAllRunningServices() {\n return \"\";\n }", "public List<ServiceInstance> lookupInstances(String serviceName);", "ImmutableList<T> getServices();", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();", "public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}", "Collection<Service> getAllSubscribeService();", "default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "Collection<Service> getAllPublishedService();", "public Map<String, List<String>> getServices();", "java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();", "public ServiceType[] getAllServices() throws LoadSupportedServicesException{\r\n\t\tthis.loadServices();\r\n\t\treturn this.services;\r\n\t}", "public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }", "public java.util.List<String> getServiceArns() {\n return serviceArns;\n }", "@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceCat> listServiceCat() {\r\n\t\tList<ServiceCat> courses = null;\r\n\t\ttry {\r\n\t\t\tcourses = session.createQuery(\"from ServiceCat\").list();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn courses;\r\n\t}", "public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);\n }", "public Vector getServiceNames(String serviceType) throws ServiceException {\n return namingService.getServiceNames(serviceType);\n }", "@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }", "public List<Function> getFunctions(String namespace, String name);", "public List<Service> getServicesByCategory(Category cat) {\n ServiceRecords sr = company.getServiceRecords();\n List<Service> serviceList = sr.getServiceByCat(cat);\n return serviceList;\n }", "@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "public Map<String,String> getNamespaces() {\n return namespaces;\n }", "ServicesPackage getServicesPackage();", "@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }", "public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);", "@Test\n public void listServiceAccountNamesTest() throws ApiException {\n String owner = null;\n Integer offset = null;\n Integer limit = null;\n String sort = null;\n String query = null;\n Boolean bookmarks = null;\n String mode = null;\n Boolean noPage = null;\n V1ListServiceAccountsResponse response = api.listServiceAccountNames(owner, offset, limit, sort, query, bookmarks, mode, noPage);\n // TODO: test validations\n }", "public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}", "public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {\n final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();\n Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);\n for (Endpoint ep : deployment.getService().getEndpoints()) {\n endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));\n }\n return endpointServiceNames;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceListOrBuilder getServiceListOrBuilder();", "static Set getServiceNames(SSOToken token) throws SMSException,\n SSOException {\n // Get the service names from ServiceManager\n CachedSubEntries cse = CachedSubEntries.getInstance(token,\n DNMapper.serviceDN);\n return (cse.getSubEntries(token));\n }", "public java.util.Map<String,String> getNamespaces() {\n return (_namespaces);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public Collection<Service> createServices();", "public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }", "public Vector getServiceTypes() throws ServiceException {\n return namingService.getServiceTypes();\n }", "@ManagedAttribute(description = \"Retrieves the list of Registered Services in a slightly friendlier output.\")\n public final List<String> getRegisteredServicesAsStrings() {\n final List<String> services = new ArrayList<>();\n\n for (final RegisteredService r : this.servicesManager.getAllServices()) {\n services.add(new StringBuilder().append(\"id: \").append(r.getId())\n .append(\" name: \").append(r.getName())\n .append(\" serviceId: \").append(r.getServiceId())\n .toString());\n }\n\n return services;\n }", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "public ListSubscriptionForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List listar() {\n Query query = Database.manager.createNamedQuery(\"StatussistemaDTO.findAll\");\n query.setHint(QueryHints.MAINTAIN_CACHE, HintValues.FALSE);// evita consulta em cache\n List lista = query.getResultList();\n return lista;\n }", "private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException {\n \tSubscriptionResource sr = namespaceCache.get( baseNS );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNS, null, null );\n\t\t\t\tnamespaceCache.put( baseNS, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "public ServiceCombo getServices()\n {\n return services;\n }", "public static List<String> getPrinterServiceNameList() {\n\n // get list of all print services\n PrintService[] services = PrinterJob.lookupPrintServices();\n List<String> list = new ArrayList<>();\n\n for (PrintService service : services) {\n list.add(service.getName());\n }\n return list;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces();", "List<ServiceChargeSubscription> getSCPackageList() throws EOTException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces(\n @QueryMap ListComponentForAllNamespaces queryParameters);", "public Object _getLSservices(CommandInterpreter ci) {\n\t\tSet<Registration> regs = identityManager.getLocalServices();\n\t\tci.print(\"Local Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\n\t\tregs = identityManager.getRemoteServices();\n\t\tci.print(\"Remote Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public List<ServiceInstance<InstanceDetails>> listInstances() throws Exception {\n\t\tCollection<String> serviceNames = serviceDiscovery.queryForNames();\n\t\tSystem.out.println(serviceNames.size() + \" type(s)\");\n\t\tList<ServiceInstance<InstanceDetails>> list = new ArrayList<>();\n\t\tfor (String serviceName : serviceNames) {\n\t\t\tCollection<ServiceInstance<InstanceDetails>> instances = serviceDiscovery.queryForInstances(serviceName);\n\t\t\tSystem.out.println(serviceName);\n\t\t\tfor (ServiceInstance<InstanceDetails> instance : instances) {\n\t\t\t\toutputInstance(instance);\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "@GetMapping (\"/servicos\")\n\t\tpublic List<ServicoModel> pegarTodos() {\t\t\n\t\t\treturn repository.findAll();\n\t\t}", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "public ListComponentForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }", "public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET)\n public List<MedicalService> getAllMedServices(){\n return medicalServiceService.getAllMedServices();\n }" ]
[ "0.6493551", "0.64549595", "0.6434717", "0.6354583", "0.6311621", "0.6306959", "0.6250276", "0.62462157", "0.61580026", "0.61180186", "0.60715204", "0.60534793", "0.5988863", "0.59662145", "0.59362334", "0.59362334", "0.5891551", "0.5849733", "0.5812682", "0.57960397", "0.57931805", "0.5748968", "0.57244575", "0.57229745", "0.56951916", "0.56678414", "0.5660266", "0.5636796", "0.56264085", "0.5617853", "0.5617853", "0.560543", "0.560543", "0.5592284", "0.5559006", "0.55512685", "0.5550483", "0.5550318", "0.5550318", "0.54969275", "0.54908913", "0.54878026", "0.5485214", "0.5466597", "0.5455596", "0.5446607", "0.5428825", "0.54189104", "0.5413229", "0.53815675", "0.5380396", "0.53670496", "0.5358721", "0.5344856", "0.53443784", "0.5334874", "0.53319585", "0.53284436", "0.5322806", "0.5320224", "0.5305707", "0.5293936", "0.5272822", "0.5267433", "0.5263776", "0.5250956", "0.5249366", "0.5218573", "0.52118963", "0.52062356", "0.5196397", "0.5196397", "0.5183499", "0.5144488", "0.5143055", "0.51427215", "0.5136453", "0.51269644", "0.5113645", "0.5107374", "0.51061124", "0.51061124", "0.5100996", "0.50900984", "0.5085859", "0.5072191", "0.5065709", "0.50569916", "0.5041247", "0.5033521", "0.50230604", "0.502173", "0.5017677", "0.5015007", "0.50093704", "0.50029826", "0.49962288", "0.4982256", "0.4978955", "0.49752414" ]
0.56147784
31
Deletes a service. This also deletes all endpoints associated with the service.
public com.google.protobuf.Empty deleteService( com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteServiceMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteService(){\r\n \tif(editService != null){\r\n \t\tint id = editService.getId();\r\n \t\ttry {\r\n\t \t\tif(id == 0){\r\n\t \t\t\tthis.getLog().error(\" unable to deleteService(). No id selected\");\r\n\t \t\t}else{\r\n\t \t\t\tthis.getLog().info(\" deleteService(\" + id + \")\");\r\n\t \t\t\tConnectionFactory.createConnection().deleteservice(editService.getId());\r\n\t \t\t}\r\n \t\t\tthis.getServiceList().populateServiceListFromDB();\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "public void deleteService(String serviceName) {\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\").child(serviceName);\n dR.getParent().child(serviceName).removeValue();\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteService(com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request);\n }", "public void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "@GetMapping(\"/delete_service\")\n public String deleteService(@RequestParam(value = \"serviceID\") int serviceID){\n serviceServiceIF.deleteService(serviceServiceIF.getServiceByID(serviceID));\n return \"redirect:/admin/service/setup_service\";\n }", "public void markServiceDelete() throws JNCException {\n markLeafDelete(\"service\");\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;", "void delete(ServiceSegmentModel serviceSegment);", "default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "LinkedService deleteById(String id);", "void removeServices() throws IOException, SoapException;", "@Override\n public DeleteServiceProfileResult deleteServiceProfile(DeleteServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteServiceProfile(request);\n }", "@Override\n\tpublic Integer deleteServices(com.easybooking.model.BookedServices services) {\n\t\tint i = 0;\n\t\tSessionFactory factory = HibernateUtil.getSesssionFactory();\n\t\tSession session = factory.openSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(services);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\tfactory.close();\n\t\treturn i;\n\t}", "public void verifyToDeleteService() throws Throwable{\r\n\t\tServicesPage srvpage=new ServicesPage();\r\n\t\tselServicOpt.click();\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\t\r\n\t\tif(getServiceText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getServiceText().getText()+\" is deleted\",true);\r\n\t\t\tselServiceBtn.click();\r\n\t\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\t\tsrvpage.selectServices();\r\n\t\t\tdeleteService();\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdeleteService();\r\n\t\t}\r\n\t}", "boolean removeService(T service);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "public void serviceRemoved(String serviceID);", "public void clearServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete(); \n }\n \n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceUri, String endpointName, String serviceConfigurationName);", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "@DeleteMapping(\"/costo-servicios/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCostoServicio(@PathVariable Long id) {\n log.debug(\"REST request to delete CostoServicio : {}\", id);\n costoServicioService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteServiceCat(String serviceItemId) {\r\n\t\ttry {\r\n\t\t\tServiceCat serviceItem = (ServiceCat) session.get(ServiceCat.class, serviceItemId);\r\n\t\t\tsession.delete(serviceItem);\r\n\t\t} catch (Exception e) {\r\n\t\t\ttransaction.rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "@Override\n\tpublic void delete(ServiceFee entites) {\n\t\tservicefeerepo.delete(entites);\n\t}", "void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);", "@Override\n\tpublic String removeService(String serviceName) {\n\t\tServiceManager serviceManager = loadBalance.search(serviceName);\n\t\tif (serviceManager == null) {\n\t\t\treturn \"Service Invalid\";\n\t\t}\n\t\tArrayList<String> hostNames = serviceManager.getHostnames();\n\t\twhile (hostNames.size() > 0) {\n\t\t\tthis.removeInstance(serviceName, hostNames.get(0));\n\t\t}\n\n\t\t// remove service from cluster/loadbalancer/Trie structure\n\t\tif (loadBalance.deleteService(serviceName)) {\n\t\t\treturn \"Service Removed\";\n\t\t}\n\t\treturn \"Service Invalid\";\n\t}", "public void onDeleteService(final ForwardEvent event) {\r\n\t\t// Get the listitem from the event's target (button)\r\n\t\t// parent(hbox)->parent(listcell)->parent(listitem)\r\n\t\tfinal Listitem li = (Listitem) event.getOrigin().getTarget().getParent().getParent().getParent();\r\n\t\tfinal MasterService service = (MasterService) li.getValue();\r\n\r\n\t\t// delete the service\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tpaymentDAO.deleteService(service);\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tint indx = getListIndex(service, services);\r\n\t\tservices.remove(indx);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tClients.evalJavaScript(\"$.jGrowl(\\\"Successfully Deleted the service\\\", {life:2000});\");\r\n\t}", "public static <T extends NetworkEntity> void testAddDelete(\n EndpointService service, T entity, TestDataFactory testDataFactory) {\n List<Endpoint> endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints, \"Endpoint list should be empty, not null when no endpoints exist\");\n assertTrue(endpoints.isEmpty(), \"Endpoint should be empty when none added\");\n\n // test additions\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(2, endpoints.size(), \"2 endpoints have been added\");\n assertEquals(\n 1, endpoints.get(0).getMachineTags().size(), \"The endpoint should have 1 machine tag\");\n\n // test deletion, ensuring correct one is deleted\n service.deleteEndpoint(entity.getKey(), endpoints.get(0).getKey());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(1, endpoints.size(), \"1 endpoint should remain after the deletion\");\n Endpoint expected = testDataFactory.newEndpoint();\n Endpoint created = endpoints.get(0);\n assertLenientEquals(\"Created entity does not read as expected\", expected, created);\n }", "boolean removeServiceSubscriber(Service service);", "public void deleteAllCommands(Service service) throws Exception {\n ArrayList<CommandOfService> allCommands = DAO.getPendingCommandsOfOneService(service);\n for(CommandOfService command : allCommands) {\n this.declineTransaction(command);\n }\n\n }", "void delete(\n String resourceGroupName,\n String searchServiceName,\n String sharedPrivateLinkResourceName,\n UUID clientRequestId,\n Context context);", "void deleteSegmentByIdAndType(ServiceSegmentModel serviceSegment);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "void clearService();", "@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}", "private void removeServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n //Remove directory from map \"servicesDirectories\"\n servicesDirectories.remove(serviceID);\n \n }\n \n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "public void unRegisterService(String serviceKey, Node node) {\n\t\tlog.info(\"UnRegistering the service \" + serviceKey);\n\t\ttry {\n\t\t\tString authToken = getAuthToken(node.getSecurityUrl()); \n\t\t\tDeleteService deleteService = new DeleteService();\n\t\t\tdeleteService.setAuthInfo(authToken);\n\t\t\tdeleteService.getServiceKey().add(serviceKey);\n\t\t\tgetUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteService(deleteService);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Unable to register service \" + serviceKey\n\t\t\t\t\t+ \" .\" + e.getMessage(),e);\n\t\t}\n\t}", "@DeleteMapping(value = {\"/deleteOfferedServiceById/{offeredServiceId}\", \"/deleteOfferedServiceById/{offeredServiceId}/\"})\n\tpublic OfferedServiceDto deleteOfferedServiceById(@PathVariable(\"offeredServiceId\") String offeredServiceId) throws InvalidInputException{\n\t\tOfferedService offeredService = new OfferedService();\n\t\ttry {\n\t\t\tofferedService = offeredServiceService.deleteOfferedService(offeredServiceId);\n\t\t}catch (RuntimeException e) {\n\t\t\tthrow new InvalidInputException(e.getMessage());\n\t\t}\n\n\t\treturn convertToDto(offeredService);\n\t}", "void delete(\n String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "public void stopService(String service)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "public void removeServiceConfig(String serviceName) throws SMSException {\n try {\n ServiceConfigManager scm = new ServiceConfigManager(serviceName,\n token);\n scm.deleteOrganizationConfig(orgName);\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager: Unable to \"\n + \"delete Service Config\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n }", "void delete(String id) throws PSDataServiceException, PSNotFoundException;", "public void unsetServiceValue() throws JNCException {\n delete(\"service\");\n }", "public boolean delete() {\n return delete(Datastore.fetchDefaultService());\n }", "public void removeServiceDomain(QName serviceName) {\n _serviceDomains.remove(serviceName);\n }", "public void delete(URI url) throws RestClientException {\n restTemplate.delete(url);\n }", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "net.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;", "@DEL\n @Path(\"/{id}\")\n @Consumes({\"application/json\"})\n @Produces({\"application/json\"})\n public RestRsp<Tp> deleteSite(@PathParam(\"id\") final String id) throws ServiceException {\n if(!UuidUtil.validate(id)) {\n ServiceExceptionUtil.throwBadRequestException();\n }\n return new RestRsp<Tp>(ResultConstants.SUCCESS, service.deleteTp(id));\n }", "public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }", "@RequestMapping(path = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable long id) {\n service.delete(id);\n }", "public void unregisterService(String serviceName){\n jmc.unregisterService(serviceName);\n }", "public void removeServiceClient(final String serviceName) {\n boolean needToSave = ProjectManager.mutex().writeAccess(new Action<Boolean>() {\n public Boolean run() {\n boolean needsSave = false;\n boolean needsSave1 = false;\n\n /** Remove properties from project.properties\n */\n String featureProperty = \"wscompile.client.\" + serviceName + \".features\"; // NOI18N\n String packageProperty = \"wscompile.client.\" + serviceName + \".package\"; // NOI18N\n String proxyProperty = \"wscompile.client.\" + serviceName + \".proxy\"; //NOI18N\n\n EditableProperties ep = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties ep1 = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n if(ep.getProperty(featureProperty) != null) {\n ep.remove(featureProperty);\n needsSave = true;\n }\n\n if(ep.getProperty(packageProperty) != null) {\n ep.remove(packageProperty);\n needsSave = true;\n }\n\n if(ep1.getProperty(proxyProperty) != null) {\n ep1.remove(proxyProperty);\n needsSave1 = true;\n }\n\n if(needsSave) {\n helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n\n if(needsSave1) {\n helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep1);\n }\n\n /** Locate root of web service client node structure in project,xml\n */\n Element data = helper.getPrimaryConfigurationData(true);\n NodeList nodes = data.getElementsByTagName(WEB_SERVICE_CLIENTS);\n Element clientElements = null;\n\n /* If there is a root, get all the names of the child services and search\n * for the one we want to remove.\n */\n if(nodes.getLength() >= 1) {\n clientElements = (Element) nodes.item(0);\n NodeList clientNameList = clientElements.getElementsByTagNameNS(AppClientProjectType.PROJECT_CONFIGURATION_NAMESPACE, WEB_SERVICE_CLIENT_NAME);\n for(int i = 0; i < clientNameList.getLength(); i++ ) {\n Element clientNameElement = (Element) clientNameList.item(i);\n NodeList nl = clientNameElement.getChildNodes();\n if(nl.getLength() == 1) {\n Node n = nl.item(0);\n if(n.getNodeType() == Node.TEXT_NODE) {\n if(serviceName.equalsIgnoreCase(n.getNodeValue())) {\n // Found it! Now remove it.\n Node serviceNode = clientNameElement.getParentNode();\n clientElements.removeChild(serviceNode);\n helper.putPrimaryConfigurationData(data, true);\n needsSave = true;\n }\n }\n }\n }\n }\n return needsSave || needsSave1;\n }\n });\n \n // !PW Lastly, save the project if we actually made any changes to any\n // properties or the build script.\n if(needToSave) {\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch(IOException ex) {\n NotifyDescriptor desc = new NotifyDescriptor.Message(\n NbBundle.getMessage(AppClientProjectWebServicesClientSupport.class,\"MSG_ErrorSavingOnWSClientRemove\", serviceName, ex.getMessage()), // NOI18N\n NotifyDescriptor.ERROR_MESSAGE);\n DialogDisplayer.getDefault().notify(desc);\n }\n }\n removeServiceRef(serviceName);\n }", "public boolean delete(Service servico){\n for (Service servicoLista : Database.servico) {\n if(idSaoIguais(servicoLista,servico)){\n Database.servico.remove(servicoLista);\n return true;\n }\n }\n return false;\n }", "@DELETE\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response deleteServicioDeAlojamiento(ServicioDeAlojamiento servicioDeAlojamiento) {\n\t\ttry{\n\t\t\tAlohAndesTransactionManager tm = new AlohAndesTransactionManager( getPath( ) );\n\t\t\ttm.deleteServicioDeAlojamiento(servicioDeAlojamiento);\n\t\t\treturn Response.status(200).entity(servicioDeAlojamiento).build();\n\t\t}\n\t\tcatch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}", "public void doStopService() throws ServiceException {\r\n // Nothing to do\r\n super.doStopService();\r\n }", "public boolean delete(Object[] obj) {\n\t\tString sql=\"delete from services where ServiceID=?\";\n\t\tDbManager db=new DbManager();\n\n\t\treturn db.execute(sql, obj);\n\t}", "void stopServices() throws IOException, SoapException;", "@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }", "@PostMapping(\"/delete\")\n public ResponseEntity<ServiceResult> deleteTest(@RequestBody Integer id) {\n return new ResponseEntity<ServiceResult>(testService.deleteTest(id), HttpStatus.OK);\n }", "void unsetServiceId();", "public void deleteEntity(final String entityId) throws OAuthServiceException {\n if (entityId != null) {\n final WebResource deleteResource = tokenResource.path(entityId);\n final ClientResponse resp =\n deleteResource.cookie(getCookie()).delete(ClientResponse.class);\n if (resp != null) {\n final int status = resp.getStatus();\n if (status != TOKEN_UPDATED) {\n throw new OAuthServiceException(\n \"failed to delete the token: status code=\" + status);\n }\n }\n }\n }", "@DeleteMapping(\"/operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete Operation : {}\", id);\n operationService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public export.serializers.avro.DeviceInfo.Builder clearService() {\n service = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "public void removeDeviceServiceLink();", "public void stopService();", "@DeleteMapping(\"/usuarios/{id}\")\n\t public void delete(@PathVariable Integer id) {\n\t service.delete(id);\n\t }", "public void deleteById(String id);", "@RequestMapping( value = \"/{id}\", method = RequestMethod.DELETE )\n public void delete(@PathVariable(value=\"id\") int id){\n classService.delete(id);\n }", "public void removeFiles() throws ServiceException;", "public void unassignService(String serviceName) throws SMSException {\n // if (coexistMode) {\n // amsdk.unassignService(serviceName);\n // } else {\n removeServiceConfig(serviceName);\n // }\n }", "@Override\n public void removedService(final ServiceReference<ComponentFactory> reference, final ComponentFactory service)\n {\n final String productType = (String)reference.getProperty(ComponentConstants.COMPONENT_NAME);\n \n m_Logging.info(\"Unregistering factory for: %s\", productType);\n \n final FactoryInternal factory = m_Factories.get(productType);\n \n //make unavailable via framework\n tryMakeFactoryUnavailable(factory);\n \n // allow proxy services to do clean up first\n tryProxyOnRemoveFactory(factory);\n \n //remove all associated factory objects\n tryRemoveAllFactoryObjects(factory);\n //unreg the rest of the services and other cleanup\n tryCleanupFactory(factory);\n \n //make unavailable to management services\n tryRemoveFactory(productType);\n \n //dispose of the factory instance\n tryDisposeFactory(productType);\n \n //remove reference to service\n tryUngetService(reference);\n }", "void delete(String id, boolean force) throws PSDataServiceException, PSNotFoundException;", "LinkedService deleteByIdWithResponse(String id, Context context);", "void deleteById(final String id);", "@Override\n\tpublic int deleteCallServiceByIds(String s) {\n\t\tList ids = new ArrayList();\n\t\tCollections.addAll(ids, s.split(\",\"));\n\t\treturn dgCallServiceMapper.deleteIds(ids);\n\t}", "void removeHost(Service oldHost);", "void delete(URI url) throws RestClientException;", "@Override\n\tpublic void deleteServiceInstanceBinding(DeleteServiceInstanceBindingRequest request) {\n\t\tuserManager.deleteUser(request.getServiceInstanceId());\n\t}", "public void deleteDirectoryEntriesFromCollection(\n TableServiceClient tableServiceClient, String tableName) {\n if (TableServiceClientUtils.tableExists(tableServiceClient, tableName)) {\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n tableClient.deleteTable();\n } else {\n logger.warn(\n \"No storage table {} found to be removed. This should only happen when deleting a file-less dataset.\",\n tableName);\n }\n }", "@DeleteMapping(\"/deleteStaff/{id}\")\n\tpublic void deleteStaff(@PathVariable(\"id\") int id) {\n\t\tstaffService.deleteStaff(id);\n\t}", "private void unregister(final ServiceReference serviceReference) {\n final ServiceRegistration proxyRegistration;\n synchronized (this.proxies) {\n proxyRegistration = this.proxies.remove(serviceReference);\n }\n\n if (proxyRegistration != null) {\n log.debug(\"Unregistering {}\", proxyRegistration);\n this.bundleContext.ungetService(serviceReference);\n proxyRegistration.unregister();\n }\n }", "@Secured(\"ROLE_ADMIN\")\n @DeleteMapping(value = \"/{id}\")\n public ResponseEntity<Map<String, Object>> delete(@PathVariable Long id) {\n\n try {\n \t\n \tList<ServicioOfrecido> listaServiciosOfrecidos = servOfreServ.buscarPorProfesional(profesionalService.findOne(id));\n \tfor (ServicioOfrecido servOfre : listaServiciosOfrecidos) {\n\t\t\t\tservOfreServ.delete(servOfre.getId_servicioOfrecido());\n\t\t\t}\n \tprofesionalService.delete(id);\n \t\n }catch(DataAccessException e) {\n return new ResponseEntity<Map<String,Object>>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity<Map<String,Object>>(HttpStatus.OK);\n }", "@DeleteMapping(\"/person/{id}\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate void deletePerson(@PathVariable(\"id\") int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n }\r\n}", "@Override\n\tpublic void unregisterService(String service) {\n\t\tassert((service!=null)&&(!\"\".equals(service))); //$NON-NLS-1$\n\t\tsuper.unregisterService(service);\n\t\t// Informs the other kernels about this registration\n\t\tgetMTS(NetworkMessageTransportService.class).broadcast(new KernelMessage(YellowPages.class,KernelMessage.Type.YELLOW_PAGE_UNREGISTERING,service,null));\n\t}", "@DeleteMapping(\"/api/students\")\n public void deleteStudentById(@PathVariable(value = \"id\") Long id) {\n this.studentService.deleteStudentById(id);\n }", "@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }", "public void deleteSiteStats () throws DataServiceException;", "public void delete() throws NotAuthorizedException, ConflictException,\n\t\t\tBadRequestException {\n\t}", "@DeleteMapping(\"/data-set-operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDataSetOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete DataSetOperation : {}\", id);\n dataSetOperationRepository.delete(id);\n dataSetOperationSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void serviceRemoved(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"removed serivce: \" + event);\n\t\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Ads : {}\", id);\n adsRepository.delete(id);\n adsSearchRepository.delete(id);\n }", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "public void stopService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n return beginDeleteWithResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)\n .flatMap((Response<Void> res) -> Mono.empty());\n }", "@DeleteMapping(\"/statuts/{id}\")\n public void deletStatut(@PathVariable(\"id\") int id) {\n \tserviceStatut.deletStatut(id);\n }" ]
[ "0.70450115", "0.67590374", "0.66542697", "0.66456455", "0.6584381", "0.64607775", "0.6459928", "0.63484055", "0.628368", "0.62804943", "0.6210241", "0.6110351", "0.6106372", "0.60660726", "0.6065428", "0.58548135", "0.58389944", "0.58078915", "0.5806772", "0.5755611", "0.5746674", "0.5726993", "0.57262737", "0.57028013", "0.5676839", "0.5670676", "0.56659865", "0.5659078", "0.5648209", "0.5603241", "0.5583003", "0.55608416", "0.554818", "0.55316377", "0.5494341", "0.5464912", "0.5461889", "0.5451434", "0.5434314", "0.5425946", "0.54120547", "0.53982186", "0.5390913", "0.5327552", "0.532646", "0.5302732", "0.526558", "0.52361906", "0.5222316", "0.52075607", "0.520456", "0.51928514", "0.5189444", "0.5178791", "0.51784104", "0.51759535", "0.51732516", "0.51633346", "0.5151561", "0.5119884", "0.51105124", "0.51059985", "0.51053166", "0.51027006", "0.5096798", "0.5094294", "0.5094131", "0.5091985", "0.50845575", "0.50397277", "0.50396377", "0.5028615", "0.50280803", "0.50204724", "0.5019512", "0.5016465", "0.5005944", "0.49889654", "0.498633", "0.49862397", "0.49810562", "0.49680495", "0.49495304", "0.4939668", "0.49311316", "0.49273846", "0.4923483", "0.49231", "0.49149433", "0.49140915", "0.49097154", "0.49096194", "0.49068367", "0.4894605", "0.48820767", "0.48803228", "0.48738316", "0.48544976", "0.48518023", "0.4849244" ]
0.6582414
5
Creates an endpoint, and returns the new endpoint.
public com.google.cloud.servicedirectory.v1beta1.Endpoint createEndpoint( com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateEndpointMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public CreateEndpointResult createEndpoint(CreateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeCreateEndpoint(request);\n }", "EndPoint createEndPoint();", "public abstract Endpoint createEndpoint(String bindingId, Object implementor);", "public org.hl7.fhir.Uri addNewEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().add_element_user(ENDPOINT$8);\n return target;\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Endpoint>\n createEndpoint(com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request);\n }", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "public void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateEndpointMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public Endpoint addNewEndpoint(String entity)\n\t\t{\n\t\t\tElement endpointElement = document.createElement(ENDPOINT_ELEMENT_NAME);\n\t\t\tEndpoint endpoint = new Endpoint(endpointElement);\n\t\t\tendpoint.setEntity(entity);\n\n\t\t\tuserElement.appendChild(endpointElement);\n\t\t\tendpointsList.add(endpoint);\n\n\t\t\treturn endpoint;\n\t\t}", "default void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateEndpointMethod(), responseObserver);\n }", "public String createEndpoint(EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties);\n }", "public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "String createEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public Endpoint createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Endpoint createAndPublishEndpoint(String address, Object implementor,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public void addEndpoint(Endpoint endpoint)\r\n {\r\n getEndpoints().add(endpoint);\r\n }", "public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection addNewEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n return target;\r\n }\r\n }", "UMOImmutableEndpoint createOutboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void configureEndpoint(Endpoint endpoint);", "public Builder setEndpoint(String endpoint) {\n this.endpoint = Preconditions.checkNotNull(endpoint, \"Endpoint is null.\");\n return this;\n }", "@WebMethod\n URI exposeEndpoint(Endpoint endpoint);", "public Endpoint getEndpoint(String uri) {\n Endpoint answer;\n synchronized (endpoints) {\n answer = endpoints.get(uri);\n if (answer == null) {\n try {\n\n String splitURI[] = ObjectHelper.splitOnCharacter(uri, \":\", 2);\n if (splitURI[1] != null) {\n String scheme = splitURI[0];\n Component component = getComponent(scheme);\n\n if (component != null) {\n answer = component.createEndpoint(uri);\n\n if (answer != null && LOG.isDebugEnabled()) {\n LOG.debug(uri + \" converted to endpoint: \" + answer + \" by component: \"+ component);\n }\n }\n }\n if (answer == null) {\n answer = createEndpoint(uri);\n }\n\n if (answer != null && answer.isSingleton()) {\n startServices(answer);\n endpoints.put(uri, answer);\n \tlifecycleStrategy.onEndpointAdd(answer);\n }\n } catch (Exception e) {\n throw new ResolveEndpointFailedException(uri, e);\n }\n }\n }\n return answer;\n }", "public static EndpointMBean getAddEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "void setEndpoint(String endpoint);", "public Builder url(URI endpoint) {\n return server(endpoint);\n }", "UMOImmutableEndpoint createResponseEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void addPeerEndpoint(PeerEndpoint peer);", "@Override\n public UpdateEndpointResult updateEndpoint(UpdateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateEndpoint(request);\n }", "Endpoint<R> borrowEndpoint() throws EndpointBalancerException;", "public HttpEndpoint( String theEndpoint ) {\n\t\tthis( theEndpoint, true );\n\t}", "UMOImmutableEndpoint createInboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder getEndpointBuilder() {\n return getEndpointFieldBuilder().getBuilder();\n }", "public void setEndpointId(String endpointId);", "public RgwAdminBuilder endpoint(String endpoint) {\n this.endpoint = endpoint;\n return this;\n }", "@Override\n public Endpoint build() throws ConstraintViolationException {\n VocabUtil.getInstance().validate(endpointImpl);\n return endpointImpl;\n }", "public ReplicationObject withEndpointType(EndpointType endpointType) {\n this.endpointType = endpointType;\n return this;\n }", "EndpointType endpointType();", "public void addEndpoint(Endpoint endpoint)\n\t\t{\n\t\t\tEndpoint newEndpoint = addNewEndpoint(endpoint.getEntity());\n\t\t\tnewEndpoint.setStatus(endpoint.getStatus());\n\t\t\tnewEndpoint.setState(endpoint.getState());\n\t\t\tfor (Media media : endpoint.getMedias())\n\t\t\t\tnewEndpoint.addMedia(media);\n\t\t}", "private EndPoint createDotEndPoint(EndPointAnchor anchor)\r\n {\r\n DotEndPoint endPoint = new DotEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setTarget(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n\r\n return endPoint;\r\n }", "public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder getEndpointBuilder() {\n \n onChanged();\n return getEndpointFieldBuilder().getBuilder();\n }", "Adresse createAdresse();", "Endpoint getDefaultEndpoint();", "void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "String endpoint();", "public W3CEndpointReference createW3CEndpointReference(String address, QName interfaceName,\n QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters, List<Element> elements, Map<QName, String> attributes) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Builder mergeEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (endpoint_ != null) {\n endpoint_ =\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.newBuilder(endpoint_).mergeFrom(value).buildPartial();\n } else {\n endpoint_ = value;\n }\n onChanged();\n } else {\n endpointBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName,\n QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters);", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "public EndpointDetail() {\n }", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "public interface ApiEndpointDefinition extends Serializable {\n\n\t/**\n\t * Get the endpoint class.\n\t * @return the endpoint class\n\t */\n\tClass<?> getEndpointClass();\n\n\t/**\n\t * Get the endpoint type.\n\t * @return the endpoint type\n\t */\n\tApiEndpointType getType();\n\n\t/**\n\t * Get the scanner type.\n\t * @return the scanner type\n\t */\n\tJaxrsScannerType getScannerType();\n\n\t/**\n\t * Get the endpoint path.\n\t * @return the endpoint path\n\t */\n\tString getPath();\n\n\t/**\n\t * Get the API context id to which the endpoint is bound.\n\t * @return the API context id to which the endpoint is bound\n\t */\n\tString getContextId();\n\n\t/**\n\t * Init the endpoint context.\n\t * @return <code>true</code> if initialized, <code>false</code> if already initialized\n\t */\n\tboolean init();\n\n\t/**\n\t * Create a new {@link ApiEndpointDefinition}.\n\t * @param endpointClass The endpoint class (not null)\n\t * @param type The endpoint type\n\t * @param scannerType The scanner type\n\t * @param path The endpoint path\n\t * @param contextId the API context id to which the endpoint is bound\n\t * @param initializer Initializer (not null)\n\t * @return A new {@link ApiEndpointDefinition} instance\n\t */\n\tstatic ApiEndpointDefinition create(Class<?> endpointClass, ApiEndpointType type, JaxrsScannerType scannerType,\n\t\t\tString path, String contextId, Callable<Void> initializer) {\n\t\treturn new DefaultApiEndpointDefinition(endpointClass, type, scannerType, path, contextId, initializer);\n\t}\n\n}", "public InputEndpoint withEndpointName(String endpointName) {\n this.endpointName = endpointName;\n return this;\n }", "Address createAddress();", "EndpointDetails getEndpointDetails();", "public Builder clearEndpoint() {\n if (endpointBuilder_ == null) {\n endpoint_ = null;\n onChanged();\n } else {\n endpoint_ = null;\n endpointBuilder_ = null;\n }\n\n return this;\n }", "synchronized MutableSpan setEndpoint(Endpoint endpoint) {\n for (int i = 0; i < annotations.size(); i++) {\n V1Annotation a = annotations.get(i);\n if (a.endpoint().equals(Endpoints.UNKNOWN)) {\n annotations.set(i, V1Annotation.create(a.timestamp(), a.value(), endpoint));\n }\n }\n this.endpoint = endpoint;\n return this;\n }", "public VersionInfo withEndpointUrl(String endpointUrl) {\n this.endpointUrl = endpointUrl;\n return this;\n }", "interface WithPrivateEndpoint {\n /**\n * Specifies privateEndpoint.\n * @param privateEndpoint The resource of private end point\n * @return the next update stage\n */\n Update withPrivateEndpoint(PrivateEndpointInner privateEndpoint);\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder> \n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n endpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder>(\n getEndpoint(),\n getParentForChildren(),\n isClean());\n endpoint_ = null;\n }\n return endpointBuilder_;\n }", "PortDefinition createPortDefinition();", "public static EndpointMBean getSubtractEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}", "public final EObject entryRuleEndpoint() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEndpoint = null;\n\n\n try {\n // InternalMappingDsl.g:3450:49: (iv_ruleEndpoint= ruleEndpoint EOF )\n // InternalMappingDsl.g:3451:2: iv_ruleEndpoint= ruleEndpoint EOF\n {\n newCompositeNode(grammarAccess.getEndpointRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEndpoint=ruleEndpoint();\n\n state._fsp--;\n\n current =iv_ruleEndpoint; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "@Override\n public GetServiceEndpointResult getServiceEndpoint(GetServiceEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceEndpoint(request);\n }", "public static EndpointMBean getMultiplyEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private void createEndpointElement(JsonObject swaggerObject, String swaggerVersion) throws RegistryException {\n\t\t/*\n\t\tExtracting endpoint url from the swagger document.\n\t\t */\n\t\tif (SwaggerConstants.SWAGGER_VERSION_12.equals(swaggerVersion)) {\n\t\t\tJsonElement endpointUrlElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tif (endpointUrlElement == null) {\n\t\t\t\tlog.warn(\"Endpoint url is not specified in the swagger document. Endpoint creation might fail. \");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tendpointUrl = endpointUrlElement.getAsString();\n\t\t\t}\n\t\t} else if (SwaggerConstants.SWAGGER_VERSION_2.equals(swaggerVersion)) {\n\t\t\tJsonElement transportsElement = swaggerObject.get(SwaggerConstants.SCHEMES);\n\t\t\tJsonArray transports = (transportsElement != null) ? transportsElement.getAsJsonArray() : null;\n\t\t\tString transport = (transports != null) ? transports.get(0).getAsString() + \"://\" : DEFAULT_TRANSPORT;\n\t\t\tJsonElement hostElement = swaggerObject.get(SwaggerConstants.HOST);\n\t\t\tString host = (hostElement != null) ? hostElement.getAsString() : null;\n if (host == null) {\n log.warn(\"Endpoint(host) url is not specified in the swagger document. \"\n + \"The host serving the documentation is to be used(including the port) as endpoint host\");\n\n if(requestContext.getSourceURL() != null) {\n URL sourceURL = null;\n try {\n sourceURL = new URL(requestContext.getSourceURL());\n } catch (MalformedURLException e) {\n throw new RegistryException(\"Error in parsing the source URL. \", e);\n }\n host = sourceURL.getAuthority();\n }\n }\n\n if (host == null) {\n log.warn(\"Can't derive the endpoint(host) url when uploading swagger from file. \"\n + \"Endpoint creation might fail. \");\n return;\n }\n\n\t\t\tJsonElement basePathElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tString basePath = (basePathElement != null) ? basePathElement.getAsString() : DEFAULT_BASE_PATH;\n\n\t\t\tendpointUrl = transport + host + basePath;\n\t\t}\n\t\t/*\n\t\tCreating endpoint artifact\n\t\t */\n\t\tOMFactory factory = OMAbstractFactory.getOMFactory();\n\t\tendpointLocation = EndpointUtils.deriveEndpointFromUrl(endpointUrl);\n\t\tString endpointName = EndpointUtils.deriveEndpointNameWithNamespaceFromUrl(endpointUrl);\n\t\tString endpointContent = EndpointUtils\n\t\t\t\t.getEndpointContentWithOverview(endpointUrl, endpointLocation, endpointName, documentVersion);\n\t\ttry {\n\t\t\tendpointElement = AXIOMUtil.stringToOM(factory, endpointContent);\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RegistryException(\"Error in creating the endpoint element. \", e);\n\t\t}\n\n\t}", "public boolean hasEndpoint() { return true; }", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint getEndpoint();", "public void addEndpoint(String endpoint) {\n\t\tif (sessionMap.putIfAbsent(endpoint, new ArrayList<Session>()) != null)\n\t\t\tLOG.warn(\"Endpoint {} already exists\", endpoint);\n\t\telse\n\t\t\tLOG.info(\"Added new endpoint {}\", endpoint);\n\t}", "@Override\n public TTransportWrapper getTransport(HostAndPort endpoint) throws Exception {\n return new TTransportWrapper(connectToServer(new InetSocketAddress(endpoint.getHostText(),\n endpoint.getPort())),\n endpoint);\n }", "private EndPoint createRectangleEndPoint(EndPointAnchor anchor)\r\n {\r\n RectangleEndPoint endPoint = new RectangleEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setSource(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n return endPoint;\r\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "public Builder setEndpoint(\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder builderForValue) {\n if (endpointBuilder_ == null) {\n endpoint_ = builderForValue.build();\n onChanged();\n } else {\n endpointBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "String serviceEndpoint();", "public Builder setApiEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n apiEndpoint_ = value;\n bitField0_ |= 0x00080000;\n onChanged();\n return this;\n }", "String createEndpointFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>\n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n if (!(stepInfoCase_ == 8)) {\n stepInfo_ = com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance();\n }\n endpointBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>(\n (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_,\n getParentForChildren(),\n isClean());\n stepInfo_ = null;\n }\n stepInfoCase_ = 8;\n onChanged();\n return endpointBuilder_;\n }", "URISegment createURISegment();", "EndpointElement getEndpointByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public InterfaceEndpointInner withEndpointService(EndpointService endpointService) {\n this.endpointService = endpointService;\n return this;\n }", "public boolean addEndpoint(String endpointData) throws AxisFault {\n EndpointAdminServiceClient endpointAdminServiceClient = getEndpointAdminServiceClient();\n return endpointAdminServiceClient.addEndpoint(endpointData);\n }", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public Builder setEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n endpoint_ = value;\n onChanged();\n } else {\n endpointBuilder_.setMessage(value);\n }\n\n return this;\n }", "Port createPort();", "Port createPort();", "RESTElement createRESTElement();", "public String getEndpoint() {\n return this.endpoint;\n }", "public String getEndpoint() {\n return this.endpoint;\n }", "@Override\n public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeEndpoint(request);\n }", "public ResourceTypeExtension withEndpointUri(String endpointUri) {\n this.endpointUri = endpointUri;\n return this;\n }", "ServiceEndpointPolicy.DefinitionStages.Blank define(String name);", "public String createEndpointFromTemplate(String networkAddress,\n String templateGUID,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpointFromTemplate(userId, null, null, networkAddress, templateGUID, templateProperties);\n }", "private AdjListEdge createEdge(Edge e) {\n\t\t// check if present\n\t\tif (edges.get(e.getIndex()) != null) return edges.get(e.getIndex());\n\t\t\n\t\tAdjListVertex uThis = vertices.get(e.getFirstVertex().getIndex());\n\t\tAdjListVertex vThis = vertices.get(e.getSecondVertex().getIndex());\n\t\tAdjListEdge eThis = new AdjListEdge(uThis, vThis, e.getIndex());\n\t\tedges.set(e.getIndex(), eThis);\n\t\tllEdges.add(eThis);\n\t\t\n\t\tnotifyEdgeCreated(eThis);\n\t\treturn eThis;\n\t}", "public static NodeEndPoint copy(final NodeEndPoint other) {\n return new NodeEndPoint(other.getHostName(), other.getIpAddress(), other.getPort());\n }", "public String getEndpointId();", "public org.hl7.fhir.Uri getEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().find_element_user(ENDPOINT$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String createAPI(String endpointGUID,\n APIProperties apiProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return apiManagerClient.createAPI(userId, apiManagerGUID, apiManagerName, apiManagerIsHome, endpointGUID, apiProperties);\n }", "Delivery createDelivery();" ]
[ "0.8141585", "0.7408833", "0.73523784", "0.7263873", "0.72451127", "0.70074636", "0.67841184", "0.6772443", "0.6663933", "0.65615046", "0.6457761", "0.6344424", "0.63039494", "0.62232774", "0.6141626", "0.59694564", "0.5952881", "0.5943915", "0.59322107", "0.5924535", "0.58745545", "0.5795019", "0.56655043", "0.56118536", "0.5582008", "0.5549973", "0.546366", "0.54615843", "0.54361475", "0.54068613", "0.5398567", "0.53818166", "0.5365914", "0.5358889", "0.53583497", "0.53385335", "0.5313927", "0.5292948", "0.5263141", "0.5259873", "0.5259067", "0.522872", "0.5190387", "0.51737", "0.5147564", "0.5133234", "0.5117169", "0.5111203", "0.51084894", "0.5102699", "0.51002485", "0.50914586", "0.508323", "0.50796914", "0.5068504", "0.50646555", "0.50296354", "0.4998717", "0.49879307", "0.49841252", "0.49821988", "0.49781048", "0.49568936", "0.4954111", "0.49497303", "0.4949422", "0.49463332", "0.49435148", "0.49421507", "0.4932823", "0.49233252", "0.49127132", "0.4902962", "0.4902601", "0.48931268", "0.48800296", "0.4862728", "0.48528177", "0.48516688", "0.4848747", "0.48416126", "0.48413682", "0.48411688", "0.48392716", "0.48314917", "0.48168296", "0.48168296", "0.48071668", "0.4801171", "0.4801171", "0.4792116", "0.47874272", "0.4780751", "0.47758552", "0.47700098", "0.47680402", "0.476492", "0.4761291", "0.47607502", "0.47583482" ]
0.74986225
1
Gets the IAM Policy for a resource
public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>\n getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request);\n }", "private Resource getPolicyResource(String policyId) throws EntitlementException {\n String path = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving entitlement policy\");\n }\n\n try {\n path = policyStorePath + policyId;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n return registry.get(path);\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy : \" + policyId, e);\n throw new EntitlementException(\"Error while retrieving entitlement policy : \" + policyId, e);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "private PolicyDTO readPolicy(Resource resource) throws EntitlementException {\n \n String policy = null;\n AbstractPolicy absPolicy = null;\n PolicyDTO dto = null;\n\n try {\n policy = new String((byte[]) resource.getContent(), Charset.forName(\"UTF-8\"));\n absPolicy = PolicyReader.getInstance(null).getPolicy(policy);\n dto = new PolicyDTO();\n dto.setPolicyId(absPolicy.getId().toASCIIString());\n dto.setPolicy(policy);\n\n String policyOrder = resource.getProperty(\"policyOrder\");\n if(policyOrder != null){\n dto.setPolicyOrder(Integer.parseInt(policyOrder));\n } else {\n dto.setPolicyOrder(0);\n } // TODO policy refe IDs ???\n PolicyAttributeBuilder policyAttributeBuilder = new PolicyAttributeBuilder();\n dto.setAttributeDTOs(policyAttributeBuilder.\n getPolicyMetaDataFromRegistryProperties(resource.getProperties()));\n return dto;\n } catch (RegistryException e) {\n log.error(\"Error while loading entitlement policy\", e);\n throw new EntitlementException(\"Error while loading entitlement policy\", e);\n }\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "Policy _get_policy(int policy_type);", "@Override\n\tpublic Optional<Policy> findPolicyById(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\treturn policyDao.findById(policyId);\n\t}", "public static String getPublicReadPolicy(String bucket_name) {\r\n Policy bucket_policy = new Policy().withStatements(\r\n new Statement(Statement.Effect.Allow)\r\n .withPrincipals(Principal.AllUsers)\r\n .withActions(S3Actions.GetObject)\r\n .withResources(new Resource(\r\n \"arn:aws:s3:::\" + bucket_name + \"/*\")));\r\n return bucket_policy.toJson();\r\n }", "public com.amazon.s3.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy(com.amazon.s3.GetBucketAccessControlPolicy getBucketAccessControlPolicy);", "ServiceEndpointPolicy getById(String id);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "PolicyRecord findOne(Long id);", "public PolicyMap getPolicyMap();", "public com.amazon.s3.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy(com.amazon.s3.GetObjectAccessControlPolicy getObjectAccessControlPolicy);", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "Resource getAbilityResource();", "public PolicyDTO readPolicy(String policyId) throws EntitlementException {\n\n Resource resource = null;\n \n resource = getPolicyResource(policyId);\n\n if (resource == null) {\n return new PolicyDTO();\n }\n\n return readPolicy(resource);\n }", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "public void getIamPolicy(\n com.google.iam.v1.GetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public Privilege get(int actionId, int resourceId) {\n\t\tTypedQuery<Privilege> q = getEntityManager().createQuery(\"SELECT p FROM Privilege p WHERE p.actionId = :actionId AND p.resourceId = :resourceId\", Privilege.class)\n\t\t\t\t.setParameter(\"actionId\", actionId).setParameter(\"resourceId\", resourceId);\n\t\ttry {\n\t\t\treturn q.getSingleResult();\n\t\t} catch (NoResultException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public int getPermission(Integer resourceId);", "public CompanyPolicy getPolicy(int policyNo) {\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo); \n return cPolicy;\n\t}", "@Override\r\n\tpublic List<Policy> getPolicies() {\n\t\tList<Policy> policy=dao.getPolicies();\r\n\t\treturn policy;\r\n\t}", "@Nullable\n public ManagedAppPolicy get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "private static String getBucketPolicyFromFile(String policy_file) {\r\n StringBuilder file_text = new StringBuilder();\r\n try {\r\n List<String> lines = Files.readAllLines(\r\n Paths.get(policy_file), Charset.forName(\"UTF-8\"));\r\n for (String line : lines) {\r\n file_text.append(line);\r\n }\r\n } catch (IOException e) {\r\n System.out.format(\"Problem reading file: \\\"%s\\\"\", policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n // Verify the policy by trying to load it into a Policy object.\r\n Policy bucket_policy = null;\r\n try {\r\n bucket_policy = Policy.fromJson(file_text.toString());\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Invalid policy text in file: \\\"%s\\\"\",\r\n policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n return bucket_policy.toJson();\r\n }", "public abstract List<AbstractPolicy> getPolicies();", "public RegistryKeyProperty getPolicyKey();", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "Resource getResource() {\n\t\treturn resource;\n\t}", "public EvictionPolicy getEvictionPolicy()\n {\n return m_policy;\n }", "public Set<Policy> findPolicyByPerson(String id);", "public ResourceReadPolicy getReadPolicy(Class<?> resourceClass, User user)\n\t{\n\t\tString resourceAlias = resourceClass.getSimpleName();\n\t\tresourceAlias = resourceAlias.substring(0, 1).toLowerCase() + resourceAlias.substring(1);\n\t\tString projectAlias = \"project\";\n\t\t\n\t\tif (this.getLogicOperator() == LogicOperator.AND)\n\t\t{\n\t\t\tResourceReadPolicy readPolicy = new ResourceReadPolicy();\n\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(true);\n\t\t\t\tString conditions = this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\n\t\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t\t{\n\t\t\t\t\tif (subPolicy.isEntityAccessGranted(user))\n\t\t\t\t\t{\n\t\t\t\t\t\tString groupConditions = subPolicy.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!groupConditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = conditions + \" \" + this.logicOperator + \" \" + groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // If subgroup entity access is not granted\n\t\t\t\t\t{\n\t\t\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\t\t\treadPolicy.setReadConditions(null);\n\t\t\t\t\t\treturn readPolicy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treadPolicy.setReadConditions(conditions);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t\telse // If group entity access is not granted\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t}\n\t\telse // If Logic Operator is OR \n\t\t{\n\t\t\tResourceReadPolicy resourceReadPolicy = new ResourceReadPolicy();\n\t\t\t\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\tresourceReadPolicy.setReadConditions(this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user));\t\t\t\t\n\t\t\t}\n\n\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t{\n\t\t\t\tResourceReadPolicy groupReadPolicy = subPolicy.readGroupPolicy(resourceAlias, projectAlias, user);\n\t\t\t\tif (groupReadPolicy.isReadGranted())\n\t\t\t\t{\n\t\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\t\t\n\t\t\t\t\tString conditions = resourceReadPolicy.getReadConditions();\n\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions = groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\telse if (!groupReadPolicy.getReadConditions().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions += \" \" + this.logicOperator + \" \" + groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresourceReadPolicy.setReadConditions(conditions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn resourceReadPolicy;\n\t\t}\n\t}", "protected Resource getResource() {\n return resource;\n }", "static JackrabbitAccessControlList getPolicy(AccessControlManager acM, String path, Principal principal) throws RepositoryException,\n AccessDeniedException, NotExecutableException {\n AccessControlPolicyIterator itr = acM.getApplicablePolicies(path);\n while (itr.hasNext()) {\n AccessControlPolicy policy = itr.nextAccessControlPolicy();\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // try if there is an acl that has been set before:\n AccessControlPolicy[] pcls = acM.getPolicies(path);\n for (AccessControlPolicy policy : pcls) {\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // no applicable or existing ACLTemplate to edit -> not executable.\n throw new NotExecutableException();\n }", "public Resource getResource() {\n return resource;\n }", "public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n return new PolicyDTO[0];\n }\n policies = new PolicyDTO[resources.length];\n\n List<PolicyDTO> policyDTOList = new ArrayList<PolicyDTO>();\n int[] policyOrder = new int[resources.length];\n\n for(int i = 0; i < resources.length; i++){\n PolicyDTO policyDTO = readPolicy(resources[i]);\n policyDTOList.add(policyDTO);\n policyOrder[i] = policyDTO.getPolicyOrder();\n }\n\n // sorting array TODO : with Comparator class\n int[] tempArray = new int[policyOrder.length];\n Arrays.sort(policyOrder);\n for (int i = 0; i < tempArray.length; i++) {\n int j = (policyOrder.length-1)-i;\n tempArray[j] = policyOrder[i];\n }\n policyOrder = tempArray;\n\n for (int i = 0; i < policyOrder.length; i++) {\n for(PolicyDTO policyDTO : policyDTOList){\n if(policyOrder[i] == policyDTO.getPolicyOrder()){\n policies[i] = policyDTO;\n }\n }\n }\n \n return policies;\n }", "public static BackupPolicy get(String name, Output<String> id, @Nullable BackupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {\n return new BackupPolicy(name, id, state, options);\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "ServiceEndpointPolicy getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "@JsonIgnore public BoardingPolicyType getBoardingPolicy() {\n return (BoardingPolicyType) getValue(\"boardingPolicy\");\n }", "RequiredResourceType getRequiredResource();", "ResourceRequirement getRequirementFor(AResourceType type);", "private Resource[] getAllPolicyResource() throws EntitlementException {\n\n String path = null;\n Collection collection = null;\n List<Resource> resources = new ArrayList<Resource>();\n String[] children = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving all entitlement policies\");\n }\n\n try {\n path = policyStorePath;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n collection = (Collection) registry.get(path);\n children = collection.getChildren();\n\n for (String aChildren : children) {\n resources.add(registry.get(aChildren));\n }\n\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy\", e);\n throw new EntitlementException(\"Error while retrieving entitlement policies\", e);\n }\n\n return resources.toArray(new Resource[resources.size()]);\n }", "public Jedis getResource() {\n\t\tif (jedisPool == null) {\n\t\t\tsynchronized (this) {\n\t\t\t\tif (jedisPool == null){\n\t\t\t\t\tjedisPool = new JedisPool(jedisPoolConfig, host, port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jedisPool.getResource();\n\t}", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "public NatPolicy getNatPolicy();", "Iterable<PrimaryPolicyMetadata> getApplicablePolicies();", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "@XmlElement(name = \"source_policy\")\r\n public ProtectionSourcePolicy getSourcePolicy() {\r\n return sourcePolicy;\r\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public SigningPolicy getSigningPolicy(String subject) {\n \n if (this.policyDNMap == null) {\n return null;\n }\n\n return (SigningPolicy) this.policyDNMap.get(subject);\n }", "public static Policy getEndpointEffectivePolicy(Definitions wsdl, QName serviceQName, String portName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n //obtain port\n Endpoint port = srv.getEndpoint(portName);\n if (port == null) {\n throw new IllegalArgumentException(\"Cannot find port with name '\" + portName + \"' in service with qname \" + serviceQName);\n }\n //obtain binding\n QName bQName = port.getBinding();\n Binding binding = wsdl.getBinding(bQName);\n //obtain portType\n QName intQName = binding.getInterface();\n Interface portType = wsdl.getInterface(intQName);\n \n Element wsdlEl = (Element) binding.getDomElement().getParentNode();\n \n Policy portPolicy = ConfigurationBuilder.loadPolicies(port, wsdlEl);\n Policy bindingPolicy = ConfigurationBuilder.loadPolicies(binding, wsdlEl);\n Policy portTypePolicy = ConfigurationBuilder.loadPolicies(portType, wsdlEl);\n \n Policy res = Policy.mergePolicies(new Policy[]{portPolicy, bindingPolicy, portTypePolicy});\n return res;\n }", "PolicyDetail findPolicyByID(int policyId, int lenderId);", "@Deprecated\n Policy getEvictionPolicy();", "private RoutingPolicy getExportPolicy() {\n\t String exportPolicyName = null;\n switch(this.getType()) {\n case BGP:\n // String constant from\n // org.batfish.representation.cisco.CiscoConfiguration.toBgpProcess\n exportPolicyName = \"~BGP_COMMON_EXPORT_POLICY:\" \n + this.getVrf().getName() + \"~\";\n break;\n case OSPF:\n exportPolicyName = this.ospfConfig.getExportPolicy();\n break;\n default:\n return null;\n }\n\n return this.getDevice().getRoutingPolicy(exportPolicyName);\n\t}", "PolicyDetail findPolicyDetail(int policyId, Lender lender);", "public ResourceInfo getResource() {\n\t\treturn resource;\n\t}", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy getAuthorizationPolicies(int index);", "SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName);", "@Deprecated\n public List<V2beta2HPAScalingPolicy> getPolicies();", "PolicyDecision getDecision();", "public CertificateAttributesPolicy getCertificateAttributesPolicy() {\n if (trustedCAs.size() != 0) {\n TrustedCaPolicy tc = (TrustedCaPolicy)trustedCAs.get(0);\n if (tc.getCertificateAttributesPolicy() != null) {\n return tc.getCertificateAttributesPolicy();\n }\n }\n return certificateAttributesPolicy;\n }", "public String getRuntimePolicyFile(IPath configPath);", "String privacyPolicy();", "public MPProcessesResponse getMonitoringPolicyProcess(String policyId, String processId) throws RestClientException, IOException {\n return client.get(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), null, MPProcessesResponse.class);\n }", "public static APIPolicy createDefaultAPIPolicy() {\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1000, 10000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n apiPolicy.setPipelines(createDefaultPipelines());\n return apiPolicy;\n }", "public ImNotifPolicy getImNotifPolicy();", "public static short[] getPolicies() {\n\t\treturn POLICIES;\n\t}", "public List<Policy> getReferencedPolicies(Rule rule) {\n return getReferencedPolicies(rule, null);\n }", "public interface TilePolicy {\n\n\tpublic boolean getEnterableAt(Pair xy);\n\tpublic boolean getPassableAt(Pair xy);\n\tpublic boolean getJumpableAt(Pair xy);\n\t\n\tpublic boolean getWalkableAt(Pair xy, Player player);\n\tpublic boolean getEnterableAt(Pair xy, CellLogic ignore);\n\t\n\t/**\n\t * All policies must return a name so they can be enumerated\n\t * and a group of grunts all moving at once can share policies\n\t * if they have the same movement. Comparing getName is\n\t * equivalent to an equality test between policies.\n\t * \n\t * @return The name of the Policy\n\t */\n\tpublic String getName();\n\t\n}", "com.yandex.ydb.rate_limiter.ResourceOrBuilder getResourceOrBuilder();", "PolicyStatsManager getStats();", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "java.util.List<com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy> \n getAuthorizationPoliciesList();", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "com.yandex.ydb.rate_limiter.Resource getResource();", "@JsonIgnore\n public String getResource() {\n return this.resource;\n }", "public String getResourceOWL()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceOWL);\r\n }", "public ResourceVO getResource() {\n\treturn resource;\n}" ]
[ "0.6203847", "0.6186254", "0.6138413", "0.6095201", "0.6080963", "0.5858935", "0.58587104", "0.57901645", "0.57883555", "0.5769761", "0.5749365", "0.56901425", "0.5656458", "0.56230205", "0.5586617", "0.55617374", "0.54347295", "0.54000455", "0.5365061", "0.532694", "0.53233534", "0.5305755", "0.53039086", "0.5281342", "0.5213906", "0.5172531", "0.51078", "0.50747687", "0.5036701", "0.5017904", "0.50159967", "0.50155324", "0.5007601", "0.4984229", "0.49525255", "0.4936179", "0.49048913", "0.4882294", "0.4877851", "0.48755404", "0.4865805", "0.4852528", "0.48485568", "0.48409018", "0.48399106", "0.48397526", "0.48180217", "0.4815235", "0.48144487", "0.47985482", "0.4792524", "0.4792524", "0.476152", "0.47521234", "0.4747377", "0.4746634", "0.47458917", "0.4731587", "0.47285128", "0.4728462", "0.47019297", "0.46738178", "0.46651825", "0.46579656", "0.46517384", "0.46486062", "0.4648384", "0.46377066", "0.46292397", "0.46263087", "0.46016318", "0.45975277", "0.45967382", "0.45901135", "0.45837587", "0.45748332", "0.45745614", "0.45457208", "0.45425373", "0.4539839", "0.45378953", "0.4534552", "0.45323947", "0.44856772", "0.4437109", "0.44298336", "0.4415657", "0.4414741", "0.44132158", "0.44037345", "0.44033006", "0.44005507", "0.44005507", "0.44005507", "0.4392923", "0.43816966", "0.4380282", "0.43778735", "0.4370531", "0.43694538" ]
0.653043
0
Sets the IAM Policy for a resource
public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "public com.amazon.s3.SetBucketAccessControlPolicyResponse setBucketAccessControlPolicy(com.amazon.s3.SetBucketAccessControlPolicy setBucketAccessControlPolicy);", "public void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>\n setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request);\n }", "public com.amazon.s3.SetObjectAccessControlPolicyResponse setObjectAccessControlPolicy(com.amazon.s3.SetObjectAccessControlPolicy setObjectAccessControlPolicy);", "public void setPolicy(com.vmware.converter.DVSPolicy policy) {\r\n this.policy = policy;\r\n }", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "default void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSetIamPolicyMethod(), responseObserver);\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "public void setPolicy(String policy) {\r\n if (policy != null && !policy.equals(\"\")) {\r\n String[] rules = policy.trim().split(\",\");\r\n if (rules != null && rules.length > 0) {\r\n emptyPolicy();\r\n \r\n for (String s : rules) {\r\n addRule(new AccessRule(s));\r\n }\r\n }\r\n }\r\n }", "public String setPolicy(String asgName, String policyName, int capacity,\n\t\t\tString adjustmentType) {\n\t\t// asClient.setRegion(usaRegion);\n\t\tPutScalingPolicyRequest request = new PutScalingPolicyRequest();\n\n\t\trequest.setAutoScalingGroupName(asgName);\n\t\trequest.setPolicyName(policyName); // This scales up so I've put up at\n\t\t\t\t\t\t\t\t\t\t\t// the end.\n\t\trequest.setScalingAdjustment(capacity); // scale up by specific capacity\n\t\trequest.setAdjustmentType(adjustmentType);\n\n\t\tPutScalingPolicyResult result = asClient.putScalingPolicy(request);\n\t\tString arn = result.getPolicyARN(); // You need the policy ARN in the\n\t\t\t\t\t\t\t\t\t\t\t// next step so make a note of it.\n\n\t\tEnableMetricsCollectionRequest request1 = new EnableMetricsCollectionRequest()\n\t\t\t\t.withAutoScalingGroupName(asgName).withGranularity(\"1Minute\");\n\t\tEnableMetricsCollectionResult response1 = asClient\n\t\t\t\t.enableMetricsCollection(request1);\n\n\t\treturn arn;\n\t}", "public void setPolicyArn(String policyArn) {\n this.policyArn = policyArn;\n }", "public void setPolicy(String policyName, TPPPolicy tppPolicy) throws VCertException {\n if (!policyName.startsWith(TppPolicyConstants.TPP_ROOT_PATH))\n policyName = TppPolicyConstants.TPP_ROOT_PATH + policyName;\n\n tppPolicy.policyName( policyName );\n\n //if the policy doesn't exist\n if(!TppConnectorUtils.dnExist(policyName, tppAPI)){\n\n //verifying that the policy's parent exists\n String parentName = tppPolicy.getParentName();\n if(!parentName.equals(TppPolicyConstants.TPP_ROOT_PATH) && !TppConnectorUtils.dnExist(parentName, tppAPI))\n throw new VCertException(String.format(\"The policy's parent %s doesn't exist\", parentName));\n\n //creating the policy\n TppConnectorUtils.createPolicy( policyName, tppAPI );\n } else\n TppConnectorUtils.resetAttributes(policyName, tppAPI);\n\n //creating policy's attributes.\n TppConnectorUtils.setPolicyAttributes(tppPolicy, tppAPI);\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "protected void setAccessPolicies(Map<String, PolicyDocument> policies)\n {\n policies.put(\"GlueAthenaS3AccessPolicy\", getGlueAthenaS3AccessPolicy());\n policies.put(\"S3SpillBucketAccessPolicy\", getS3SpillBucketAccessPolicy());\n connectorAccessPolicy.ifPresent(policyDocument -> policies.put(\"ConnectorAccessPolicy\", policyDocument));\n }", "public void setResource(int newResource) throws java.rmi.RemoteException;", "public void setRWResource(RWResource theResource) {\n resource = theResource;\n }", "public void setPolicyLine(java.lang.String value);", "@Test\n public void testSetPolicy2() throws Exception {\n setupPermission(PathUtils.ROOT_PATH, getTestUser().getPrincipal(), true, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n setupPermission(null, getTestUser().getPrincipal(), true, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n\n setupPermission(getTestRoot(), null, EveryonePrincipal.getInstance(), false, JCR_NAMESPACE_MANAGEMENT);\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public synchronized void setEvictionPolicy(EvictionPolicy policy)\n {\n int nType = (policy == null ? EVICTION_POLICY_HYBRID\n : EVICTION_POLICY_EXTERNAL);\n configureEviction(nType, policy);\n }", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public void setPolicyURL(java.lang.String policyURL) {\n this.policyURL = policyURL;\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "protected void checkSetPolicyPermission() {\n\tSecurityManager sm = System.getSecurityManager();\n\tif (sm != null) {\n\t if (setPolicyPermission == null) {\n\t\tsetPolicyPermission = new java.security.SecurityPermission(\"setPolicy\");\n\t }\n\t sm.checkPermission(setPolicyPermission);\n\t}\n }", "public void setResource(ResourceInfo resource) {\n\t\tif (this.resource != null) {\n\t\t\tthrow new IllegalStateException(\"The resource pointer can only be set once for Resource [\" + name + \"]\");\n\t\t}\n\t\tthis.resource = resource;\n\t}", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "void clearPolicy() {\n policy = new Policy();\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "protected void setResource(final Resource resource) {\n this.resource = resource;\n }", "void setResourceID(String resourceID);", "public void setPolicyType(Enumerator newValue);", "@Override\n public void replaceAllItemPolicies(Context context, Item item, List<ResourcePolicy> newpolicies) throws SQLException,\n AuthorizeException\n {\n // remove all our policies, add new ones\n authorizeService.removeAllPolicies(context, item);\n authorizeService.addPolicies(context, newpolicies, item);\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}", "public void setScalePolicy(ScalePolicy policy) {\n\n\t}", "public static void apiManagementCreateProductPolicy(\n com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {\n manager\n .productPolicies()\n .createOrUpdateWithResponse(\n \"rg1\",\n \"apimService1\",\n \"5702e97e5157a50f48dce801\",\n PolicyIdName.POLICY,\n new PolicyContractInner()\n .withValue(\n \"<policies>\\r\\n\"\n + \" <inbound>\\r\\n\"\n + \" <rate-limit calls=\\\"{{call-count}}\\\" renewal-period=\\\"15\\\"></rate-limit>\\r\\n\"\n + \" <log-to-eventhub logger-id=\\\"16\\\">\\r\\n\"\n + \" @( string.Join(\\\",\\\", DateTime.UtcNow,\"\n + \" context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress,\"\n + \" context.Operation.Name) ) \\r\\n\"\n + \" </log-to-eventhub>\\r\\n\"\n + \" <quota-by-key calls=\\\"40\\\" counter-key=\\\"cc\\\" renewal-period=\\\"3600\\\"\"\n + \" increment-count=\\\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\\\" />\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </inbound>\\r\\n\"\n + \" <backend>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </backend>\\r\\n\"\n + \" <outbound>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </outbound>\\r\\n\"\n + \"</policies>\")\n .withFormat(PolicyContentFormat.XML),\n null,\n com.azure.core.util.Context.NONE);\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public FractalTrace setAbyssPolicy(String value)\n {\n\t\n m_AbyssPolicy = value;\n setProperty(\"abyss-policy\", value);\n return this;\n }", "void register(PolicyDefinition policyDefinition);", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void updatePolicy(CompanyPolicy cP ) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, cP.getPolicyNo());\n\t\t//Update fields which are allowed to modify\n\t\tcPolicy.setPolicyTag1(cP.getPolicyTag1());\n\t\tcPolicy.setPolicyTag2(cP.getPolicyTag2());\n\t\tcPolicy.setPolicyDesc(cP.getPolicyDesc());\n\t\tcPolicy.setPolicyDoc(cP.getPolicyDoc());\n\t\tsession.update(cPolicy); \n\t\ttx.commit();\n\t}", "@Override\r\n\tpublic void setGiveResource(ResourceType resource) {\n\t\t\r\n\t}", "@Override\r\n public void setImageResource(int resourceId)\r\n {\r\n new LoadResourceTask().execute(resourceId);\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public void setPolicyEffectiveDate(java.lang.String policyEffectiveDate) {\n this.policyEffectiveDate = policyEffectiveDate;\n }", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setDefaultPolicy(Policy defaultPolicy) {\n\t\tif (defaultPolicy == null)\n\t\t\tthrow new NullPointerException();\n\t\tthis.defaultPolicy = defaultPolicy;\n\t}", "public SharedActivationPolicyPermission(String policy) {\n\tthis(policy, init(policy));\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request, responseObserver);\n }", "public ActiveIAMPolicyAssignment withPolicyArn(String policyArn) {\n setPolicyArn(policyArn);\n return this;\n }", "@Override\n\tpublic void setResourcePrimKey(long resourcePrimKey) {\n\t\t_changesetEntry.setResourcePrimKey(resourcePrimKey);\n\t}", "public LinkedIntegrationRuntimeRbacAuthorization setResourceId(String resourceId) {\n this.resourceId = resourceId;\n return this;\n }", "public void setLoadBalancerPolicy(String loadBalancerPolicy) {\n this.loadBalancerPolicy = loadBalancerPolicy;\n }", "public EditPolicy() {\r\n super();\r\n }", "@Nullable\n public ManagedAppPolicy put(@Nonnull final ManagedAppPolicy newManagedAppPolicy) throws ClientException {\n return send(HttpMethod.PUT, newManagedAppPolicy);\n }", "public int setCurrentResource(final Resource newResource) {\n currentSpinePos = book.getSpine().getResourceIndex(newResource);\n currentResource = newResource;\n return currentSpinePos;\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public MonitoringPoliciesResponse updateMonitoringPolicyProcess(UpdateMPProcessesRequest object, String policyId, String processId) throws RestClientException, IOException {\n return client.update(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), object, MonitoringPoliciesResponse.class, 202);\n }", "public DistributionPolicyInternal setName(String name) {\n this.name = name;\n return this;\n }", "public Object\n _set_policy_override(Policy[] policies,\n SetOverrideType set_add) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "public void initResourceOfPlayer(Resource resource) throws IOException, InterruptedException {\n try {\n\n currentPlayer.initResource(resource);\n } catch (CallForCouncilException e) {\n exceptionHandler(e);\n } catch (LastSpaceReachedException e) {\n exceptionHandler(e);\n }\n currentPlayer.setInitResource(true);\n notifyToOneObserver(new UpdateInitResourceMessage(resource));\n notifyAllObserverLessOne(new UpdateForNotCurrentResourceMessage(resource));\n\n\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdPut(String policyId, String contentType,\n AdvancedThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n\n //overridden parameters\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n apiProvider.updatePolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void giveResourcesToPlayer(Resource resource){\n resources.addResource(resource);\n }", "public Optional<CancellationPolicy> updatePolicy(long policyId, CancellationPolicy editedPolicy) throws Exception{\n Optional<CancellationPolicy> updatedPolicy = cancellationPolicyRepository.findById(policyId).map((selectedPolicy) -> {\n selectedPolicy.getRules().clear();\n selectedPolicy.getRules().addAll(editedPolicy.getRules());\n selectedPolicy.getRules().forEach((rule) -> {\n rule.setPolicy(editedPolicy);\n });\n selectedPolicy.setPolicyId(editedPolicy.getPolicyId());\n selectedPolicy.setPolicyName(editedPolicy.getPolicyName());\n selectedPolicy.setPolicySource(editedPolicy.getPolicySource());\n selectedPolicy.setPolicyDescription(editedPolicy.getPolicyDescription());\n selectedPolicy.setPolicyUpdatedBy(editedPolicy.getPolicyUpdatedBy());\n selectedPolicy.setPolicyUpdatedOn();\n selectedPolicy.setPolicyCancelRestrictionDays(editedPolicy.getPolicyCancelRestrictionDays());\n selectedPolicy.setPolicyCancelRestrictionHours(editedPolicy.getPolicyCancelRestrictionHours());\n return cancellationPolicyRepository.save(selectedPolicy);\n });\n return updatedPolicy;\n }", "@Override\n\tprotected void createEditPolicies()\n\t{\n\t\t\n\t}", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "protected ValidatableResponse updateResource(String path, JSONObject newResource) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .contentType(ContentType.JSON)\n .body(newResource.toString())\n .when()\n .put(path)\n .then()\n .statusCode(204);\n }", "public void setStrategyResource(String strategyResource) {\n this.strategyResource = strategyResource;\n }", "@JsonProperty(\"resource\")\n public void setResource(String resource) {\n this.resource = resource;\n }", "public void setResource(URI resource) {\n this.resource = resource;\n }", "public void setPolicyGroupName(String policyGroupName)\n {\n \tthis.policyGroupName = policyGroupName;\n }", "PolicyController createPolicyController(String name, Properties properties);", "public void setContainerPolicy(ContainerPolicy containerPolicy) {\n this.containerPolicy = containerPolicy;\n }", "public void setResourceTo(ServiceCenterITComputingResource newResourceTo) {\n addPropertyValue(getResourcesProperty(), newResourceTo);\r\n }", "public boolean setRateLimit (String sliceName, String rate) \n\t\t\tthrows PermissionDeniedException;", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "AgentPolicyBuilder setJobPriority(JobPriority jobPriority);", "public PolicyIDImpl(String idString) {\n super(idString);\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateChannelPolicyMethod(), responseObserver);\n }", "@Override\n public void replaceAllBitstreamPolicies(Context context, Item item, List<ResourcePolicy> newpolicies)\n throws SQLException, AuthorizeException\n {\n // remove all policies from bundles, add new ones\n // Remove bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n bundleService.replaceAllBitstreamPolicies(context, mybundle, newpolicies);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "public void setNatPolicy(NatPolicy policy);", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public lnrpc.Rpc.PolicyUpdateResponse updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request) {\n return blockingUnaryCall(\n getChannel(), getUpdateChannelPolicyMethod(), getCallOptions(), request);\n }", "public AssignTagTabItem(Resource resource){\n\t\tthis.resource = resource;\n\t\tthis.resourceId = resource.getId();\n\t}", "public void setRating(Rating rating) {\n double boundedRating = this.boundedRating(rating);\n this.normalisedRating = this.normaliseRating(boundedRating);\n this.ratingCount++;\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }" ]
[ "0.66972566", "0.6082597", "0.6077283", "0.58559775", "0.5677932", "0.5533153", "0.55294746", "0.54336023", "0.54295254", "0.5386457", "0.5322885", "0.5307284", "0.5242436", "0.50387615", "0.5026891", "0.50065285", "0.49567696", "0.49369815", "0.49298045", "0.4895639", "0.48891863", "0.48862508", "0.48624665", "0.48426878", "0.48366866", "0.48312998", "0.48273727", "0.48075646", "0.47941887", "0.47936183", "0.47679532", "0.47602433", "0.47508904", "0.47296184", "0.46621573", "0.46162933", "0.45881912", "0.4579893", "0.4577294", "0.45694926", "0.4552101", "0.45490006", "0.45384145", "0.4532844", "0.45296696", "0.45157316", "0.4507783", "0.44923484", "0.44883838", "0.44883838", "0.44874197", "0.44849795", "0.4479074", "0.4472625", "0.4464273", "0.4445344", "0.44427216", "0.44418812", "0.4432885", "0.4429717", "0.44274044", "0.44241577", "0.44066086", "0.44009677", "0.43787515", "0.4372247", "0.43720973", "0.4356897", "0.43564215", "0.4355487", "0.435446", "0.43498212", "0.4349567", "0.43441963", "0.43313757", "0.43304297", "0.4317681", "0.43174452", "0.431093", "0.430341", "0.42971444", "0.4296209", "0.4292298", "0.4277988", "0.4277988", "0.4277988", "0.427148", "0.42690822", "0.42557612", "0.4251575", "0.4238082", "0.42305496", "0.42201197", "0.42008317", "0.42004794", "0.41995704", "0.4199074", "0.41974437", "0.41969106", "0.4195941" ]
0.603994
3
Tests IAM permissions for a resource (namespace, service or service workload only).
public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasResourceActionAllowPermissions(Resource resource,\n String action) {\n String whereClause = \"p.resource = :resource AND (\"\n + \"(p.action = :action AND p.type = :typeAllow) OR \"\n + \"(p.type = :typeAllowAll))\";\n Map<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"resource\", resource.getIdentifier());\n parameters.put(\"action\", action);\n parameters.put(\"typeAllow\", PermissionType.ALLOW);\n parameters.put(\"typeAllowAll\", PermissionType.ALLOW_ALL);\n\n Long count = FacadeFactory.getFacade().count(PermissionEntity.class,\n whereClause, parameters);\n\n return count > 0 ? true : false;\n }", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "public int getPermission(Integer resourceId);", "public void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}", "public boolean checkPermissions(String account,String group, String resource, String action)\n throws Exception\n {\n return checkPermissions(new PolicyCredentials(account,group),resource,action);\n }", "@Test\n public void testJdoeAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/jdoe\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"jdoe\");\n\n // jdoe can access information about alice because he is granted with \"people-manager\" role\n response = makeRequest(\"http://localhost:8080/api/alice\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"alice\");\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "default void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getTestIamPermissionsMethod(), responseObserver);\n }", "public boolean checkPermissions(PolicyCredentials credentials, String resource, String action) throws Exception {\n //\n // Set our permissions to null.\n perm = null ;\n //\n // Check if we have a service reference.\n if (null != service)\n {\n perm = service.checkPermissions(credentials,resource,action);\n }\n //\n // Return true if we got a result, and the permissions are valid.\n return (null != perm) ? perm.isValid() : false ;\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.iam.v1.TestIamPermissionsResponse>\n testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request);\n }", "@Test\n\tpublic void testIsPermitted_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isHasPermissions();", "void checkPermission(T request) throws AuthorizationException;", "@Test\n\tpublic void testIsPermitted_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isWritePermissionGranted();", "@Test\n public void testWithExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n AuthorizationResponse response = authzClient.authorization(\"marta\", \"password\", \"foo\")\n .authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource A with client scope bar.\n request = new PermissionRequest(\"Resource A\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource B with client scope bar.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n }", "@Test\n\tpublic void testIsPermitted_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = null;\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "public boolean checkPermission(Permission permission);", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target,\n IPermissionPolicy policy)\n throws AuthorizationException;", "@Test\n public void testWithoutExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"baz\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n\n // Access Resource B with client scope foo.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"foo\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n }", "@Test\n public void testCheckExistsPermission() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE\");\n assertFalse(permissionManager.checkExists(permission2));\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Test\n\tpublic void testIsPermitted_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permissions[] getPermissionsNeeded(ContainerRequestContext context) throws Exception {\n Secured auth = resourceInfo.getResourceMethod().getAnnotation(Secured.class);\n\n // If there's no authentication required on method level, check class level.\n if (auth == null) {\n auth = resourceInfo.getResourceClass().getAnnotation(Secured.class);\n }\n\n // Else, there's no permission required, thus we chan continue;\n if (auth == null) {\n log.log(Level.INFO, \"AUTHENTICATION: Method: \" + context.getMethod() + \", no permission required\");\n return new Permissions[0];\n }\n\n return auth.value();\n }", "public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}", "public abstract boolean checkRolesAllowed(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "@Test\n\tpublic void testIsPermitted_7()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n public void testDenyAccessWithRoleCondition() {\n denyAccessWithRoleCondition(false);\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "boolean hasPermission(final Player sniper, final String permission);", "@Test\n\tpublic void testCheckPermissions_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "Resource getAbilityResource();", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;", "public boolean hasPermission(Context paramContext, String paramString) {\n }", "@Test\n\tpublic void testCheckPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test(expected = org.jsecurity.authz.UnauthorizedException.class)\n\tpublic void testCheckPermission_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void testCheckExistsPermissionWithString() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE2\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission.getName()));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE2\");\n assertFalse(permissionManager.checkExists(permission2.getName()));\n }", "@Test\n\tpublic void testIsPermitted_8()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(null);\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void testIsPermitted_9()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void testGetSetPermission() throws Exception {\n\t Namespace n = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t n.getItem();\n\t String newName = UUID.randomUUID().toString();\n\t Namespace newNamespace = n.createNamespace(newName, \"Created for the purposes of testing\");\n\t // Lets set a strange permission on the namespace so we know what we're checking when \n\t // we get it back\n\t Permission p = new Permission(Policy.OPEN, new String[]{\"fluiddb\"});\n\t newNamespace.setPermission(Namespace.Actions.CREATE, p);\n\t \n\t // OK... lets try getting the newly altered permission back\n\t Permission checkP = newNamespace.getPermission(Namespace.Actions.CREATE);\n\t assertEquals(p.GetPolicy(), checkP.GetPolicy());\n\t assertEquals(p.GetExceptions()[0], checkP.GetExceptions()[0]);\n\t \n\t // Housekeeping to clean up after ourselves...\n\t newNamespace.delete();\n\t}", "@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "public abstract boolean canEditAccessRights(OwObject object_p) throws Exception;", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "@Test\n public void testGetPermissionInstance() throws Exception\n {\n permission = permissionManager.getPermissionInstance();\n assertNotNull(permission);\n assertTrue(permission.getName() == null);\n }", "@Test\n\tpublic void testGetPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;", "@Test\n\tpublic void testCheckPermission_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testGetPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public static boolean isReadStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "void permissionGranted(int requestCode);", "@Test\n\tpublic void testIsPermittedAll_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n public void testRequestGrantedPermission() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // Request the permission and allow it\n BasePermissionActivity.Result firstResult = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(firstResult, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Request the permission and do nothing\n BasePermissionActivity.Result secondResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 1,\n BasePermissionActivity.class, null);\n\n // Expect the permission is granted\n assertPermissionRequestResult(secondResult, REQUEST_CODE_PERMISSIONS + 1,\n permissions, new boolean[] {true});\n }", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "@Override\n public void checkPermission(Permission perm) {\n }", "boolean memberHasPermission(String perm, Member m);", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "private boolean checkReadOnlyAndNull(Shell shell, IResource currentResource)\n\t{\n\t\t// Do a quick read only and null check\n\t\tif (currentResource == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do a quick read only check\n\t\tfinal ResourceAttributes attributes = currentResource\n\t\t\t\t.getResourceAttributes();\n\t\tif (attributes != null && attributes.isReadOnly())\n\t\t{\n\t\t\treturn MessageDialog.openQuestion(shell, Messages.RenameResourceAction_checkTitle,\n\t\t\t\t\tMessageFormat.format(Messages.RenameResourceAction_readOnlyCheck, new Object[]\n\t\t\t\t\t\t{ currentResource.getName() }));\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }", "private void usersCheckPermission(PermissionRequest.ActionType grantedAction, IEntity entity)\n {\n authGrantedUser();\n try {\n executeAction(grantedAction, entity);\n } catch (AccessDeniedException e) {\n fail(\"Action \" + grantedAction.name() + \" was granted but could not be executed \" + entity.getEntityName());\n }\n\n authNotGrantedUser();\n try {\n executeAction(grantedAction, entity);\n fail(\"Action \" + grantedAction.name() + \" was not granted but could be executed \" + entity.getEntityName());\n } catch (AccessDeniedException e) {\n //\n }\n }", "@Test\n\tpublic void testIsPermittedAll_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public interface IPermissions {\n}", "@Override\n\tpublic void authorize(String resourceName, String action, String rpcName)\n\t\t\tthrows Exception {\n\t}", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "@Test\n\tpublic void testIsPermittedAll_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "@Test\n\tpublic void testIsPermitted_6()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private static boolean isPermissionGranted(Context context, String permission) {\n if (ContextCompat.checkSelfPermission(context, permission)\n == PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG, permission + \" granted\");\n return true;\n }\n Log.i(TAG, permission + \" not granted yet\");\n return false;\n }", "@Override\n\tpublic boolean hasPermission(String string) {\n\t\treturn true;\n\t}", "@Test\n public void testDenyAccessWithNegateRoleCondition() {\n denyAccessWithRoleCondition(true);\n }", "@Test\n public void testPermissions() throws IOException {\n Note note = notebook.createNote(\"note1\", anonymous);\n NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();\n // empty owners, readers or writers means note is public\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n notebookAuthorization.setOwners(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n notebookAuthorization.setReaders(note.getId(), new HashSet(Arrays.asList(\"user1\", \"user2\")));\n notebookAuthorization.setRunners(note.getId(), new HashSet(Arrays.asList(\"user3\")));\n notebookAuthorization.setWriters(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), false);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user3\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n // Test clearing of permissions\n notebookAuthorization.setReaders(note.getId(), Sets.<String>newHashSet());\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), true);\n notebook.removeNote(note.getId(), anonymous);\n }", "abstract public void getPermission();", "public boolean checkReadPermission(final String bucket_path) {\r\n\t\t\treturn checkReadPermission(BeanTemplateUtils.build(DataBucketBean.class).with(DataBucketBean::full_name, bucket_path).done().get());\r\n\t\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "@Test(dependsOnMethods = {\"modifyResource\"})\n public void modifyNotExistingResource() throws Exception {\n showTitle(\"modifyNotExistingResource\");\n\n try {\n UmaResource resource = new UmaResource();\n resource.setName(\"Photo Album 3\");\n resource.setIconUri(\"http://www.example.com/icons/flower.png\");\n resource.setScopes(Arrays.asList(\"http://photoz.example.com/dev/scopes/view\", \"http://photoz.example.com/dev/scopes/all\"));\n\n getResourceService().updateResource(\"Bearer \" + pat.getAccessToken(), \"fake_resource_id\", resource);\n } catch (ClientErrorException ex) {\n System.err.println(ex.getResponse().readEntity(String.class));\n int status = ex.getResponse().getStatus();\n assertTrue(status != Response.Status.OK.getStatusCode(), \"Unexpected response status\");\n }\n }", "int getPermissionRead();", "@Override\n public void checkPermission(final Permission permission) {\n List<Class> stack = Arrays.asList(getClassContext());\n\n // if no blacklisted classes are in the stack (or not recursive)\n if (stack.subList(1, stack.size()).contains(getClass()) || Collections.disjoint(stack, classBlacklist)) {\n // allow everything\n return;\n }\n // if null/custom and blacklisted classes present, something tried to access this class\n if (permission == null || permission instanceof StudentTesterAccessPermission) {\n throw new SecurityException(\"Security check failed.\");\n }\n // else iterate over all active policies and call their respective methods\n PermissionContext pc = new PermissionContext(stack, permission, instance);\n for (var policy : policies) {\n try {\n policy.getConsumer().accept(pc);\n } catch (SecurityException e) {\n triggered = true;\n // Illegal attempt caught, log an error or do smth\n LOG.severe(String.format(\"Illegal attempt caught: %s\", permission.toString()));\n throw e;\n }\n\n }\n }", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "@Test\n public void testMatchValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n assertTrue(\"no match\", filter.isResourceAccess(mtch));\n }", "@Test\n\tpublic void testIsPermittedAll_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public interface TestService {\n// @PreAuthorize(\"hasAuthority('test')\")\n String test();\n}", "public interface RuntimePermissionRequester {\n /**\n * Asks user for specific permissions needed to proceed\n *\n * @param requestCode Request permission using this code, allowing for\n * callback distinguishing\n */\n void requestNeededPermissions(int requestCode);\n}", "boolean isPermissionsReviewRequired(@NonNull String packageName,\n @UserIdInt int userId);", "public static boolean isWriteStorageAllowed(FragmentActivity act) {\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "PermissionService getPermissionService();", "public interface PermissionsInstance {\n\n\t/**\n\t * Check whether the specified member has permission for the following action\n\t * @param perm The permission name\n\t * @param m The member\n\t * @return True, if the member can do the action\n\t */\n\tboolean memberHasPermission(String perm, Member m);\n\t\n}", "boolean needsStoragePermission();", "public static void checkPermission(com.tangosol.net.Cluster cluster, String sServiceName, String sCacheName, String sAction)\n {\n // import com.tangosol.net.ClusterPermission;\n // import com.tangosol.net.security.Authorizer;\n // import com.tangosol.net.security.DoAsAction;\n // import java.security.AccessController;\n // import javax.security.auth.Subject;\n \n Authorizer authorizer = getAuthorizer();\n Security security = Security.getInstance();\n \n if (authorizer == null && security == null)\n {\n return;\n }\n \n _assert(sServiceName != null, \"Service must be specified\");\n \n String sTarget = \"service=\" + sServiceName +\n (sCacheName == null ? \"\" : \",cache=\" + sCacheName);\n ClusterPermission permission = new ClusterPermission(cluster == null || !cluster.isRunning() ? null :\n cluster.getClusterName(), sTarget, sAction);\n Subject subject = null;\n \n if (authorizer != null)\n {\n subject = authorizer.authorize(subject, permission);\n }\n \n if (security != null)\n {\n Security.CheckPermissionAction action = new Security.CheckPermissionAction();\n action.setCluster(cluster);\n action.setPermission(permission);\n action.setSubject(subject);\n action.setSecurity(security);\n \n AccessController.doPrivileged(new DoAsAction(action));\n }\n }", "void requestNeededPermissions(int requestCode);", "@Override\n public boolean hasPermission(User user, E entity, Permission permission) {\n\n // always grant READ access (\"unsecured\" object)\n if (permission.equals(Permission.READ)) {\n logger.trace(\"Granting READ access on \" + entity.getClass().getSimpleName() + \" with ID \" + entity.getId());\n return true;\n }\n\n // call parent implementation\n return super.hasPermission(user, entity, permission);\n }", "int getPermissionWrite();", "public boolean hasPermission(T object, Permission permission, User user);", "@Test\n public void testRuntimeGroupGrantSpecificity() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // request only one permission from the 'contacts' permission group\n BasePermissionActivity.Result result = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class,\n () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(result, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Make sure no undeclared as used permissions are granted\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n }" ]
[ "0.6261043", "0.61454374", "0.6058891", "0.6053727", "0.588256", "0.58370954", "0.58271414", "0.5738642", "0.5705868", "0.5687195", "0.5655212", "0.564622", "0.5643899", "0.56052226", "0.5574267", "0.55647254", "0.5553965", "0.5548117", "0.55278766", "0.55039346", "0.54988277", "0.5493292", "0.5480947", "0.54665464", "0.5438759", "0.5432505", "0.54317224", "0.5431594", "0.54281914", "0.54240763", "0.54229283", "0.5418605", "0.5416299", "0.53854", "0.5357376", "0.5350564", "0.53443384", "0.5341139", "0.5331588", "0.5331111", "0.53214407", "0.53018284", "0.52740645", "0.52676076", "0.52541393", "0.5241883", "0.5235416", "0.5235196", "0.5230971", "0.5224239", "0.52221537", "0.5210682", "0.5203746", "0.5196723", "0.51881456", "0.51843935", "0.5183511", "0.51833254", "0.51771665", "0.5176392", "0.516536", "0.51602", "0.5156375", "0.51415545", "0.51391876", "0.5138623", "0.51369303", "0.51357", "0.5123604", "0.5118148", "0.5112821", "0.5108848", "0.5100084", "0.5091529", "0.5085228", "0.50825745", "0.50717336", "0.5071612", "0.5069599", "0.50563586", "0.50528973", "0.50452113", "0.5040492", "0.50381434", "0.5028459", "0.5027996", "0.5020994", "0.50146323", "0.50091636", "0.5003251", "0.49971446", "0.49968886", "0.49912453", "0.49909827", "0.49857795", "0.49822792", "0.49755862", "0.49740094", "0.496967", "0.4967643" ]
0.6044457
4
Creates a namespace, and returns the new namespace.
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.servicedirectory.v1beta1.Namespace> createNamespace(com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.cloud.servicedirectory.v1beta1.Namespace createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateNamespaceMethod(), getCallOptions(), request);\n }", "public static NamespaceContext create() {\n return new NamespaceContext();\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "public void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "protected NamespaceStack createNamespaceStack() {\r\n // actually returns a XMLOutputter.NamespaceStack (see below)\r\n return new NamespaceStack();\r\n }", "default void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateNamespaceMethod(), responseObserver);\n }", "abstract XML addNamespace(Namespace ns);", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public String createNamespace(IProject p, String ns) throws ThinklabException {\r\n \t\t\t\t\r\n \t\tFile ret = new File(getSourceDirectory() + File.separator + \r\n \t\t\t\t\t\t\tns.replace('.', File.separatorChar) + \".tql\");\r\n \t\tFile dir = new File(MiscUtilities.getFilePath(ret.toString()));\r\n \t\t\r\n \t\ttry {\r\n \t\t\tdir.mkdirs();\r\n \t\t\tPrintWriter out = new PrintWriter(ret);\r\n \t\t\tout.println(\"namespace \" + ns + \";\\n\");\r\n \t\t\tout.close();\r\n \t\t} catch (Exception e) {\r\n \t\t\tthrow new ThinklabClientException(e);\r\n \t\t}\r\n \t\t\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}", "Namespaces namespaces();", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "void setNamespace(java.lang.String namespace);", "public static IRIRewriter createNamespaceBased(\n\t\t\tfinal String originalNamespace, final String rewrittenNamespace) {\n\t\tif (originalNamespace.equals(rewrittenNamespace)) {\n\t\t\treturn identity;\n\t\t}\n\t\tif (originalNamespace.startsWith(rewrittenNamespace) ||\n\t\t\t\trewrittenNamespace.startsWith(originalNamespace)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Cannot rewrite overlapping namespaces, \" + \n\t\t\t\t\t\"this would be ambiguous: \" + originalNamespace + \n\t\t\t\t\t\" => \" + rewrittenNamespace);\n\t\t}\n\t\treturn new IRIRewriter() {\n\t\t\t@Override\n\t\t\tpublic String rewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\treturn rewrittenNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\toriginalNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't rewrite already rewritten IRI: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic String unrewrite(String absoluteIRI) {\n\t\t\t\tif (absoluteIRI.startsWith(rewrittenNamespace)) {\n\t\t\t\t\treturn originalNamespace + absoluteIRI.substring(\n\t\t\t\t\t\t\trewrittenNamespace.length());\n\t\t\t\t}\n\t\t\t\tif (absoluteIRI.startsWith(originalNamespace)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Can't unrewrite IRI that already is in the original namespace: \" + absoluteIRI);\n\t\t\t\t}\n\t\t\t\treturn absoluteIRI;\n\t\t\t}\n\t\t};\n\t}", "String getNamespace();", "String getNamespace();", "String getNamespace();", "void setNamespace(String namespace);", "public static NamespaceRegistrationTransactionFactory createRootNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final BigInteger duration) {\n NamespaceId namespaceId = NamespaceId.createFromName(namespaceName);\n return create(networkType, namespaceName,\n namespaceId, NamespaceRegistrationType.ROOT_NAMESPACE, Optional.of(duration), Optional.empty());\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public Namespace(String alias) {\n this(DSL.name(alias), NAMESPACE);\n }", "public Namespace(Name alias) {\n this(alias, NAMESPACE);\n }", "java.lang.String getNamespace();", "private NamespaceHelper() {}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "public XMLNamespaces() {\n this(libsbmlJNI.new_XMLNamespaces__SWIG_0(), true);\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function Attr createAttributeNS(String namespaceURI, String qualifiedName);", "public String getNamespace();", "protected MapNamespaceContext createNamespaceContext() {\r\n // create the xpath with fedora namespaces built in\r\n MapNamespaceContext nsc = new MapNamespaceContext();\r\n nsc.setNamespace(\"fedora-types\", \"http://www.fedora.info/definitions/1/0/types/\");\r\n nsc.setNamespace(\"sparql\", \"http://www.w3.org/2001/sw/DataAccess/rf1/result\");\r\n nsc.setNamespace(\"foxml\", \"info:fedora/fedora-system:def/foxml#\");\r\n nsc.setNamespace(\"rdf\", \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\r\n nsc.setNamespace(\"fedora\", \"info:fedora/fedora-system:def/relations-external#\");\r\n nsc.setNamespace(\"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\");\r\n nsc.setNamespace(\"fedora-model\", \"info:fedora/fedora-system:def/model#\");\r\n nsc.setNamespace(\"oai\", \"http://www.openarchives.org/OAI/2.0/\");\r\n nsc.setNamespace(\"oai_dc\", \"http://www.openarchives.org/OAI/2.0/oai_dc/\", \"http://www.openarchives.org/OAI/2.0/oai_dc.xsd\");\r\n nsc.setNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\"); \r\n nsc.setNamespace(\"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\r\n nsc.setNamespace(\"fedora-management\", \"http://www.fedora.info/definitions/1/0/management/\", \"http://www.fedora.info/definitions/1/0/datastreamHistory.xsd\");\r\n return nsc;\r\n }", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static NamespaceRegistrationTransactionFactory createSubNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId parentId) {\n NamespaceId namespaceId = NamespaceId\n .createFromNameAndParentId(namespaceName, parentId.getId());\n return create(networkType, namespaceName, namespaceId,\n NamespaceRegistrationType.SUB_NAMESPACE, Optional.empty(),\n Optional.of(parentId));\n }", "public NsNamespaces(Name alias) {\n this(alias, NS_NAMESPACES);\n }", "private void internalAddNamespace(NamespaceDefinition def) {\n String uri = def.getUri();\n String prefix = def.getPrefix();\n def.setIndex(m_container.getBindingRoot().\n getNamespaceUriIndex(uri, prefix));\n m_namespaces.add(def);\n m_uriMap.put(uri, def);\n }", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public NsNamespaces(String alias) {\n this(DSL.name(alias), NS_NAMESPACES);\n }", "public static Namespace getDefault() {\n if (instance == null) {\n new R_OSGiWSNamespace();\n }\n return instance;\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public static QualifiedName create(final String uri) {\n\t\tif (cache.containsKey(uri)) {\n\t\t\treturn cache.get(uri);\n\t\t} else {\n\t\t\tfinal QualifiedName qn = new QualifiedName(uri);\n\t\t\tcache.put(uri, qn);\n\t\t\treturn qn;\n\t\t}\n\t}", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "Rule PhpNamespace() {\n return Sequence(\n \"php_namespace\",\n Literal(),\n actions.pushPhpNamespaceNode());\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "Rule NamespaceScope() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n \"* \",\n \"cpp \",\n \"java \",\n \"py \",\n \"perl \",\n \"php \",\n \"rb \",\n \"cocoa \",\n \"csharp \"),\n actions.pushLiteralNode());\n }", "public Resource createFromNsAndLocalName(String nameSpace, String localName)\n\t{\n\t\treturn new ResourceImpl(model.getNsPrefixMap().get(nameSpace), localName);\n\t}", "public S create() {\n\t\tS style = createDefault();\n\t\tint id = nextID();\n\t\tstyle.setId(id);\n\t\taddStyle(style);\n\t\treturn style;\n\t}", "protected abstract void defineNamespace(int index, String prefix)\n throws IOException;", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "String getTargetNamespace();", "Package createPackage();", "private void addNamespace(ClassTree tree, GenerationContext<JS> context, List<JS> stmts) {\r\n\t\tElement type = TreeUtils.elementFromDeclaration(tree);\r\n\t\tif (JavaNodes.isInnerType(type)) {\r\n\t\t\t// this is an inner (anonymous or not) class - no namespace declaration is generated\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString namespace = context.getCurrentWrapper().getNamespace();\r\n\t\tif (!namespace.isEmpty()) {\r\n\t\t\tJavaScriptBuilder<JS> js = context.js();\r\n\t\t\tJS target = js.property(js.name(GeneratorConstants.STJS), \"ns\");\r\n\t\t\tstmts.add(js.expressionStatement(js.functionCall(target, Collections.singleton(js.string(namespace)))));\r\n\t\t}\r\n\t}", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "void declarePrefix(String prefix, String namespace);", "public String getNamespace() {\n return namespace;\n }", "public NamespaceContext getNamespaceContext() {\n LOGGER.entering(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\");\n NamespaceContext result = new JsonNamespaceContext();\n LOGGER.exiting(JsonXmlStreamReader.class.getName(), \"getNamespaceContext\", result);\n return result;\n }", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "Namespace getGpmlNamespace();", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public final void rule__AstNamespace__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3851:1: ( ( 'namespace' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3852:1: ( 'namespace' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3853:1: 'namespace'\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n match(input,53,FOLLOW_53_in_rule__AstNamespace__Group__1__Impl8326); \n after(grammarAccess.getAstNamespaceAccess().getNamespaceKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static LabelToNode createScopeByGraph() {\n return new LabelToNode(new GraphScopePolicy(), nodeAllocatorByGraph());\n }", "public TriGWriter getTriGWriter() {\n\t\tTriGWriter writer = new TriGWriter();\n\t\tMap map = this.getNsPrefixMap();\n\t\tfor (Object key : map.keySet()) {\n\t\t\twriter.addNamespace((String) key, (String) map.get(key));\n\t\t}\n\t\treturn writer;\n\t}", "Scope createScope();", "public final void rule__AstNamespace__NamespacesAssignment_4_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22720:1: ( ( ruleAstNamespace ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22721:1: ( ruleAstNamespace )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22722:1: ruleAstNamespace\n {\n before(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n pushFollow(FOLLOW_ruleAstNamespace_in_rule__AstNamespace__NamespacesAssignment_4_645513);\n ruleAstNamespace();\n\n state._fsp--;\n\n after(grammarAccess.getAstNamespaceAccess().getNamespacesAstNamespaceParserRuleCall_4_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "int getNamespaceUri();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespacePrefix(Object ns);", "public abstract INameSpace getNameSpace();", "public YANG_NameSpace getNameSpace() {\n\t\treturn namespace;\n\t}", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static Namespace valueOf( String namespaceName ) {\n return ( Namespace ) allowedValues.get( namespaceName.toLowerCase() );\n }", "String getNameSpace();", "public Element insertNamespaces(final Element element) throws Exception {\r\n\r\n element.setAttribute(\"xmlns:prefix-container\", Constants.NS_IR_CONTAINER);\r\n //element.setAttribute(\"xmlns:prefix-content-type\", CONTENT_TYPE_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-context\", Constants.NS_IR_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-dc\", Constants.NS_EXTERNAL_DC);\r\n element.setAttribute(\"xmlns:prefix-dcterms\", Constants.NS_EXTERNAL_DC_TERMS);\r\n element.setAttribute(\"xmlns:prefix-grants\", Constants.NS_AA_GRANTS);\r\n //element.setAttribute(\"xmlns:prefix-internal-metadata\", INTERNAL_METADATA_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-item\", Constants.NS_IR_ITEM);\r\n //element.setAttribute(\"xmlns:prefix-member-list\", MEMBER_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-member-ref-list\", MEMBER_REF_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadata\", METADATA_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadatarecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:escidocMetadataRecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:escidocComponents\", Constants.NS_IR_COMPONENTS);\r\n element.setAttribute(\"xmlns:prefix-organizational-unit\", Constants.NS_OUM_OU);\r\n //element.setAttribute(\"xmlns:prefix-properties\", PROPERTIES_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-schema\", SCHEMA_NS_URI); TODO: huh???\r\n element.setAttribute(\"xmlns:prefix-staging-file\", Constants.NS_ST_FILE);\r\n element.setAttribute(\"xmlns:prefix-user-account\", Constants.NS_AA_USER_ACCOUNT);\r\n element.setAttribute(\"xmlns:prefix-xacml-context\", Constants.NS_EXTERNAL_XACML_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-xacml-policy\", Constants.NS_EXTERNAL_XACML_POLICY);\r\n element.setAttribute(\"xmlns:prefix-xlink\", Constants.NS_EXTERNAL_XLINK);\r\n element.setAttribute(\"xmlns:prefix-xsi\", Constants.NS_EXTERNAL_XSI);\r\n return element;\r\n }", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "protected static void addOrUpdateNamespace(MasterProcedureEnv env, NamespaceDescriptor ns)\n throws IOException {\n getTableNamespaceManager(env).addOrUpdateNamespace(ns);\n }", "public static NamespaceRegistrationTransactionFactory create(\n final NetworkType networkType,\n final String namespaceName,\n final NamespaceId namespaceId,\n final NamespaceRegistrationType namespaceRegistrationType,\n final Optional<BigInteger> duration,\n final Optional<NamespaceId> parentId) {\n return new NamespaceRegistrationTransactionFactory(networkType, namespaceName, namespaceId,\n namespaceRegistrationType, duration, parentId);\n }", "Definition createDefinition();", "String getReferenceNamespace();", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@Fluent\npublic interface NamespaceAuthorizationRule extends\n AuthorizationRule<NamespaceAuthorizationRule>,\n Updatable<NamespaceAuthorizationRule.Update> {\n /**\n * @return the name of the parent namespace name\n */\n String namespaceName();\n\n /**\n * Grouping of Service Bus namespace authorization rule definition stages.\n */\n interface DefinitionStages {\n /**\n * The first stage of namespace authorization rule definition.\n */\n interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage<WithCreate> {\n }\n\n /**\n * The stage of the definition which contains all the minimum required inputs for\n * the resource to be created (via {@link WithCreate#create()}), but also allows\n * for any other optional settings to be specified.\n */\n interface WithCreate extends Creatable<NamespaceAuthorizationRule> {\n }\n }\n\n /**\n * The entirety of the namespace authorization rule definition.\n */\n interface Definition extends\n NamespaceAuthorizationRule.DefinitionStages.Blank,\n NamespaceAuthorizationRule.DefinitionStages.WithCreate {\n }\n\n /**\n * The entirety of the namespace authorization rule update.\n */\n interface Update extends\n Appliable<NamespaceAuthorizationRule>,\n AuthorizationRule.UpdateStages.WithListenOrSendOrManage<Update> {\n }\n}", "public String getNameSpace() {\n return this.namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public final void mT__51() throws RecognitionException {\n try {\n int _type = T__51;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:49:7: ( 'namespace' )\n // InternalSpeADL.g:49:9: 'namespace'\n {\n match(\"namespace\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static String copyNamespace(String absoluteName, String nonabsoluteName) {\r\n\t\tString namespace;\t\t\t\t//The namespace of the absolute name\r\n\t\t\r\n\t\tnamespace = absoluteName.replaceFirst(\"#.*\",\"\");\r\n\t\treturn namespace + \"#\" + nonabsoluteName;\r\n\t}", "public void addImpliedNamespace(NamespaceDefinition def) {\n if (!checkDuplicateNamespace(def)) {\n internalAddNamespace(def);\n }\n }", "private String getNamespace(int endIndex) {\n return data.substring(tokenStart, endIndex);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "public String generate(String namespace) {\n return generate(namespace, Http.Context.current().lang());\n }", "public void addNamespace(NamespaceDefinition def) {\n \n // override prior defaults with this namespace definition\n if (def.isAttributeDefault()) {\n m_attributeDefault = def;\n }\n if (def.isElementDefault()) {\n m_elementDefault = def;\n }\n if (checkDuplicateNamespace(def)) {\n \n // replace current definition for URI if this one sets defaults\n if (def.isAttributeDefault() || def.isElementDefault()) {\n NamespaceDefinition prior =\n (NamespaceDefinition)m_uriMap.put(def.getUri(), def);\n def.setIndex(prior.getIndex());\n if (m_overrideMap == null) {\n m_overrideMap = new HashMap();\n }\n m_overrideMap.put(def, prior);\n }\n \n } else {\n \n // no conflicts, add it\n internalAddNamespace(def);\n \n }\n }", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "public String getNamespaceName() {\n return namespaceName;\n }", "STYLE createSTYLE();", "private static java.lang.String generatePrefix(java.lang.String namespace) {\r\n if(namespace.equals(\"http://www.huawei.com.cn/schema/common/v2_1\")){\r\n return \"ns1\";\r\n }\r\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }" ]
[ "0.7332661", "0.7194925", "0.6678302", "0.644852", "0.62807053", "0.62265384", "0.6089985", "0.60334986", "0.6017283", "0.59845275", "0.5964459", "0.59290665", "0.5918809", "0.5888413", "0.5888413", "0.5888413", "0.5875721", "0.5865086", "0.58157533", "0.57918644", "0.5751436", "0.5737745", "0.5723411", "0.56749195", "0.56402475", "0.56006414", "0.5594299", "0.5497794", "0.5482895", "0.5476551", "0.54651266", "0.54543525", "0.54297787", "0.5385338", "0.5381896", "0.5367066", "0.53631496", "0.53539044", "0.5330263", "0.53065383", "0.5298894", "0.5295653", "0.52706194", "0.5264112", "0.5260354", "0.5249025", "0.52472746", "0.52422523", "0.52268916", "0.5220207", "0.52026373", "0.5200347", "0.5200233", "0.5197081", "0.5167397", "0.5072993", "0.5051229", "0.50511944", "0.5044414", "0.5036349", "0.5036349", "0.5036349", "0.50233823", "0.50190765", "0.49670908", "0.49645275", "0.4961486", "0.49546978", "0.4945926", "0.49447942", "0.49447942", "0.49333417", "0.49000654", "0.48884612", "0.48715273", "0.48236507", "0.48145723", "0.47957927", "0.47946757", "0.47681695", "0.47646546", "0.47639614", "0.47534075", "0.47427708", "0.4741864", "0.4732804", "0.4726943", "0.4726711", "0.47224644", "0.47143427", "0.4714052", "0.47113004", "0.470817", "0.46947587", "0.46943334", "0.46756554", "0.46626383", "0.46596384", "0.46477073", "0.4644611" ]
0.70776165
2
Deletes a namespace. This also deletes all services and endpoints in the namespace.
public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteNamespace(com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.protobuf.Empty deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteNamespaceMethod(), getCallOptions(), request);\n }", "public void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteNamespaceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void deleteNamespace(String nsName) throws NamespacePropertiesDeleteException {\n long nsContext;\n\n nsContext = NamespaceUtil.nameToContext(nsName);\n // sufficient for ZKImpl as clientside actions for now\n deleteNamespaceProperties(nsContext);\n }", "default void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteNamespaceMethod(), responseObserver);\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "void unsetNamespace();", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace);", "@Beta(Beta.SinceVersion.V1_7_0)\n void deleteByName(String resourceGroupName, String namespaceName, String name);", "public void clearContext(String namespace) {\n if (context != null) {\n context.remove(namespace);\n }\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id) {\n respond(request, responder, namespace, ns -> {\n NamespacedId namespacedId = new NamespacedId(ns, id);\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n if (registry.hasSchema(namespacedId)) {\n throw new NotFoundException(\"Id \" + id + \" not found.\");\n }\n registry.delete(namespacedId);\n });\n return new ServiceResponse<Void>(\"Successfully deleted schema \" + id);\n });\n }", "public void delete(String namespace, String key) {\n \t\tthis.init();\n \t\tthis._del(this.getKey(namespace, key));\n \t}", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedSubscription queryParameters);", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "@Test\n\tpublic void testDelete() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\t\n\t}", "protected void tearDown() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {\n cm.removeNamespace((String) iter.next());\n }\n }", "abstract protected void deleteNamespaceProperties(long nsContext) throws NamespacePropertiesDeleteException;", "public void deleteAllVersions(String namespace, String id) throws StageException;", "protected void tearDown() throws Exception {\n ConfigManager manager = ConfigManager.getInstance();\n for (Iterator iter = manager.getAllNamespaces(); iter.hasNext();) {\n manager.removeNamespace((String) iter.next());\n }\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedConfiguration queryParameters);", "static void cleanConfiguration() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n List namespaces = new ArrayList();\n\n // iterate through all the namespaces and delete them.\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n namespaces.add(it.next());\n }\n\n for (Iterator it = namespaces.iterator(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "public void delete(String namespace, String id, long version) throws StageException;", "protected void tearDown() throws Exception {\n super.tearDown();\n\n ConfigManager cm = ConfigManager.getInstance();\n Iterator allNamespaces = cm.getAllNamespaces();\n while (allNamespaces.hasNext()) {\n cm.removeNamespace((String) allNamespaces.next());\n }\n }", "static void clearConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n Iterator it = cm.getAllNamespaces();\n List nameSpaces = new ArrayList();\n\n while (it.hasNext()) {\n nameSpaces.add(it.next());\n }\n\n for (int i = 0; i < nameSpaces.size(); i++) {\n cm.removeNamespace((String) nameSpaces.get(i));\n }\n }", "protected abstract void undefineNamespace(int index);", "public void deleteTable(String resourceGroupName, String accountName, String tableName) {\n deleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().last().body();\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(\n @Path(\"namespace\") String namespace, \n @QueryMap DeleteCollectionNamespacedComponent queryParameters);", "public static void unloadConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "private void closeNamespaces() {\n \n // revert prefixes for namespaces included in last declaration\n DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop();\n int[] deltas = info.m_deltas;\n String[] priors = info.m_priors;\n for (int i = deltas.length - 1; i >= 0; i--) {\n int index = deltas[i];\n undefineNamespace(index);\n if (index < m_prefixes.length) {\n m_prefixes[index] = priors[i];\n } else if (m_extensionUris != null) {\n index -= m_prefixes.length;\n for (int j = 0; j < m_extensionUris.length; j++) {\n int length = m_extensionUris[j].length;\n if (index < length) {\n m_extensionPrefixes[j][index] = priors[i];\n } else {\n index -= length;\n }\n }\n }\n }\n \n // set up for clearing next nested set\n if (m_namespaceStack.empty()) {\n m_namespaceDepth = -1;\n } else {\n m_namespaceDepth =\n ((DeclarationInfo)m_namespaceStack.peek()).m_depth;\n }\n }", "Namespaces namespaces();", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "void removeServices() throws IOException, SoapException;", "void setNamespace(java.lang.String namespace);", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Beta(Beta.SinceVersion.V1_7_0)\n Completable deleteByNameAsync(String resourceGroupName, String namespaceName, String name);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "public void beginDeleteTable(String resourceGroupName, String accountName, String tableName) {\n beginDeleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().single().body();\n }", "public void deleteBucket() {\n\n logger.debug(\"\\n\\nDelete bucket\\n\");\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n blobStore.deleteContainer( bucketName );\n }", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@DELETE\n @Path(\"contexts/{context}/schemas/{id}/versions/{version}\")\n @TransactionPolicy(value = TransactionControl.EXPLICIT)\n public void delete(HttpServiceRequest request, HttpServiceResponder responder, @PathParam(\"context\") String namespace,\n @PathParam(\"id\") String id, @PathParam(\"version\") long version) {\n respond(request, responder, namespace, ns -> {\n TransactionRunners.run(getContext(), context -> {\n SchemaRegistry registry = SchemaRegistry.get(context);\n registry.remove(new NamespacedId(ns, id), version);\n });\n return new ServiceResponse<Void>(\"Successfully deleted version '\" + version + \"' of schema \" + id);\n });\n }", "java.lang.String getNamespace();", "void deleteTable(String tableName) {\n\t\tthis.dynamoClient.deleteTable(new DeleteTableRequest().withTableName(tableName));\n\t}", "public void deleteTable(final String tableName) throws IOException {\n deleteTable(Bytes.toBytes(tableName));\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace();", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public com.amazon.s3.DeleteBucketResponse deleteBucket(com.amazon.s3.DeleteBucket deleteBucket);", "private static void deleteBucketsWithPrefix() {\n\n logger.debug(\"\\n\\nDelete buckets with prefix {}\\n\", bucketPrefix );\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n final PageSet<? extends StorageMetadata> blobStoreList = blobStore.list();\n\n for ( Object o : blobStoreList.toArray() ) {\n StorageMetadata s = (StorageMetadata)o;\n\n if ( s.getName().startsWith( bucketPrefix )) {\n try {\n blobStore.deleteContainer(s.getName());\n } catch ( ContainerNotFoundException cnfe ) {\n logger.warn(\"Attempted to delete bucket {} but it is already deleted\", cnfe );\n }\n logger.debug(\"Deleted bucket {}\", s.getName());\n }\n }\n }", "public void deleteCatalog(Catalog catalog) throws BackendException;", "Rule XsdNamespace() {\n return Sequence(\n \"xsd_namespace\",\n Literal(),\n actions.pushXsdNamespaceNode());\n }", "public String getNamespace() {\n return namespace;\n }", "static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "public void deletePersistentVolumeClaim(String pvcName, String namespace) throws ApiException {\n try {\n V1Status result = coreApi.deleteNamespacedPersistentVolumeClaim(\n pvcName, namespace, \"true\",\n null, null, null,\n null, null\n );\n } catch (ApiException e) {\n LOG.error(\"Exception when deleting persistent volume claim \" + e.getMessage(), e);\n throw e;\n } catch (JsonSyntaxException e) {\n if (e.getCause() instanceof IllegalStateException) {\n IllegalStateException ise = (IllegalStateException) e.getCause();\n if (ise.getMessage() != null && ise.getMessage().contains(\"Expected a string but was BEGIN_OBJECT\"))\n LOG.debug(\"Catching exception because of issue \" +\n \"https://github.com/kubernetes-client/java/issues/86\", e);\n else throw e;\n }\n else throw e;\n }\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@Override\n\tpublic int snsDelete(SnsVO vo) {\n\t\treturn map.snsDelete(vo);\n\t}", "public String getNamespace()\n {\n return NAMESPACE;\n }", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "void deleteFunctionLibrary(String functionLibraryName, String tenantDomain)\n throws FunctionLibraryManagementException;", "public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;", "void setNamespace(String namespace);", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "@Nullable public String getNamespace() {\n return namespace;\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/dnses\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionDNS();", "public void removeContext(String namespace, String key) {\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap != null) {\n namespaceMap.remove(key);\n }\n }", "void deleteAllPaymentTerms() throws CommonManagementException;", "public void deleteSNS(String foreignID, final IRequestListener iRequestListener) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_DELETE_SNS.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken)\r\n .replace(\"{SNS_ID}\", foreignID);\r\n AsyncHttpDelete deleteSNS = new AsyncHttpDelete(mContext, new AsyncHttpResponseProcess(mContext, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response deleteSNS :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n iRequestListener.onErrorResponse(\"Cannot delete sns\");\r\n }\r\n }, null, true);\r\n AIOLog.d(url);\r\n deleteSNS.execute(url);\r\n }", "public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String profileName, String customDomainName, Context context);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "public void deleteTable(String tableName) {\n try {\n connectToDB(\"jdbc:mysql://localhost/EmployeesProject\");\n } catch (Exception e) {\n System.out.println(\"The EmployeesProject db does not exist!\\n\"\n + e.getMessage());\n }\n String sqlQuery = \"drop table \" + tableName;\n try {\n stmt.executeUpdate(sqlQuery);\n } catch (SQLException ex) {\n System.err.println(\"Failed to delete '\" + tableName + \n \"' table.\\n\" + ex.getMessage());\n }\n }", "int getNamespaceUri();", "@DeleteMapping(\"/ap-constants/{id}\")\n @Timed\n public ResponseEntity<Void> deleteApConstants(@PathVariable Long id) {\n log.debug(\"REST request to delete ApConstants : {}\", id);\n apConstantsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "IndexDeleted deleteIndex(String names) throws ElasticException;", "@DELETE\n\t@Produces(\"application/json\")\n\tpublic Response deleteGraphNodes() {\n\t\tcurrentGraph.getNodes().clear();\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(DB.grafos)\n\t\t\t\t\t.build();\n\t}", "void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context);", "public void deleteNetWS() {\r\n/* 142 */ this._has_netWS = false;\r\n/* */ }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String systemTopicName, Context context);", "public String getNamespaceName() {\n return namespaceName;\n }", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "void stopServices() throws IOException, SoapException;", "public static void deleteCacheFile(Context context, String cacheFileName) {\n context.deleteFile(cacheFileName);\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "public com.google.protobuf.Empty deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteServiceMethod(), getCallOptions(), request);\n }" ]
[ "0.6920174", "0.67187583", "0.65800256", "0.6169406", "0.5817538", "0.5816485", "0.5548779", "0.55118155", "0.54624957", "0.543168", "0.54101896", "0.53055227", "0.5229528", "0.519043", "0.5179534", "0.5128854", "0.5122423", "0.5082456", "0.50680053", "0.50414175", "0.5031711", "0.49984682", "0.494288", "0.48286778", "0.48205724", "0.48038936", "0.47969043", "0.47754347", "0.4755668", "0.47405437", "0.4735683", "0.46570957", "0.4631395", "0.4573011", "0.4570717", "0.45665565", "0.45573348", "0.45539343", "0.45478654", "0.4540826", "0.4530156", "0.45291388", "0.45175645", "0.45017293", "0.44962418", "0.4488721", "0.4484882", "0.4484882", "0.4484882", "0.44613147", "0.4459575", "0.4459575", "0.4447993", "0.4430003", "0.440816", "0.44061795", "0.44045725", "0.4391235", "0.43691608", "0.43607685", "0.43497708", "0.43497708", "0.43497708", "0.43489367", "0.4347508", "0.43468806", "0.4330934", "0.43183228", "0.43006042", "0.42990747", "0.42735928", "0.42512006", "0.42487392", "0.42172366", "0.42045668", "0.4198404", "0.41900736", "0.41888207", "0.41860342", "0.4185646", "0.41845885", "0.41830257", "0.41805586", "0.4170887", "0.41667235", "0.41609126", "0.4149068", "0.4130084", "0.41287407", "0.4127676", "0.41275835", "0.4126685", "0.41226524", "0.41093388", "0.40955105", "0.4092674", "0.4081838", "0.40789136", "0.407204", "0.40686065" ]
0.68527955
1
Creates a service, and returns the new service.
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.servicedirectory.v1beta1.Service> createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }", "public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }", "Service newService();", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }", "static Service create(String hostIp, String user, String password) {\n return new ServiceImpl(hostIp, user, password);\n }", "public CreateServiceRequest withServiceName(String serviceName) {\n setServiceName(serviceName);\n return this;\n }", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public static WPVService createInstance() {\n if ( CONFIG != null )\n return new WPVService( CONFIG );\n return null;\n }", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "IServiceContext createService(Class<?>... serviceModules);", "SourceBuilder createService();", "Fog_Services createFog_Services();", "Service_Resource createService_Resource();", "public abstract ServiceLocator create(String name);", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "void addService(ServiceInfo serviceInfo);", "public Collection<Service> createServices();", "IServiceContext createService(String childContextName, Class<?>... serviceModules);", "public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }", "public abstract T addService(ServerServiceDefinition service);", "public <T extends Service> T getService(Class<T> clazz) throws ServiceException{\n\t\ttry {\n\t\t\treturn clazz.getDeclaredConstructor().newInstance();\n\t\t} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }", "public Tracing create(String serviceName) {\n return Tracing.newBuilder()\n .localServiceName(serviceName)\n .currentTraceContext(RequestContextCurrentTraceContext.ofDefault())\n .spanReporter(spanReporter())\n .build();\n }", "public static <S> S createService(Class<S> serviceClass, String baseUrl) {\n return createService(serviceClass, baseUrl, null);\n }", "@Transactional\n public abstract OnmsServiceType createServiceTypeIfNecessary(String serviceName);", "Object getService(String serviceName);", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public static <T> T buildService(Class<T> type) {\n\n\n return retrofit.create(type);\n }", "public static <S> S createService(Class<S> serviceClass, String url) {\n Retrofit.Builder retrofit = new Retrofit.Builder()\n .baseUrl(url)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create());\n\n //set the necessary querys in the request\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n httpClient.addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n HttpUrl originalHttpUrl = original.url();\n String mTimeStamp = Md5HashGenerator.getTimeStamp();\n HttpUrl url = originalHttpUrl.newBuilder()\n .addQueryParameter(\"ts\", mTimeStamp)\n .addQueryParameter(\"apikey\", Constants.PUBLIC_KEY)\n .addQueryParameter(\"hash\", Md5HashGenerator.generateMd5(mTimeStamp))\n .build();\n\n // Request customization: add request headers\n Request.Builder requestBuilder = original.newBuilder()\n .url(url);\n\n Request request = requestBuilder.build();\n return chain.proceed(request);\n }\n });\n retrofit.client(httpClient.build());\n return retrofit.build().create(serviceClass);\n }", "public static Service getInstance()\n\t{\n\t\tif (serviceInstance == null)\n\t\t{\n\t\t\tserviceInstance = new Service(LocalDao.getInstance());\n\t\t}\n\t\treturn serviceInstance;\n\t}", "public Object getService(String serviceName);", "public interface Provider {\n Service newService();\n }", "public static synchronized ServiceDomain createDomain(final String name) {\n if (!isInitialized()) {\n init();\n }\n\n if (domains.containsKey(name)) {\n throw new RuntimeException(\"Domain already exists: \" + name);\n }\n\n ServiceDomain domain = new DomainImpl(\n name, registry, endpointProvider, transformers);\n domains.put(name, domain);\n return domain;\n }", "@Override\n public CreateServiceProfileResult createServiceProfile(CreateServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeCreateServiceProfile(request);\n }", "public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}", "CdapService createCdapService();", "private ServiceFactory() {}", "ServiceDataResource createServiceDataResource();", "protected OpUserServiceImpl createServiceImpl() {\r\n return new OpUserServiceImpl();\r\n }", "ProgramActuatorService createProgramActuatorService();", "public static EpitrelloDataServerice creator() {\n\t\tif(dataServerice == null) {\n\t\t\tdataServerice = new DataService();\n\t\t}\n\t\treturn dataServerice;\n\t}", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "public Service getService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service res){\n\t\tService service = new Service();\n\t\t\n\t\tservice.setServiceCode( res.getServiceCode() );\n\t\tservice.setServiceName( res.getServiceName() );\n\t\tservice.setGateway( res.getGateway() );\n\t\tservice.setCurrency( res.getCurrency() );\n\t\tservice.setDestination( res.getDestination() );\n\t\tservice.setUnitOfMeasure( res.getUnitOfMeasure() );\n\t\tservice.setGroupCode( res.getGroupCode() );\n\t\tservice.setGroupDescription( res.getGroupDescription() );\n\t\tservice.setFlightMaterialCode( res.getFlightMaterialCode() );\n\t\tservice.setHotelMaterialCode( res.getHotelMaterialCode() );\n\t\tservice.setParentItemRph( res.getParentItemRph() );\n\t\tservice.setGuestAllocation( res.getGuestAllocation() );\n\t\tservice.setPosnr( res.getPosnr() );\n\t\tservice.setOldPosnr( res.getOldPosnr() );\n\t\tif( res.isMandatory() != null ){\n\t\t\tservice.setMandatory( res.isMandatory().booleanValue() );\n\t\t}\n\t\tif( res.isFree() != null ){\n\t\t\tservice.setFree( res.isFree().booleanValue() );\n\t\t}\n\t\tif( res.isOccupancyBased() != null ){\n\t\t\tservice.setOccupancyBased( res.isOccupancyBased().booleanValue() );\n\t\t}\n\t\tif( res.isDateSpecific() != null ){\n\t\t\tservice.setDateSpecific( res.isDateSpecific().booleanValue() );\n\t\t}\n\t\tif( res.isAllOrNothing() != null ){\n\t\t\tservice.setAllOrNothing( res.isAllOrNothing().booleanValue() );\n\t\t}\n\t\tif( res.isWeightBased() != null ){\n\t\t\tservice.setWeightBased( res.isWeightBased().booleanValue() );\n\t\t}\n\t\tif( res.isTierBased() != null ){\n\t\t\tservice.setTierBased( res.isTierBased().booleanValue() );\n\t\t}\n\t\tif( res.isMonday() != null ){\n\t\t\tservice.setMonday( res.isMonday().booleanValue() );\n\t\t}\n\t\tif( res.isTuesday() != null ){\n\t\t\tservice.setTuesday( res.isTuesday().booleanValue() );\n\t\t}\n\t\tif( res.isWednesday() != null ){\n\t\t\tservice.setWednesday( res.isWednesday().booleanValue() );\n\t\t}\n\t\tif( res.isThursday() != null ){\n\t\t\tservice.setThursday( res.isThursday().booleanValue() );\n\t\t}\n\t\tif( res.isFriday() != null ){\n\t\t\tservice.setFriday( res.isFriday().booleanValue() );\n\t\t}\n\t\tif( res.isSaturday() != null ){\n\t\t\tservice.setSaturday( res.isSaturday().booleanValue() );\n\t\t}\n\t\tif( res.isSunday() ){\n\t\t\tservice.setSunday( res.isSunday().booleanValue() );\n\t\t}\n\t\tif( res.getSelectedDate() != null ){\n\t\t\tservice.setSelectedDate( this.getDate( res.getSelectedDate() ) );\n\t\t}\n\t\tif( res.getDepatureDate() != null ){\n\t\t\tservice.setDepatureDate( this.getDate( res.getDepatureDate() ) );\n\t\t}\n\t\tif( res.getReturnDate() != null ){\n\t\t\tservice.setReturnDate( this.getDate( res.getReturnDate() ) );\n\t\t}\n\t\tif( res.getAdultQty() != null ){\n\t\t\tservice.setAdultQty( res.getAdultQty().byteValue() );\n\t\t}\n\t\tif( res.getChild1Qty() != null ){\n\t\t\tservice.setChild1Qty( res.getChild1Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild2Qty() != null ){\n\t\t\tservice.setChild2Qty( res.getChild2Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild3Qty() != null ){\n\t\t\tservice.setChild3Qty( res.getChild3Qty().byteValue() );\n\t\t}\n\t\tif( res.getChild1MinAge() != null ){\n\t\t\tservice.setChild1MinAge( res.getChild1MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MinAge() != null ){\n\t\t\tservice.setChild2MinAge( res.getChild2MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MinAge() != null ){\n\t\t\tservice.setChild3MinAge( res.getChild3MinAge().byteValue() );\n\t\t}\n\t\tif( res.getChild1MaxAge() != null ){\n\t\t\tservice.setChild1MaxAge( res.getChild1MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild2MaxAge() != null ){\n\t\t\tservice.setChild2MaxAge( res.getChild2MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getChild3MaxAge() != null ){\n\t\t\tservice.setChild3MaxAge( res.getChild3MaxAge().byteValue() );\n\t\t}\n\t\tif( res.getTravelAgentFee() != null ){\n\t\t\tservice.setTravelAgentFee( res.getTravelAgentFee().doubleValue() );\n\t\t}\n\t\tif( res.getTotalPrice() != null ){\n\t\t\tservice.setTotalPrice( res.getTotalPrice().doubleValue() );\n\t\t}\n\t\tif( res.getMaxQuantity() != null ){\n\t\t\tservice.setMaxQuantity( res.getMaxQuantity().doubleValue() );\n\t\t}\n\t\tif( res.getAdultPrice() != null ){\n\t\t\tservice.setAdultPrice( res.getAdultPrice().doubleValue() );\n\t\t}\n\t\tif( res.getChild1Price() != null ){\n\t\t\tservice.setChild1Price( res.getChild1Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild2Price() != null ){\n\t\t\tservice.setChild2Price( res.getChild2Price().doubleValue() );\n\t\t}\n\t\tif( res.getChild3Price() != null ){\n\t\t\tservice.setChild3Price( res.getChild3Price().doubleValue() );\n\t\t}\n\t\tif( (res.getAvailableDates() != null) && (res.getAvailableDates().size() > 0) ){\n\t\t\tservice.setAvailableDates( this.convertXMLGregorianCalendarList( res.getAvailableDates() ) );\n\t\t}\n\t\tservice.setServiceDescription( res.getServiceDescription());\n\t\t\n\t\treturn service;\n\t}", "InboundServicesType createInboundServicesType();", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}", "CdapServiceInstance createCdapServiceInstance();", "void addService(Long orderId, Long serviceId);", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "@Produces @IWSBean\n public ServiceFactory produceServiceFactory() {\n return new ServiceFactory(iwsEntityManager, notifications, settings);\n }", "Object getService(String serviceName, boolean checkExistence);", "public Builder withService(final String service) {\n this.service = service;\n return this;\n }", "@Override\n\tpublic CreateServiceInstanceBindingResponse createServiceInstanceBinding(\n\t\t\tCreateServiceInstanceBindingRequest request) {\n\t\tString appId = request.getBindingId();\n\t\tString id = request.getServiceInstanceId();\n\t\tString apikey = userManager.getAPIKey(id, appId);\n\t\tMap<String, Object> credentials = Collections.singletonMap(\"APIKEY\", (Object) apikey);\n\n\t\treturn new CreateServiceInstanceBindingResponse(credentials);\n\t}", "public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}", "public interface Provider {\n Service newService();\n}", "public interface Provider {\n Service newService();\n}", "public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer create(\n long layerId);", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public static ShoppingCartService createShoppingCartService() {\n\t\treturn null;\r\n\t}", "public interface Provider{\n Service newService();\n}", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "public com.vodafone.global.er.decoupling.binding.request.BasicServiceType createBasicServiceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasicServiceTypeImpl();\n }", "@Override\n\tpublic SpringSupplierExtension createService(ServiceContext context) throws Throwable {\n\t\treturn this;\n\t}", "public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}", "public com.vodafone.global.er.decoupling.binding.request.ServiceStatusType createServiceStatusType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ServiceStatusTypeImpl();\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "@Override\r\n\tpublic sn.ucad.master.assurance.bo.Service consulterService(Integer idService) {\n\t\tService service= (Service) serviceRepository.findOne(idService);\r\n\t\tif(service==null) throw new RuntimeException(\"Service introuvable\");\r\n\t\treturn (sn.ucad.master.assurance.bo.Service) service;\r\n\t}", "public static ServiceFactory init() {\n\t\ttry {\n\t\t\tServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI);\n\t\t\tif (theServiceFactory != null) {\n\t\t\t\treturn theServiceFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ServiceFactoryImpl();\n\t}", "public void registerService(String serviceName, Object service);", "public Service(){\n\t\t\n\t}", "public SSLService createDynamicSSLService() {\n return new SSLService(env, sslConfigurations, sslContexts) {\n\n @Override\n Map<SSLConfiguration, SSLContextHolder> loadSSLConfigurations() {\n // we don't need to load anything...\n return Collections.emptyMap();\n }\n\n /**\n * Returns the existing {@link SSLContextHolder} for the configuration\n * @throws IllegalArgumentException if not found\n */\n @Override\n SSLContextHolder sslContextHolder(SSLConfiguration sslConfiguration) {\n SSLContextHolder holder = sslContexts.get(sslConfiguration);\n if (holder == null) {\n // normally we'd throw here but let's create a new one that is not cached and will not be monitored for changes!\n holder = createSslContext(sslConfiguration);\n }\n return holder;\n }\n };\n }", "public Service(int serviceID, String serviceName, double serviceFee, String serviceDescrp){\r\n\t\tthis.serviceName = serviceName;\r\n\t\tthis.serviceID = serviceID;\r\n\t\tthis.serviceFee = serviceFee;\r\n\t\tthis.serviceDescrp = serviceDescrp;\r\n\t}", "public ChromeService getOrCreate(final String path, final ImmutableMap<String, Object> args) {\n return _cache.computeIfAbsent(new ChromeServiceKey(path, args), this::create);\n }", "private Service() {}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "public void startService(String service)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public void forceServiceInstantiation()\n {\n getService();\n\n _serviceModelObject.instantiateService();\n }", "public com.vodafone.global.er.decoupling.binding.request.GetServiceRequest createGetServiceRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetServiceRequestImpl();\n }", "public CreateTaskSetRequest withService(String service) {\n setService(service);\n return this;\n }", "protected static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) {\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(endPoint)\n .client(new OkHttpClient())\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n T service = retrofit.create(clazz);\n return service;\n }", "private ChromeService create(final ChromeServiceKey key) {\n final ImmutableMap<String, String> env = ImmutableMap.of(\n ChromeLauncher.ENV_CHROME_PATH, key._path\n );\n // ^^^ In order to pass this environment in, we need to use a many-argument constructor,\n // which doesn't have obvious default values. So I stole the arguments from the fewer-argument constructor:\n // CHECKSTYLE.OFF: LineLength\n // https://github.com/kklisura/chrome-devtools-java-client/blob/master/cdt-java-client/src/main/java/com/github/kklisura/cdt/launch/ChromeLauncher.java#L105\n // CHECKSTYLE.ON: LineLength\n final ChromeLauncher launcher = new ChromeLauncher(\n new ProcessLauncherImpl(),\n env::get,\n new ChromeLauncher.RuntimeShutdownHookRegistry(),\n new ChromeLauncherConfiguration()\n );\n return launcher.launch(ChromeArguments.defaults(true)\n .additionalArguments(key._args)\n .build());\n }", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "public DCAEServiceObject(String serviceId, DCAEServiceRequest request) {\n DateTime now = DateTime.now(DateTimeZone.UTC);\n this.setServiceId(serviceId);\n this.setTypeId(request.getTypeId());\n this.setVnfId(request.getVnfId());\n this.setVnfType(request.getVnfType());\n this.setVnfLocation(request.getVnfLocation());\n this.setDeploymentRef(request.getDeploymentRef());\n this.setCreated(now);\n this.setModified(now);\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "IServiceContext createService(String childContextName,\n\t\t\tIBackgroundWorkerParamDelegate<IBeanContextFactory> registerPhaseDelegate,\n\t\t\tClass<?>... serviceModules);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public void startService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "public DestinationService getDestinationService(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.destinationservice.v1.DestinationService res){\n\t\tDestinationService destinationService = new DestinationService();\n\t\t\n\t\tdestinationService.setServiceCode( res.getServiceCode() );\n\t\tdestinationService.setServiceName( res.getServiceName() );\n\t\tdestinationService.setCurrency( res.getCurrency() );\n\t\tif( res.getPrice() != null ){\n\t\t\tdestinationService.setPrice( res.getPrice().doubleValue() );\n\t\t}\n\t\t\n\t\treturn destinationService;\n\t}", "protected abstract ServiceRegistry getNewServiceRegistry();", "public TestService() {}", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }" ]
[ "0.7673243", "0.746299", "0.7026831", "0.6918558", "0.6857777", "0.66468114", "0.65873075", "0.65867895", "0.6523027", "0.6390872", "0.63591254", "0.6314166", "0.6281377", "0.6261366", "0.6227418", "0.62184316", "0.61826664", "0.61612153", "0.6112579", "0.6107516", "0.6101168", "0.6008246", "0.6007262", "0.5999226", "0.59658647", "0.595746", "0.59366626", "0.5871322", "0.5830118", "0.5767995", "0.5761437", "0.5729881", "0.572255", "0.5714636", "0.57047397", "0.5703381", "0.5691859", "0.56879044", "0.56756866", "0.56715137", "0.5650661", "0.5637306", "0.5635961", "0.5627831", "0.5627101", "0.5614417", "0.5610254", "0.56028485", "0.5599389", "0.5590262", "0.5577301", "0.5572628", "0.55687326", "0.5563449", "0.5561303", "0.55515766", "0.5547182", "0.5545116", "0.55284613", "0.55263305", "0.5521158", "0.5492559", "0.5482249", "0.54573154", "0.54573154", "0.5443404", "0.54408836", "0.5424288", "0.54182154", "0.541078", "0.5402881", "0.5396444", "0.5365863", "0.53421515", "0.5334897", "0.53294533", "0.53273493", "0.5317595", "0.5311245", "0.530765", "0.53012615", "0.52842826", "0.5279977", "0.52767104", "0.5244774", "0.52444494", "0.52180654", "0.52137935", "0.5211637", "0.5200977", "0.51976717", "0.5197607", "0.5197042", "0.5195032", "0.5193314", "0.51916283", "0.5182347", "0.51662827", "0.5160173", "0.5160173" ]
0.7330246
2
Lists all services belonging to a namespace.
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.servicedirectory.v1beta1.ListServicesResponse> listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListServicesMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }", "List<Service> services();", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "public List<CatalogService> getService(String service);", "public List<ServerServices> listServerServices();", "public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }", "public List<String> getServices() throws IOException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();", "public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }", "public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "Namespaces namespaces();", "public List<ServiceInstance> getAllInstances(String serviceName);", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "AGServiceDescription[] getServices()\n throws IOException, SoapException;", "public ArrayList getNamespaces() {\n return m_namespaces;\n }", "public List<ServiceInstance> getAllInstances();", "public List<Service> findAll();", "public Iterator getServices() {\r\n\t\treturn services == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(services.values());\r\n\t}", "public void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public List<Servicio> findAll();", "@Test\n\tvoid testAllNamespacesTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = true;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(NAMESPACE_ALL);\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 2);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertTrue(result.contains(\"service-b\"));\n\t}", "public String getAllRunningServices() {\n return \"\";\n }", "public List<ServiceInstance> lookupInstances(String serviceName);", "ImmutableList<T> getServices();", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }", "public com.google.cloud.servicedirectory.v1beta1.ListServicesResponse listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListServicesMethod(), getCallOptions(), request);\n }", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();", "public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}", "Collection<Service> getAllSubscribeService();", "default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }", "Collection<Service> getAllPublishedService();", "public Map<String, List<String>> getServices();", "java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();", "public ServiceType[] getAllServices() throws LoadSupportedServicesException{\r\n\t\tthis.loadServices();\r\n\t\treturn this.services;\r\n\t}", "public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }", "public java.util.List<String> getServiceArns() {\n return serviceArns;\n }", "@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceCat> listServiceCat() {\r\n\t\tList<ServiceCat> courses = null;\r\n\t\ttry {\r\n\t\t\tcourses = session.createQuery(\"from ServiceCat\").list();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn courses;\r\n\t}", "public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);\n }", "public Vector getServiceNames(String serviceType) throws ServiceException {\n return namingService.getServiceNames(serviceType);\n }", "@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }", "public List<Function> getFunctions(String namespace, String name);", "public List<Service> getServicesByCategory(Category cat) {\n ServiceRecords sr = company.getServiceRecords();\n List<Service> serviceList = sr.getServiceByCat(cat);\n return serviceList;\n }", "@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "public Map<String,String> getNamespaces() {\n return namespaces;\n }", "ServicesPackage getServicesPackage();", "@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }", "public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);", "@Test\n public void listServiceAccountNamesTest() throws ApiException {\n String owner = null;\n Integer offset = null;\n Integer limit = null;\n String sort = null;\n String query = null;\n Boolean bookmarks = null;\n String mode = null;\n Boolean noPage = null;\n V1ListServiceAccountsResponse response = api.listServiceAccountNames(owner, offset, limit, sort, query, bookmarks, mode, noPage);\n // TODO: test validations\n }", "public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}", "public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {\n final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();\n Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);\n for (Endpoint ep : deployment.getService().getEndpoints()) {\n endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));\n }\n return endpointServiceNames;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceListOrBuilder getServiceListOrBuilder();", "static Set getServiceNames(SSOToken token) throws SMSException,\n SSOException {\n // Get the service names from ServiceManager\n CachedSubEntries cse = CachedSubEntries.getInstance(token,\n DNMapper.serviceDN);\n return (cse.getSubEntries(token));\n }", "public java.util.Map<String,String> getNamespaces() {\n return (_namespaces);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }", "public Collection<Service> createServices();", "public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }", "public Vector getServiceTypes() throws ServiceException {\n return namingService.getServiceTypes();\n }", "@ManagedAttribute(description = \"Retrieves the list of Registered Services in a slightly friendlier output.\")\n public final List<String> getRegisteredServicesAsStrings() {\n final List<String> services = new ArrayList<>();\n\n for (final RegisteredService r : this.servicesManager.getAllServices()) {\n services.add(new StringBuilder().append(\"id: \").append(r.getId())\n .append(\" name: \").append(r.getName())\n .append(\" serviceId: \").append(r.getServiceId())\n .toString());\n }\n\n return services;\n }", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "public ListSubscriptionForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List listar() {\n Query query = Database.manager.createNamedQuery(\"StatussistemaDTO.findAll\");\n query.setHint(QueryHints.MAINTAIN_CACHE, HintValues.FALSE);// evita consulta em cache\n List lista = query.getResultList();\n return lista;\n }", "private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException {\n \tSubscriptionResource sr = namespaceCache.get( baseNS );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNS, null, null );\n\t\t\t\tnamespaceCache.put( baseNS, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);", "public ServiceCombo getServices()\n {\n return services;\n }", "public static List<String> getPrinterServiceNameList() {\n\n // get list of all print services\n PrintService[] services = PrinterJob.lookupPrintServices();\n List<String> list = new ArrayList<>();\n\n for (PrintService service : services) {\n list.add(service.getName());\n }\n return list;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces();", "List<ServiceChargeSubscription> getSCPackageList() throws EOTException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/components\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ComponentList, Component> listComponentForAllNamespaces(\n @QueryMap ListComponentForAllNamespaces queryParameters);", "public Object _getLSservices(CommandInterpreter ci) {\n\t\tSet<Registration> regs = identityManager.getLocalServices();\n\t\tci.print(\"Local Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\n\t\tregs = identityManager.getRemoteServices();\n\t\tci.print(\"Remote Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public List<ServiceInstance<InstanceDetails>> listInstances() throws Exception {\n\t\tCollection<String> serviceNames = serviceDiscovery.queryForNames();\n\t\tSystem.out.println(serviceNames.size() + \" type(s)\");\n\t\tList<ServiceInstance<InstanceDetails>> list = new ArrayList<>();\n\t\tfor (String serviceName : serviceNames) {\n\t\t\tCollection<ServiceInstance<InstanceDetails>> instances = serviceDiscovery.queryForInstances(serviceName);\n\t\t\tSystem.out.println(serviceName);\n\t\t\tfor (ServiceInstance<InstanceDetails> instance : instances) {\n\t\t\t\toutputInstance(instance);\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "@GetMapping (\"/servicos\")\n\t\tpublic List<ServicoModel> pegarTodos() {\t\t\n\t\t\treturn repository.findAll();\n\t\t}", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "public ListComponentForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }", "public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET)\n public List<MedicalService> getAllMedServices(){\n return medicalServiceService.getAllMedServices();\n }" ]
[ "0.64931387", "0.6455482", "0.6434621", "0.6354605", "0.63120854", "0.6306348", "0.62515044", "0.62465596", "0.6158411", "0.61194927", "0.6072912", "0.60536987", "0.5988149", "0.596693", "0.5936899", "0.5936899", "0.5891345", "0.5848618", "0.58115935", "0.57972336", "0.579381", "0.57490385", "0.5724049", "0.569499", "0.56665754", "0.56617504", "0.56375206", "0.562698", "0.56175846", "0.56175846", "0.5614838", "0.5604498", "0.5604498", "0.5592619", "0.5559078", "0.5551394", "0.5551225", "0.55502754", "0.55502754", "0.5496691", "0.549171", "0.54891044", "0.5484037", "0.5466844", "0.54558116", "0.5447057", "0.5429594", "0.5419723", "0.54123336", "0.53826165", "0.5380892", "0.5367372", "0.5359345", "0.5345543", "0.5343411", "0.5333504", "0.5331763", "0.5328992", "0.5322703", "0.531994", "0.5306583", "0.529393", "0.5272056", "0.52678466", "0.5262894", "0.5250918", "0.52489674", "0.5219384", "0.5211198", "0.5204784", "0.5194637", "0.5194637", "0.51836294", "0.5146755", "0.51441425", "0.5143232", "0.51365614", "0.512608", "0.51138735", "0.5105637", "0.5105093", "0.5105093", "0.51016986", "0.5091707", "0.5086203", "0.5072591", "0.5066781", "0.5057514", "0.5041865", "0.50336903", "0.5024161", "0.5021765", "0.5017387", "0.5014343", "0.50100297", "0.5004093", "0.49958244", "0.49808887", "0.49802223", "0.4975763" ]
0.57247484
22
Deletes a service. This also deletes all endpoints associated with the service.
public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteService(com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteService(){\r\n \tif(editService != null){\r\n \t\tint id = editService.getId();\r\n \t\ttry {\r\n\t \t\tif(id == 0){\r\n\t \t\t\tthis.getLog().error(\" unable to deleteService(). No id selected\");\r\n\t \t\t}else{\r\n\t \t\t\tthis.getLog().info(\" deleteService(\" + id + \")\");\r\n\t \t\t\tConnectionFactory.createConnection().deleteservice(editService.getId());\r\n\t \t\t}\r\n \t\t\tthis.getServiceList().populateServiceListFromDB();\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "public void deleteService(String serviceName) {\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\").child(serviceName);\n dR.getParent().child(serviceName).removeValue();\n }", "public void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);", "public com.google.protobuf.Empty deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteServiceMethod(), getCallOptions(), request);\n }", "@GetMapping(\"/delete_service\")\n public String deleteService(@RequestParam(value = \"serviceID\") int serviceID){\n serviceServiceIF.deleteService(serviceServiceIF.getServiceByID(serviceID));\n return \"redirect:/admin/service/setup_service\";\n }", "public void markServiceDelete() throws JNCException {\n markLeafDelete(\"service\");\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;", "void delete(ServiceSegmentModel serviceSegment);", "default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "LinkedService deleteById(String id);", "void removeServices() throws IOException, SoapException;", "@Override\n public DeleteServiceProfileResult deleteServiceProfile(DeleteServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteServiceProfile(request);\n }", "@Override\n\tpublic Integer deleteServices(com.easybooking.model.BookedServices services) {\n\t\tint i = 0;\n\t\tSessionFactory factory = HibernateUtil.getSesssionFactory();\n\t\tSession session = factory.openSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(services);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\tfactory.close();\n\t\treturn i;\n\t}", "public void verifyToDeleteService() throws Throwable{\r\n\t\tServicesPage srvpage=new ServicesPage();\r\n\t\tselServicOpt.click();\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\t\r\n\t\tif(getServiceText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getServiceText().getText()+\" is deleted\",true);\r\n\t\t\tselServiceBtn.click();\r\n\t\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\t\tsrvpage.selectServices();\r\n\t\t\tdeleteService();\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdeleteService();\r\n\t\t}\r\n\t}", "boolean removeService(T service);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "public void serviceRemoved(String serviceID);", "public void clearServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete(); \n }\n \n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceUri, String endpointName, String serviceConfigurationName);", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "@DeleteMapping(\"/costo-servicios/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCostoServicio(@PathVariable Long id) {\n log.debug(\"REST request to delete CostoServicio : {}\", id);\n costoServicioService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteServiceCat(String serviceItemId) {\r\n\t\ttry {\r\n\t\t\tServiceCat serviceItem = (ServiceCat) session.get(ServiceCat.class, serviceItemId);\r\n\t\t\tsession.delete(serviceItem);\r\n\t\t} catch (Exception e) {\r\n\t\t\ttransaction.rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "@Override\n\tpublic void delete(ServiceFee entites) {\n\t\tservicefeerepo.delete(entites);\n\t}", "void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);", "@Override\n\tpublic String removeService(String serviceName) {\n\t\tServiceManager serviceManager = loadBalance.search(serviceName);\n\t\tif (serviceManager == null) {\n\t\t\treturn \"Service Invalid\";\n\t\t}\n\t\tArrayList<String> hostNames = serviceManager.getHostnames();\n\t\twhile (hostNames.size() > 0) {\n\t\t\tthis.removeInstance(serviceName, hostNames.get(0));\n\t\t}\n\n\t\t// remove service from cluster/loadbalancer/Trie structure\n\t\tif (loadBalance.deleteService(serviceName)) {\n\t\t\treturn \"Service Removed\";\n\t\t}\n\t\treturn \"Service Invalid\";\n\t}", "public void onDeleteService(final ForwardEvent event) {\r\n\t\t// Get the listitem from the event's target (button)\r\n\t\t// parent(hbox)->parent(listcell)->parent(listitem)\r\n\t\tfinal Listitem li = (Listitem) event.getOrigin().getTarget().getParent().getParent().getParent();\r\n\t\tfinal MasterService service = (MasterService) li.getValue();\r\n\r\n\t\t// delete the service\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tpaymentDAO.deleteService(service);\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tint indx = getListIndex(service, services);\r\n\t\tservices.remove(indx);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tClients.evalJavaScript(\"$.jGrowl(\\\"Successfully Deleted the service\\\", {life:2000});\");\r\n\t}", "public static <T extends NetworkEntity> void testAddDelete(\n EndpointService service, T entity, TestDataFactory testDataFactory) {\n List<Endpoint> endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints, \"Endpoint list should be empty, not null when no endpoints exist\");\n assertTrue(endpoints.isEmpty(), \"Endpoint should be empty when none added\");\n\n // test additions\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n service.addEndpoint(entity.getKey(), testDataFactory.newEndpoint());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(2, endpoints.size(), \"2 endpoints have been added\");\n assertEquals(\n 1, endpoints.get(0).getMachineTags().size(), \"The endpoint should have 1 machine tag\");\n\n // test deletion, ensuring correct one is deleted\n service.deleteEndpoint(entity.getKey(), endpoints.get(0).getKey());\n endpoints = service.listEndpoints(entity.getKey());\n assertNotNull(endpoints);\n assertEquals(1, endpoints.size(), \"1 endpoint should remain after the deletion\");\n Endpoint expected = testDataFactory.newEndpoint();\n Endpoint created = endpoints.get(0);\n assertLenientEquals(\"Created entity does not read as expected\", expected, created);\n }", "boolean removeServiceSubscriber(Service service);", "public void deleteAllCommands(Service service) throws Exception {\n ArrayList<CommandOfService> allCommands = DAO.getPendingCommandsOfOneService(service);\n for(CommandOfService command : allCommands) {\n this.declineTransaction(command);\n }\n\n }", "void delete(\n String resourceGroupName,\n String searchServiceName,\n String sharedPrivateLinkResourceName,\n UUID clientRequestId,\n Context context);", "void deleteSegmentByIdAndType(ServiceSegmentModel serviceSegment);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "void clearService();", "@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}", "private void removeServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n //Remove directory from map \"servicesDirectories\"\n servicesDirectories.remove(serviceID);\n \n }\n \n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "public void unRegisterService(String serviceKey, Node node) {\n\t\tlog.info(\"UnRegistering the service \" + serviceKey);\n\t\ttry {\n\t\t\tString authToken = getAuthToken(node.getSecurityUrl()); \n\t\t\tDeleteService deleteService = new DeleteService();\n\t\t\tdeleteService.setAuthInfo(authToken);\n\t\t\tdeleteService.getServiceKey().add(serviceKey);\n\t\t\tgetUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteService(deleteService);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Unable to register service \" + serviceKey\n\t\t\t\t\t+ \" .\" + e.getMessage(),e);\n\t\t}\n\t}", "@DeleteMapping(value = {\"/deleteOfferedServiceById/{offeredServiceId}\", \"/deleteOfferedServiceById/{offeredServiceId}/\"})\n\tpublic OfferedServiceDto deleteOfferedServiceById(@PathVariable(\"offeredServiceId\") String offeredServiceId) throws InvalidInputException{\n\t\tOfferedService offeredService = new OfferedService();\n\t\ttry {\n\t\t\tofferedService = offeredServiceService.deleteOfferedService(offeredServiceId);\n\t\t}catch (RuntimeException e) {\n\t\t\tthrow new InvalidInputException(e.getMessage());\n\t\t}\n\n\t\treturn convertToDto(offeredService);\n\t}", "void delete(\n String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "public void stopService(String service)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "public void removeServiceConfig(String serviceName) throws SMSException {\n try {\n ServiceConfigManager scm = new ServiceConfigManager(serviceName,\n token);\n scm.deleteOrganizationConfig(orgName);\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager: Unable to \"\n + \"delete Service Config\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n }", "void delete(String id) throws PSDataServiceException, PSNotFoundException;", "public void unsetServiceValue() throws JNCException {\n delete(\"service\");\n }", "public boolean delete() {\n return delete(Datastore.fetchDefaultService());\n }", "public void removeServiceDomain(QName serviceName) {\n _serviceDomains.remove(serviceName);\n }", "public void delete(URI url) throws RestClientException {\n restTemplate.delete(url);\n }", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "net.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;", "@DEL\n @Path(\"/{id}\")\n @Consumes({\"application/json\"})\n @Produces({\"application/json\"})\n public RestRsp<Tp> deleteSite(@PathParam(\"id\") final String id) throws ServiceException {\n if(!UuidUtil.validate(id)) {\n ServiceExceptionUtil.throwBadRequestException();\n }\n return new RestRsp<Tp>(ResultConstants.SUCCESS, service.deleteTp(id));\n }", "public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }", "public void unregisterService(String serviceName){\n jmc.unregisterService(serviceName);\n }", "@RequestMapping(path = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable long id) {\n service.delete(id);\n }", "public void removeServiceClient(final String serviceName) {\n boolean needToSave = ProjectManager.mutex().writeAccess(new Action<Boolean>() {\n public Boolean run() {\n boolean needsSave = false;\n boolean needsSave1 = false;\n\n /** Remove properties from project.properties\n */\n String featureProperty = \"wscompile.client.\" + serviceName + \".features\"; // NOI18N\n String packageProperty = \"wscompile.client.\" + serviceName + \".package\"; // NOI18N\n String proxyProperty = \"wscompile.client.\" + serviceName + \".proxy\"; //NOI18N\n\n EditableProperties ep = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties ep1 = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n if(ep.getProperty(featureProperty) != null) {\n ep.remove(featureProperty);\n needsSave = true;\n }\n\n if(ep.getProperty(packageProperty) != null) {\n ep.remove(packageProperty);\n needsSave = true;\n }\n\n if(ep1.getProperty(proxyProperty) != null) {\n ep1.remove(proxyProperty);\n needsSave1 = true;\n }\n\n if(needsSave) {\n helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n\n if(needsSave1) {\n helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep1);\n }\n\n /** Locate root of web service client node structure in project,xml\n */\n Element data = helper.getPrimaryConfigurationData(true);\n NodeList nodes = data.getElementsByTagName(WEB_SERVICE_CLIENTS);\n Element clientElements = null;\n\n /* If there is a root, get all the names of the child services and search\n * for the one we want to remove.\n */\n if(nodes.getLength() >= 1) {\n clientElements = (Element) nodes.item(0);\n NodeList clientNameList = clientElements.getElementsByTagNameNS(AppClientProjectType.PROJECT_CONFIGURATION_NAMESPACE, WEB_SERVICE_CLIENT_NAME);\n for(int i = 0; i < clientNameList.getLength(); i++ ) {\n Element clientNameElement = (Element) clientNameList.item(i);\n NodeList nl = clientNameElement.getChildNodes();\n if(nl.getLength() == 1) {\n Node n = nl.item(0);\n if(n.getNodeType() == Node.TEXT_NODE) {\n if(serviceName.equalsIgnoreCase(n.getNodeValue())) {\n // Found it! Now remove it.\n Node serviceNode = clientNameElement.getParentNode();\n clientElements.removeChild(serviceNode);\n helper.putPrimaryConfigurationData(data, true);\n needsSave = true;\n }\n }\n }\n }\n }\n return needsSave || needsSave1;\n }\n });\n \n // !PW Lastly, save the project if we actually made any changes to any\n // properties or the build script.\n if(needToSave) {\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch(IOException ex) {\n NotifyDescriptor desc = new NotifyDescriptor.Message(\n NbBundle.getMessage(AppClientProjectWebServicesClientSupport.class,\"MSG_ErrorSavingOnWSClientRemove\", serviceName, ex.getMessage()), // NOI18N\n NotifyDescriptor.ERROR_MESSAGE);\n DialogDisplayer.getDefault().notify(desc);\n }\n }\n removeServiceRef(serviceName);\n }", "public boolean delete(Service servico){\n for (Service servicoLista : Database.servico) {\n if(idSaoIguais(servicoLista,servico)){\n Database.servico.remove(servicoLista);\n return true;\n }\n }\n return false;\n }", "@DELETE\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response deleteServicioDeAlojamiento(ServicioDeAlojamiento servicioDeAlojamiento) {\n\t\ttry{\n\t\t\tAlohAndesTransactionManager tm = new AlohAndesTransactionManager( getPath( ) );\n\t\t\ttm.deleteServicioDeAlojamiento(servicioDeAlojamiento);\n\t\t\treturn Response.status(200).entity(servicioDeAlojamiento).build();\n\t\t}\n\t\tcatch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}", "public void doStopService() throws ServiceException {\r\n // Nothing to do\r\n super.doStopService();\r\n }", "public boolean delete(Object[] obj) {\n\t\tString sql=\"delete from services where ServiceID=?\";\n\t\tDbManager db=new DbManager();\n\n\t\treturn db.execute(sql, obj);\n\t}", "void stopServices() throws IOException, SoapException;", "@PostMapping(\"/delete\")\n public ResponseEntity<ServiceResult> deleteTest(@RequestBody Integer id) {\n return new ResponseEntity<ServiceResult>(testService.deleteTest(id), HttpStatus.OK);\n }", "@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }", "void unsetServiceId();", "public export.serializers.avro.DeviceInfo.Builder clearService() {\n service = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "@DeleteMapping(\"/operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete Operation : {}\", id);\n operationService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteEntity(final String entityId) throws OAuthServiceException {\n if (entityId != null) {\n final WebResource deleteResource = tokenResource.path(entityId);\n final ClientResponse resp =\n deleteResource.cookie(getCookie()).delete(ClientResponse.class);\n if (resp != null) {\n final int status = resp.getStatus();\n if (status != TOKEN_UPDATED) {\n throw new OAuthServiceException(\n \"failed to delete the token: status code=\" + status);\n }\n }\n }\n }", "public void removeDeviceServiceLink();", "public void stopService();", "@DeleteMapping(\"/usuarios/{id}\")\n\t public void delete(@PathVariable Integer id) {\n\t service.delete(id);\n\t }", "@RequestMapping( value = \"/{id}\", method = RequestMethod.DELETE )\n public void delete(@PathVariable(value=\"id\") int id){\n classService.delete(id);\n }", "public void deleteById(String id);", "public void unassignService(String serviceName) throws SMSException {\n // if (coexistMode) {\n // amsdk.unassignService(serviceName);\n // } else {\n removeServiceConfig(serviceName);\n // }\n }", "public void removeFiles() throws ServiceException;", "@Override\n public void removedService(final ServiceReference<ComponentFactory> reference, final ComponentFactory service)\n {\n final String productType = (String)reference.getProperty(ComponentConstants.COMPONENT_NAME);\n \n m_Logging.info(\"Unregistering factory for: %s\", productType);\n \n final FactoryInternal factory = m_Factories.get(productType);\n \n //make unavailable via framework\n tryMakeFactoryUnavailable(factory);\n \n // allow proxy services to do clean up first\n tryProxyOnRemoveFactory(factory);\n \n //remove all associated factory objects\n tryRemoveAllFactoryObjects(factory);\n //unreg the rest of the services and other cleanup\n tryCleanupFactory(factory);\n \n //make unavailable to management services\n tryRemoveFactory(productType);\n \n //dispose of the factory instance\n tryDisposeFactory(productType);\n \n //remove reference to service\n tryUngetService(reference);\n }", "void delete(String id, boolean force) throws PSDataServiceException, PSNotFoundException;", "LinkedService deleteByIdWithResponse(String id, Context context);", "@Override\n\tpublic int deleteCallServiceByIds(String s) {\n\t\tList ids = new ArrayList();\n\t\tCollections.addAll(ids, s.split(\",\"));\n\t\treturn dgCallServiceMapper.deleteIds(ids);\n\t}", "void deleteById(final String id);", "void removeHost(Service oldHost);", "void delete(URI url) throws RestClientException;", "@Override\n\tpublic void deleteServiceInstanceBinding(DeleteServiceInstanceBindingRequest request) {\n\t\tuserManager.deleteUser(request.getServiceInstanceId());\n\t}", "public void deleteDirectoryEntriesFromCollection(\n TableServiceClient tableServiceClient, String tableName) {\n if (TableServiceClientUtils.tableExists(tableServiceClient, tableName)) {\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n tableClient.deleteTable();\n } else {\n logger.warn(\n \"No storage table {} found to be removed. This should only happen when deleting a file-less dataset.\",\n tableName);\n }\n }", "@DeleteMapping(\"/deleteStaff/{id}\")\n\tpublic void deleteStaff(@PathVariable(\"id\") int id) {\n\t\tstaffService.deleteStaff(id);\n\t}", "private void unregister(final ServiceReference serviceReference) {\n final ServiceRegistration proxyRegistration;\n synchronized (this.proxies) {\n proxyRegistration = this.proxies.remove(serviceReference);\n }\n\n if (proxyRegistration != null) {\n log.debug(\"Unregistering {}\", proxyRegistration);\n this.bundleContext.ungetService(serviceReference);\n proxyRegistration.unregister();\n }\n }", "@Secured(\"ROLE_ADMIN\")\n @DeleteMapping(value = \"/{id}\")\n public ResponseEntity<Map<String, Object>> delete(@PathVariable Long id) {\n\n try {\n \t\n \tList<ServicioOfrecido> listaServiciosOfrecidos = servOfreServ.buscarPorProfesional(profesionalService.findOne(id));\n \tfor (ServicioOfrecido servOfre : listaServiciosOfrecidos) {\n\t\t\t\tservOfreServ.delete(servOfre.getId_servicioOfrecido());\n\t\t\t}\n \tprofesionalService.delete(id);\n \t\n }catch(DataAccessException e) {\n return new ResponseEntity<Map<String,Object>>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity<Map<String,Object>>(HttpStatus.OK);\n }", "@DeleteMapping(\"/person/{id}\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate void deletePerson(@PathVariable(\"id\") int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n }\r\n}", "@Override\n\tpublic void unregisterService(String service) {\n\t\tassert((service!=null)&&(!\"\".equals(service))); //$NON-NLS-1$\n\t\tsuper.unregisterService(service);\n\t\t// Informs the other kernels about this registration\n\t\tgetMTS(NetworkMessageTransportService.class).broadcast(new KernelMessage(YellowPages.class,KernelMessage.Type.YELLOW_PAGE_UNREGISTERING,service,null));\n\t}", "@DeleteMapping(\"/api/students\")\n public void deleteStudentById(@PathVariable(value = \"id\") Long id) {\n this.studentService.deleteStudentById(id);\n }", "public void deleteSiteStats () throws DataServiceException;", "@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }", "public void delete() throws NotAuthorizedException, ConflictException,\n\t\t\tBadRequestException {\n\t}", "@DeleteMapping(\"/data-set-operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDataSetOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete DataSetOperation : {}\", id);\n dataSetOperationRepository.delete(id);\n dataSetOperationSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void serviceRemoved(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"removed serivce: \" + event);\n\t\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Ads : {}\", id);\n adsRepository.delete(id);\n adsSearchRepository.delete(id);\n }", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "public void stopService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStoppedException,\r\n NoSuchServiceException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n return beginDeleteWithResponseAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)\n .flatMap((Response<Void> res) -> Mono.empty());\n }", "@DeleteMapping(\"/statuts/{id}\")\n public void deletStatut(@PathVariable(\"id\") int id) {\n \tserviceStatut.deletStatut(id);\n }" ]
[ "0.70454186", "0.67595744", "0.66447985", "0.65827364", "0.65817744", "0.6460869", "0.6459487", "0.6346506", "0.6284409", "0.6280427", "0.62100434", "0.61075157", "0.6105394", "0.60679984", "0.60642123", "0.58566344", "0.58396375", "0.5808894", "0.5803272", "0.57564616", "0.57475734", "0.5725003", "0.5723127", "0.57020277", "0.5676753", "0.5669081", "0.5664531", "0.56609553", "0.56478995", "0.5603958", "0.5583679", "0.5562504", "0.5546726", "0.5531988", "0.5491321", "0.54657", "0.5464606", "0.545201", "0.5430714", "0.5425944", "0.54118246", "0.53968525", "0.5390384", "0.53292453", "0.53281844", "0.53010833", "0.5267112", "0.523429", "0.52227575", "0.52050143", "0.5204233", "0.5192004", "0.5187192", "0.51795024", "0.5176393", "0.51754636", "0.5173691", "0.5163785", "0.515075", "0.51217806", "0.5110812", "0.5108017", "0.5102018", "0.51018006", "0.50973916", "0.5093073", "0.5091346", "0.50910455", "0.50836116", "0.5040267", "0.5038002", "0.5025906", "0.50255376", "0.5021022", "0.50192267", "0.5015589", "0.50048226", "0.49877548", "0.49871957", "0.49832782", "0.49812204", "0.4966668", "0.4947006", "0.49384975", "0.49286398", "0.4925316", "0.4921684", "0.4921522", "0.49152234", "0.49115866", "0.49078935", "0.49067813", "0.49045563", "0.4892656", "0.48837414", "0.4878675", "0.48720166", "0.48561034", "0.4849165", "0.48471248" ]
0.6653481
2
Creates an endpoint, and returns the new endpoint.
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.servicedirectory.v1beta1.Endpoint> createEndpoint(com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public CreateEndpointResult createEndpoint(CreateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeCreateEndpoint(request);\n }", "public com.google.cloud.servicedirectory.v1beta1.Endpoint createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateEndpointMethod(), getCallOptions(), request);\n }", "EndPoint createEndPoint();", "public abstract Endpoint createEndpoint(String bindingId, Object implementor);", "public org.hl7.fhir.Uri addNewEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().add_element_user(ENDPOINT$8);\n return target;\n }\n }", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "public void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateEndpointMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public Endpoint addNewEndpoint(String entity)\n\t\t{\n\t\t\tElement endpointElement = document.createElement(ENDPOINT_ELEMENT_NAME);\n\t\t\tEndpoint endpoint = new Endpoint(endpointElement);\n\t\t\tendpoint.setEntity(entity);\n\n\t\t\tuserElement.appendChild(endpointElement);\n\t\t\tendpointsList.add(endpoint);\n\n\t\t\treturn endpoint;\n\t\t}", "default void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateEndpointMethod(), responseObserver);\n }", "public String createEndpoint(EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties);\n }", "public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "String createEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public Endpoint createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Endpoint createAndPublishEndpoint(String address, Object implementor,\n WebServiceFeature... features) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public void addEndpoint(Endpoint endpoint)\r\n {\r\n getEndpoints().add(endpoint);\r\n }", "public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection addNewEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n return target;\r\n }\r\n }", "UMOImmutableEndpoint createOutboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void configureEndpoint(Endpoint endpoint);", "public Builder setEndpoint(String endpoint) {\n this.endpoint = Preconditions.checkNotNull(endpoint, \"Endpoint is null.\");\n return this;\n }", "@WebMethod\n URI exposeEndpoint(Endpoint endpoint);", "public Endpoint getEndpoint(String uri) {\n Endpoint answer;\n synchronized (endpoints) {\n answer = endpoints.get(uri);\n if (answer == null) {\n try {\n\n String splitURI[] = ObjectHelper.splitOnCharacter(uri, \":\", 2);\n if (splitURI[1] != null) {\n String scheme = splitURI[0];\n Component component = getComponent(scheme);\n\n if (component != null) {\n answer = component.createEndpoint(uri);\n\n if (answer != null && LOG.isDebugEnabled()) {\n LOG.debug(uri + \" converted to endpoint: \" + answer + \" by component: \"+ component);\n }\n }\n }\n if (answer == null) {\n answer = createEndpoint(uri);\n }\n\n if (answer != null && answer.isSingleton()) {\n startServices(answer);\n endpoints.put(uri, answer);\n \tlifecycleStrategy.onEndpointAdd(answer);\n }\n } catch (Exception e) {\n throw new ResolveEndpointFailedException(uri, e);\n }\n }\n }\n return answer;\n }", "public static EndpointMBean getAddEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "void setEndpoint(String endpoint);", "public Builder url(URI endpoint) {\n return server(endpoint);\n }", "UMOImmutableEndpoint createResponseEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "void addPeerEndpoint(PeerEndpoint peer);", "@Override\n public UpdateEndpointResult updateEndpoint(UpdateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateEndpoint(request);\n }", "Endpoint<R> borrowEndpoint() throws EndpointBalancerException;", "public HttpEndpoint( String theEndpoint ) {\n\t\tthis( theEndpoint, true );\n\t}", "UMOImmutableEndpoint createInboundEndpoint(UMOEndpointBuilder builder, UMOManagementContext managementContext) throws UMOException;", "public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder getEndpointBuilder() {\n return getEndpointFieldBuilder().getBuilder();\n }", "public void setEndpointId(String endpointId);", "public RgwAdminBuilder endpoint(String endpoint) {\n this.endpoint = endpoint;\n return this;\n }", "@Override\n public Endpoint build() throws ConstraintViolationException {\n VocabUtil.getInstance().validate(endpointImpl);\n return endpointImpl;\n }", "public ReplicationObject withEndpointType(EndpointType endpointType) {\n this.endpointType = endpointType;\n return this;\n }", "EndpointType endpointType();", "public void addEndpoint(Endpoint endpoint)\n\t\t{\n\t\t\tEndpoint newEndpoint = addNewEndpoint(endpoint.getEntity());\n\t\t\tnewEndpoint.setStatus(endpoint.getStatus());\n\t\t\tnewEndpoint.setState(endpoint.getState());\n\t\t\tfor (Media media : endpoint.getMedias())\n\t\t\t\tnewEndpoint.addMedia(media);\n\t\t}", "private EndPoint createDotEndPoint(EndPointAnchor anchor)\r\n {\r\n DotEndPoint endPoint = new DotEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setTarget(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n\r\n return endPoint;\r\n }", "public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder getEndpointBuilder() {\n \n onChanged();\n return getEndpointFieldBuilder().getBuilder();\n }", "Adresse createAdresse();", "Endpoint getDefaultEndpoint();", "void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "String endpoint();", "public W3CEndpointReference createW3CEndpointReference(String address, QName interfaceName,\n QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters, List<Element> elements, Map<QName, String> attributes) {\n throw new UnsupportedOperationException(\n \"JAX-WS 2.2 implementation must override this default behaviour.\");\n }", "public Builder mergeEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (endpoint_ != null) {\n endpoint_ =\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.newBuilder(endpoint_).mergeFrom(value).buildPartial();\n } else {\n endpoint_ = value;\n }\n onChanged();\n } else {\n endpointBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName,\n QName portName, List<Element> metadata, String wsdlDocumentLocation,\n List<Element> referenceParameters);", "public static ResolverService createInstance(Peer peer, EndpointService epService)\n {\n if (resService == null)\n {\n resService = new ResolverService(peer, epService);\n }\n return resService;\n }", "public EndpointDetail() {\n }", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "public interface ApiEndpointDefinition extends Serializable {\n\n\t/**\n\t * Get the endpoint class.\n\t * @return the endpoint class\n\t */\n\tClass<?> getEndpointClass();\n\n\t/**\n\t * Get the endpoint type.\n\t * @return the endpoint type\n\t */\n\tApiEndpointType getType();\n\n\t/**\n\t * Get the scanner type.\n\t * @return the scanner type\n\t */\n\tJaxrsScannerType getScannerType();\n\n\t/**\n\t * Get the endpoint path.\n\t * @return the endpoint path\n\t */\n\tString getPath();\n\n\t/**\n\t * Get the API context id to which the endpoint is bound.\n\t * @return the API context id to which the endpoint is bound\n\t */\n\tString getContextId();\n\n\t/**\n\t * Init the endpoint context.\n\t * @return <code>true</code> if initialized, <code>false</code> if already initialized\n\t */\n\tboolean init();\n\n\t/**\n\t * Create a new {@link ApiEndpointDefinition}.\n\t * @param endpointClass The endpoint class (not null)\n\t * @param type The endpoint type\n\t * @param scannerType The scanner type\n\t * @param path The endpoint path\n\t * @param contextId the API context id to which the endpoint is bound\n\t * @param initializer Initializer (not null)\n\t * @return A new {@link ApiEndpointDefinition} instance\n\t */\n\tstatic ApiEndpointDefinition create(Class<?> endpointClass, ApiEndpointType type, JaxrsScannerType scannerType,\n\t\t\tString path, String contextId, Callable<Void> initializer) {\n\t\treturn new DefaultApiEndpointDefinition(endpointClass, type, scannerType, path, contextId, initializer);\n\t}\n\n}", "public InputEndpoint withEndpointName(String endpointName) {\n this.endpointName = endpointName;\n return this;\n }", "Address createAddress();", "EndpointDetails getEndpointDetails();", "public Builder clearEndpoint() {\n if (endpointBuilder_ == null) {\n endpoint_ = null;\n onChanged();\n } else {\n endpoint_ = null;\n endpointBuilder_ = null;\n }\n\n return this;\n }", "synchronized MutableSpan setEndpoint(Endpoint endpoint) {\n for (int i = 0; i < annotations.size(); i++) {\n V1Annotation a = annotations.get(i);\n if (a.endpoint().equals(Endpoints.UNKNOWN)) {\n annotations.set(i, V1Annotation.create(a.timestamp(), a.value(), endpoint));\n }\n }\n this.endpoint = endpoint;\n return this;\n }", "public VersionInfo withEndpointUrl(String endpointUrl) {\n this.endpointUrl = endpointUrl;\n return this;\n }", "interface WithPrivateEndpoint {\n /**\n * Specifies privateEndpoint.\n * @param privateEndpoint The resource of private end point\n * @return the next update stage\n */\n Update withPrivateEndpoint(PrivateEndpointInner privateEndpoint);\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder> \n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n endpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder, io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpointOrBuilder>(\n getEndpoint(),\n getParentForChildren(),\n isClean());\n endpoint_ = null;\n }\n return endpointBuilder_;\n }", "PortDefinition createPortDefinition();", "public static EndpointMBean getSubtractEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}", "public final EObject entryRuleEndpoint() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEndpoint = null;\n\n\n try {\n // InternalMappingDsl.g:3450:49: (iv_ruleEndpoint= ruleEndpoint EOF )\n // InternalMappingDsl.g:3451:2: iv_ruleEndpoint= ruleEndpoint EOF\n {\n newCompositeNode(grammarAccess.getEndpointRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEndpoint=ruleEndpoint();\n\n state._fsp--;\n\n current =iv_ruleEndpoint; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static synchronized Service create(\n final String serviceName, final String serviceEndpointPrefix) {\n if (SERVICE_CACHE.containsKey(serviceName)) {\n Service existing = SERVICE_CACHE.get(serviceName);\n if (existing.getServiceEndpointPrefix().equals(serviceEndpointPrefix)) {\n return existing;\n }\n throw new IllegalArgumentException(\n String.format(\n \"Cannot redefine service '%s' with with new endpoint prefix '%s', already set to '%s'\",\n serviceName,\n serviceEndpointPrefix,\n existing.getServiceEndpointPrefix()));\n }\n Service newInstance = new BasicService(serviceName, serviceEndpointPrefix);\n SERVICE_CACHE.put(serviceName, newInstance);\n return newInstance;\n }", "@Override\n public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteEndpoint(request);\n }", "@Override\n public GetServiceEndpointResult getServiceEndpoint(GetServiceEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceEndpoint(request);\n }", "public static EndpointMBean getMultiplyEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }", "private void createEndpointElement(JsonObject swaggerObject, String swaggerVersion) throws RegistryException {\n\t\t/*\n\t\tExtracting endpoint url from the swagger document.\n\t\t */\n\t\tif (SwaggerConstants.SWAGGER_VERSION_12.equals(swaggerVersion)) {\n\t\t\tJsonElement endpointUrlElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tif (endpointUrlElement == null) {\n\t\t\t\tlog.warn(\"Endpoint url is not specified in the swagger document. Endpoint creation might fail. \");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tendpointUrl = endpointUrlElement.getAsString();\n\t\t\t}\n\t\t} else if (SwaggerConstants.SWAGGER_VERSION_2.equals(swaggerVersion)) {\n\t\t\tJsonElement transportsElement = swaggerObject.get(SwaggerConstants.SCHEMES);\n\t\t\tJsonArray transports = (transportsElement != null) ? transportsElement.getAsJsonArray() : null;\n\t\t\tString transport = (transports != null) ? transports.get(0).getAsString() + \"://\" : DEFAULT_TRANSPORT;\n\t\t\tJsonElement hostElement = swaggerObject.get(SwaggerConstants.HOST);\n\t\t\tString host = (hostElement != null) ? hostElement.getAsString() : null;\n if (host == null) {\n log.warn(\"Endpoint(host) url is not specified in the swagger document. \"\n + \"The host serving the documentation is to be used(including the port) as endpoint host\");\n\n if(requestContext.getSourceURL() != null) {\n URL sourceURL = null;\n try {\n sourceURL = new URL(requestContext.getSourceURL());\n } catch (MalformedURLException e) {\n throw new RegistryException(\"Error in parsing the source URL. \", e);\n }\n host = sourceURL.getAuthority();\n }\n }\n\n if (host == null) {\n log.warn(\"Can't derive the endpoint(host) url when uploading swagger from file. \"\n + \"Endpoint creation might fail. \");\n return;\n }\n\n\t\t\tJsonElement basePathElement = swaggerObject.get(SwaggerConstants.BASE_PATH);\n\t\t\tString basePath = (basePathElement != null) ? basePathElement.getAsString() : DEFAULT_BASE_PATH;\n\n\t\t\tendpointUrl = transport + host + basePath;\n\t\t}\n\t\t/*\n\t\tCreating endpoint artifact\n\t\t */\n\t\tOMFactory factory = OMAbstractFactory.getOMFactory();\n\t\tendpointLocation = EndpointUtils.deriveEndpointFromUrl(endpointUrl);\n\t\tString endpointName = EndpointUtils.deriveEndpointNameWithNamespaceFromUrl(endpointUrl);\n\t\tString endpointContent = EndpointUtils\n\t\t\t\t.getEndpointContentWithOverview(endpointUrl, endpointLocation, endpointName, documentVersion);\n\t\ttry {\n\t\t\tendpointElement = AXIOMUtil.stringToOM(factory, endpointContent);\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RegistryException(\"Error in creating the endpoint element. \", e);\n\t\t}\n\n\t}", "public boolean hasEndpoint() { return true; }", "io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint getEndpoint();", "public void addEndpoint(String endpoint) {\n\t\tif (sessionMap.putIfAbsent(endpoint, new ArrayList<Session>()) != null)\n\t\t\tLOG.warn(\"Endpoint {} already exists\", endpoint);\n\t\telse\n\t\t\tLOG.info(\"Added new endpoint {}\", endpoint);\n\t}", "@Override\n public TTransportWrapper getTransport(HostAndPort endpoint) throws Exception {\n return new TTransportWrapper(connectToServer(new InetSocketAddress(endpoint.getHostText(),\n endpoint.getPort())),\n endpoint);\n }", "private EndPoint createRectangleEndPoint(EndPointAnchor anchor)\r\n {\r\n RectangleEndPoint endPoint = new RectangleEndPoint(anchor);\r\n endPoint.setScope(\"network\");\r\n endPoint.setSource(true);\r\n endPoint.setStyle(\"{fillStyle:'#98AFC7'}\");\r\n endPoint.setHoverStyle(\"{fillStyle:'#5C738B'}\");\r\n return endPoint;\r\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "public Builder setEndpoint(\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder builderForValue) {\n if (endpointBuilder_ == null) {\n endpoint_ = builderForValue.build();\n onChanged();\n } else {\n endpointBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "String serviceEndpoint();", "public Builder setApiEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n apiEndpoint_ = value;\n bitField0_ |= 0x00080000;\n onChanged();\n return this;\n }", "String createEndpointFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>\n getEndpointFieldBuilder() {\n if (endpointBuilder_ == null) {\n if (!(stepInfoCase_ == 8)) {\n stepInfo_ = com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance();\n }\n endpointBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>(\n (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_,\n getParentForChildren(),\n isClean());\n stepInfo_ = null;\n }\n stepInfoCase_ = 8;\n onChanged();\n return endpointBuilder_;\n }", "URISegment createURISegment();", "public InterfaceEndpointInner withEndpointService(EndpointService endpointService) {\n this.endpointService = endpointService;\n return this;\n }", "public boolean addEndpoint(String endpointData) throws AxisFault {\n EndpointAdminServiceClient endpointAdminServiceClient = getEndpointAdminServiceClient();\n return endpointAdminServiceClient.addEndpoint(endpointData);\n }", "EndpointElement getEndpointByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public Builder setEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n endpoint_ = value;\n onChanged();\n } else {\n endpointBuilder_.setMessage(value);\n }\n\n return this;\n }", "Port createPort();", "Port createPort();", "RESTElement createRESTElement();", "public String getEndpoint() {\n return this.endpoint;\n }", "public String getEndpoint() {\n return this.endpoint;\n }", "@Override\n public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeEndpoint(request);\n }", "public ResourceTypeExtension withEndpointUri(String endpointUri) {\n this.endpointUri = endpointUri;\n return this;\n }", "ServiceEndpointPolicy.DefinitionStages.Blank define(String name);", "public String createEndpointFromTemplate(String networkAddress,\n String templateGUID,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.createEndpointFromTemplate(userId, null, null, networkAddress, templateGUID, templateProperties);\n }", "private AdjListEdge createEdge(Edge e) {\n\t\t// check if present\n\t\tif (edges.get(e.getIndex()) != null) return edges.get(e.getIndex());\n\t\t\n\t\tAdjListVertex uThis = vertices.get(e.getFirstVertex().getIndex());\n\t\tAdjListVertex vThis = vertices.get(e.getSecondVertex().getIndex());\n\t\tAdjListEdge eThis = new AdjListEdge(uThis, vThis, e.getIndex());\n\t\tedges.set(e.getIndex(), eThis);\n\t\tllEdges.add(eThis);\n\t\t\n\t\tnotifyEdgeCreated(eThis);\n\t\treturn eThis;\n\t}", "public static NodeEndPoint copy(final NodeEndPoint other) {\n return new NodeEndPoint(other.getHostName(), other.getIpAddress(), other.getPort());\n }", "public String getEndpointId();", "public String createAPI(String endpointGUID,\n APIProperties apiProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return apiManagerClient.createAPI(userId, apiManagerGUID, apiManagerName, apiManagerIsHome, endpointGUID, apiProperties);\n }", "public org.hl7.fhir.Uri getEndpoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Uri target = null;\n target = (org.hl7.fhir.Uri)get_store().find_element_user(ENDPOINT$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "Delivery createDelivery();" ]
[ "0.8141873", "0.749923", "0.7409183", "0.7352639", "0.72629625", "0.70078534", "0.678481", "0.6772285", "0.6664594", "0.65618056", "0.6457914", "0.6344549", "0.63041383", "0.6223555", "0.614113", "0.5968795", "0.59528106", "0.5943539", "0.59314483", "0.5924034", "0.58739924", "0.5794323", "0.56651014", "0.5611578", "0.5581665", "0.5550329", "0.5462348", "0.5460442", "0.54358953", "0.54066944", "0.53979254", "0.53811085", "0.53647065", "0.53586304", "0.5357449", "0.5338564", "0.53132594", "0.52931094", "0.5262176", "0.526071", "0.5258778", "0.52285475", "0.5190137", "0.51740247", "0.5146909", "0.5132492", "0.51168084", "0.51117975", "0.5109057", "0.5102409", "0.51001537", "0.50898796", "0.508385", "0.5079356", "0.5067755", "0.5064008", "0.5028315", "0.4998396", "0.4987051", "0.49846217", "0.49813348", "0.49782574", "0.49558878", "0.49539885", "0.49486253", "0.49481687", "0.49460703", "0.49432132", "0.49421328", "0.49320015", "0.49230948", "0.49116814", "0.49025816", "0.4901532", "0.48928002", "0.48800102", "0.4861976", "0.4853177", "0.48508656", "0.48492488", "0.48405793", "0.48405144", "0.48405027", "0.48403528", "0.48309088", "0.4817311", "0.4817311", "0.48074302", "0.4800159", "0.4800159", "0.4791116", "0.47861665", "0.47809914", "0.47760814", "0.47701034", "0.47671136", "0.47642702", "0.47605392", "0.4760062", "0.47593442" ]
0.72454953
5
Gets the IAM Policy for a resource
public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy> getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetIamPolicyMethod(), getCallOptions(), request);\n }", "private Resource getPolicyResource(String policyId) throws EntitlementException {\n String path = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving entitlement policy\");\n }\n\n try {\n path = policyStorePath + policyId;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n return registry.get(path);\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy : \" + policyId, e);\n throw new EntitlementException(\"Error while retrieving entitlement policy : \" + policyId, e);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "private PolicyDTO readPolicy(Resource resource) throws EntitlementException {\n \n String policy = null;\n AbstractPolicy absPolicy = null;\n PolicyDTO dto = null;\n\n try {\n policy = new String((byte[]) resource.getContent(), Charset.forName(\"UTF-8\"));\n absPolicy = PolicyReader.getInstance(null).getPolicy(policy);\n dto = new PolicyDTO();\n dto.setPolicyId(absPolicy.getId().toASCIIString());\n dto.setPolicy(policy);\n\n String policyOrder = resource.getProperty(\"policyOrder\");\n if(policyOrder != null){\n dto.setPolicyOrder(Integer.parseInt(policyOrder));\n } else {\n dto.setPolicyOrder(0);\n } // TODO policy refe IDs ???\n PolicyAttributeBuilder policyAttributeBuilder = new PolicyAttributeBuilder();\n dto.setAttributeDTOs(policyAttributeBuilder.\n getPolicyMetaDataFromRegistryProperties(resource.getProperties()));\n return dto;\n } catch (RegistryException e) {\n log.error(\"Error while loading entitlement policy\", e);\n throw new EntitlementException(\"Error while loading entitlement policy\", e);\n }\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "Policy _get_policy(int policy_type);", "@Override\n\tpublic Optional<Policy> findPolicyById(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\treturn policyDao.findById(policyId);\n\t}", "public static String getPublicReadPolicy(String bucket_name) {\r\n Policy bucket_policy = new Policy().withStatements(\r\n new Statement(Statement.Effect.Allow)\r\n .withPrincipals(Principal.AllUsers)\r\n .withActions(S3Actions.GetObject)\r\n .withResources(new Resource(\r\n \"arn:aws:s3:::\" + bucket_name + \"/*\")));\r\n return bucket_policy.toJson();\r\n }", "public com.amazon.s3.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy(com.amazon.s3.GetBucketAccessControlPolicy getBucketAccessControlPolicy);", "ServiceEndpointPolicy getById(String id);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "PolicyRecord findOne(Long id);", "public PolicyMap getPolicyMap();", "public com.amazon.s3.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy(com.amazon.s3.GetObjectAccessControlPolicy getObjectAccessControlPolicy);", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "Resource getAbilityResource();", "public PolicyDTO readPolicy(String policyId) throws EntitlementException {\n\n Resource resource = null;\n \n resource = getPolicyResource(policyId);\n\n if (resource == null) {\n return new PolicyDTO();\n }\n\n return readPolicy(resource);\n }", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "public void getIamPolicy(\n com.google.iam.v1.GetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public Privilege get(int actionId, int resourceId) {\n\t\tTypedQuery<Privilege> q = getEntityManager().createQuery(\"SELECT p FROM Privilege p WHERE p.actionId = :actionId AND p.resourceId = :resourceId\", Privilege.class)\n\t\t\t\t.setParameter(\"actionId\", actionId).setParameter(\"resourceId\", resourceId);\n\t\ttry {\n\t\t\treturn q.getSingleResult();\n\t\t} catch (NoResultException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public int getPermission(Integer resourceId);", "public CompanyPolicy getPolicy(int policyNo) {\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo); \n return cPolicy;\n\t}", "@Override\r\n\tpublic List<Policy> getPolicies() {\n\t\tList<Policy> policy=dao.getPolicies();\r\n\t\treturn policy;\r\n\t}", "@Nullable\n public ManagedAppPolicy get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "private static String getBucketPolicyFromFile(String policy_file) {\r\n StringBuilder file_text = new StringBuilder();\r\n try {\r\n List<String> lines = Files.readAllLines(\r\n Paths.get(policy_file), Charset.forName(\"UTF-8\"));\r\n for (String line : lines) {\r\n file_text.append(line);\r\n }\r\n } catch (IOException e) {\r\n System.out.format(\"Problem reading file: \\\"%s\\\"\", policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n // Verify the policy by trying to load it into a Policy object.\r\n Policy bucket_policy = null;\r\n try {\r\n bucket_policy = Policy.fromJson(file_text.toString());\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Invalid policy text in file: \\\"%s\\\"\",\r\n policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n return bucket_policy.toJson();\r\n }", "public abstract List<AbstractPolicy> getPolicies();", "public RegistryKeyProperty getPolicyKey();", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "Resource getResource() {\n\t\treturn resource;\n\t}", "public EvictionPolicy getEvictionPolicy()\n {\n return m_policy;\n }", "public Set<Policy> findPolicyByPerson(String id);", "public ResourceReadPolicy getReadPolicy(Class<?> resourceClass, User user)\n\t{\n\t\tString resourceAlias = resourceClass.getSimpleName();\n\t\tresourceAlias = resourceAlias.substring(0, 1).toLowerCase() + resourceAlias.substring(1);\n\t\tString projectAlias = \"project\";\n\t\t\n\t\tif (this.getLogicOperator() == LogicOperator.AND)\n\t\t{\n\t\t\tResourceReadPolicy readPolicy = new ResourceReadPolicy();\n\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(true);\n\t\t\t\tString conditions = this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\n\t\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t\t{\n\t\t\t\t\tif (subPolicy.isEntityAccessGranted(user))\n\t\t\t\t\t{\n\t\t\t\t\t\tString groupConditions = subPolicy.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!groupConditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = conditions + \" \" + this.logicOperator + \" \" + groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // If subgroup entity access is not granted\n\t\t\t\t\t{\n\t\t\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\t\t\treadPolicy.setReadConditions(null);\n\t\t\t\t\t\treturn readPolicy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treadPolicy.setReadConditions(conditions);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t\telse // If group entity access is not granted\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t}\n\t\telse // If Logic Operator is OR \n\t\t{\n\t\t\tResourceReadPolicy resourceReadPolicy = new ResourceReadPolicy();\n\t\t\t\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\tresourceReadPolicy.setReadConditions(this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user));\t\t\t\t\n\t\t\t}\n\n\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t{\n\t\t\t\tResourceReadPolicy groupReadPolicy = subPolicy.readGroupPolicy(resourceAlias, projectAlias, user);\n\t\t\t\tif (groupReadPolicy.isReadGranted())\n\t\t\t\t{\n\t\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\t\t\n\t\t\t\t\tString conditions = resourceReadPolicy.getReadConditions();\n\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions = groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\telse if (!groupReadPolicy.getReadConditions().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions += \" \" + this.logicOperator + \" \" + groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresourceReadPolicy.setReadConditions(conditions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn resourceReadPolicy;\n\t\t}\n\t}", "protected Resource getResource() {\n return resource;\n }", "static JackrabbitAccessControlList getPolicy(AccessControlManager acM, String path, Principal principal) throws RepositoryException,\n AccessDeniedException, NotExecutableException {\n AccessControlPolicyIterator itr = acM.getApplicablePolicies(path);\n while (itr.hasNext()) {\n AccessControlPolicy policy = itr.nextAccessControlPolicy();\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // try if there is an acl that has been set before:\n AccessControlPolicy[] pcls = acM.getPolicies(path);\n for (AccessControlPolicy policy : pcls) {\n if (policy instanceof ACLTemplate) {\n return (ACLTemplate) policy;\n }\n }\n // no applicable or existing ACLTemplate to edit -> not executable.\n throw new NotExecutableException();\n }", "public Resource getResource() {\n return resource;\n }", "public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n return new PolicyDTO[0];\n }\n policies = new PolicyDTO[resources.length];\n\n List<PolicyDTO> policyDTOList = new ArrayList<PolicyDTO>();\n int[] policyOrder = new int[resources.length];\n\n for(int i = 0; i < resources.length; i++){\n PolicyDTO policyDTO = readPolicy(resources[i]);\n policyDTOList.add(policyDTO);\n policyOrder[i] = policyDTO.getPolicyOrder();\n }\n\n // sorting array TODO : with Comparator class\n int[] tempArray = new int[policyOrder.length];\n Arrays.sort(policyOrder);\n for (int i = 0; i < tempArray.length; i++) {\n int j = (policyOrder.length-1)-i;\n tempArray[j] = policyOrder[i];\n }\n policyOrder = tempArray;\n\n for (int i = 0; i < policyOrder.length; i++) {\n for(PolicyDTO policyDTO : policyDTOList){\n if(policyOrder[i] == policyDTO.getPolicyOrder()){\n policies[i] = policyDTO;\n }\n }\n }\n \n return policies;\n }", "public static BackupPolicy get(String name, Output<String> id, @Nullable BackupPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {\n return new BackupPolicy(name, id, state, options);\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "ServiceEndpointPolicy getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "@JsonIgnore public BoardingPolicyType getBoardingPolicy() {\n return (BoardingPolicyType) getValue(\"boardingPolicy\");\n }", "RequiredResourceType getRequiredResource();", "ResourceRequirement getRequirementFor(AResourceType type);", "private Resource[] getAllPolicyResource() throws EntitlementException {\n\n String path = null;\n Collection collection = null;\n List<Resource> resources = new ArrayList<Resource>();\n String[] children = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving all entitlement policies\");\n }\n\n try {\n path = policyStorePath;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n collection = (Collection) registry.get(path);\n children = collection.getChildren();\n\n for (String aChildren : children) {\n resources.add(registry.get(aChildren));\n }\n\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy\", e);\n throw new EntitlementException(\"Error while retrieving entitlement policies\", e);\n }\n\n return resources.toArray(new Resource[resources.size()]);\n }", "public Jedis getResource() {\n\t\tif (jedisPool == null) {\n\t\t\tsynchronized (this) {\n\t\t\t\tif (jedisPool == null){\n\t\t\t\t\tjedisPool = new JedisPool(jedisPoolConfig, host, port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jedisPool.getResource();\n\t}", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "public NatPolicy getNatPolicy();", "Iterable<PrimaryPolicyMetadata> getApplicablePolicies();", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "@XmlElement(name = \"source_policy\")\r\n public ProtectionSourcePolicy getSourcePolicy() {\r\n return sourcePolicy;\r\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public SigningPolicy getSigningPolicy(String subject) {\n \n if (this.policyDNMap == null) {\n return null;\n }\n\n return (SigningPolicy) this.policyDNMap.get(subject);\n }", "public static Policy getEndpointEffectivePolicy(Definitions wsdl, QName serviceQName, String portName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n //obtain port\n Endpoint port = srv.getEndpoint(portName);\n if (port == null) {\n throw new IllegalArgumentException(\"Cannot find port with name '\" + portName + \"' in service with qname \" + serviceQName);\n }\n //obtain binding\n QName bQName = port.getBinding();\n Binding binding = wsdl.getBinding(bQName);\n //obtain portType\n QName intQName = binding.getInterface();\n Interface portType = wsdl.getInterface(intQName);\n \n Element wsdlEl = (Element) binding.getDomElement().getParentNode();\n \n Policy portPolicy = ConfigurationBuilder.loadPolicies(port, wsdlEl);\n Policy bindingPolicy = ConfigurationBuilder.loadPolicies(binding, wsdlEl);\n Policy portTypePolicy = ConfigurationBuilder.loadPolicies(portType, wsdlEl);\n \n Policy res = Policy.mergePolicies(new Policy[]{portPolicy, bindingPolicy, portTypePolicy});\n return res;\n }", "PolicyDetail findPolicyByID(int policyId, int lenderId);", "@Deprecated\n Policy getEvictionPolicy();", "private RoutingPolicy getExportPolicy() {\n\t String exportPolicyName = null;\n switch(this.getType()) {\n case BGP:\n // String constant from\n // org.batfish.representation.cisco.CiscoConfiguration.toBgpProcess\n exportPolicyName = \"~BGP_COMMON_EXPORT_POLICY:\" \n + this.getVrf().getName() + \"~\";\n break;\n case OSPF:\n exportPolicyName = this.ospfConfig.getExportPolicy();\n break;\n default:\n return null;\n }\n\n return this.getDevice().getRoutingPolicy(exportPolicyName);\n\t}", "PolicyDetail findPolicyDetail(int policyId, Lender lender);", "public ResourceInfo getResource() {\n\t\treturn resource;\n\t}", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy getAuthorizationPolicies(int index);", "SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName);", "@Deprecated\n public List<V2beta2HPAScalingPolicy> getPolicies();", "PolicyDecision getDecision();", "public CertificateAttributesPolicy getCertificateAttributesPolicy() {\n if (trustedCAs.size() != 0) {\n TrustedCaPolicy tc = (TrustedCaPolicy)trustedCAs.get(0);\n if (tc.getCertificateAttributesPolicy() != null) {\n return tc.getCertificateAttributesPolicy();\n }\n }\n return certificateAttributesPolicy;\n }", "public String getRuntimePolicyFile(IPath configPath);", "String privacyPolicy();", "public MPProcessesResponse getMonitoringPolicyProcess(String policyId, String processId) throws RestClientException, IOException {\n return client.get(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), null, MPProcessesResponse.class);\n }", "public static APIPolicy createDefaultAPIPolicy() {\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1000, 10000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n apiPolicy.setPipelines(createDefaultPipelines());\n return apiPolicy;\n }", "public ImNotifPolicy getImNotifPolicy();", "public static short[] getPolicies() {\n\t\treturn POLICIES;\n\t}", "public List<Policy> getReferencedPolicies(Rule rule) {\n return getReferencedPolicies(rule, null);\n }", "public interface TilePolicy {\n\n\tpublic boolean getEnterableAt(Pair xy);\n\tpublic boolean getPassableAt(Pair xy);\n\tpublic boolean getJumpableAt(Pair xy);\n\t\n\tpublic boolean getWalkableAt(Pair xy, Player player);\n\tpublic boolean getEnterableAt(Pair xy, CellLogic ignore);\n\t\n\t/**\n\t * All policies must return a name so they can be enumerated\n\t * and a group of grunts all moving at once can share policies\n\t * if they have the same movement. Comparing getName is\n\t * equivalent to an equality test between policies.\n\t * \n\t * @return The name of the Policy\n\t */\n\tpublic String getName();\n\t\n}", "com.yandex.ydb.rate_limiter.ResourceOrBuilder getResourceOrBuilder();", "PolicyStatsManager getStats();", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "public String getResourceArn() {\n return this.resourceArn;\n }", "java.util.List<com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy> \n getAuthorizationPoliciesList();", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "com.yandex.ydb.rate_limiter.Resource getResource();", "@JsonIgnore\n public String getResource() {\n return this.resource;\n }", "public String getResourceOWL()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceOWL);\r\n }", "public ResourceVO getResource() {\n\treturn resource;\n}" ]
[ "0.653043", "0.6186254", "0.6138413", "0.6095201", "0.6080963", "0.5858935", "0.58587104", "0.57901645", "0.57883555", "0.5769761", "0.5749365", "0.56901425", "0.5656458", "0.56230205", "0.5586617", "0.55617374", "0.54347295", "0.54000455", "0.5365061", "0.532694", "0.53233534", "0.5305755", "0.53039086", "0.5281342", "0.5213906", "0.5172531", "0.51078", "0.50747687", "0.5036701", "0.5017904", "0.50159967", "0.50155324", "0.5007601", "0.4984229", "0.49525255", "0.4936179", "0.49048913", "0.4882294", "0.4877851", "0.48755404", "0.4865805", "0.4852528", "0.48485568", "0.48409018", "0.48399106", "0.48397526", "0.48180217", "0.4815235", "0.48144487", "0.47985482", "0.4792524", "0.4792524", "0.476152", "0.47521234", "0.4747377", "0.4746634", "0.47458917", "0.4731587", "0.47285128", "0.4728462", "0.47019297", "0.46738178", "0.46651825", "0.46579656", "0.46517384", "0.46486062", "0.4648384", "0.46377066", "0.46292397", "0.46263087", "0.46016318", "0.45975277", "0.45967382", "0.45901135", "0.45837587", "0.45748332", "0.45745614", "0.45457208", "0.45425373", "0.4539839", "0.45378953", "0.4534552", "0.45323947", "0.44856772", "0.4437109", "0.44298336", "0.4415657", "0.4414741", "0.44132158", "0.44037345", "0.44033006", "0.44005507", "0.44005507", "0.44005507", "0.4392923", "0.43816966", "0.4380282", "0.43778735", "0.4370531", "0.43694538" ]
0.6203847
1
Sets the IAM Policy for a resource
public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy> setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "public com.amazon.s3.SetBucketAccessControlPolicyResponse setBucketAccessControlPolicy(com.amazon.s3.SetBucketAccessControlPolicy setBucketAccessControlPolicy);", "public void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSetIamPolicyMethod(), getCallOptions(), request);\n }", "public com.amazon.s3.SetObjectAccessControlPolicyResponse setObjectAccessControlPolicy(com.amazon.s3.SetObjectAccessControlPolicy setObjectAccessControlPolicy);", "public void setPolicy(com.vmware.converter.DVSPolicy policy) {\r\n this.policy = policy;\r\n }", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "default void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSetIamPolicyMethod(), responseObserver);\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "public void setPolicy(String policy) {\r\n if (policy != null && !policy.equals(\"\")) {\r\n String[] rules = policy.trim().split(\",\");\r\n if (rules != null && rules.length > 0) {\r\n emptyPolicy();\r\n \r\n for (String s : rules) {\r\n addRule(new AccessRule(s));\r\n }\r\n }\r\n }\r\n }", "public String setPolicy(String asgName, String policyName, int capacity,\n\t\t\tString adjustmentType) {\n\t\t// asClient.setRegion(usaRegion);\n\t\tPutScalingPolicyRequest request = new PutScalingPolicyRequest();\n\n\t\trequest.setAutoScalingGroupName(asgName);\n\t\trequest.setPolicyName(policyName); // This scales up so I've put up at\n\t\t\t\t\t\t\t\t\t\t\t// the end.\n\t\trequest.setScalingAdjustment(capacity); // scale up by specific capacity\n\t\trequest.setAdjustmentType(adjustmentType);\n\n\t\tPutScalingPolicyResult result = asClient.putScalingPolicy(request);\n\t\tString arn = result.getPolicyARN(); // You need the policy ARN in the\n\t\t\t\t\t\t\t\t\t\t\t// next step so make a note of it.\n\n\t\tEnableMetricsCollectionRequest request1 = new EnableMetricsCollectionRequest()\n\t\t\t\t.withAutoScalingGroupName(asgName).withGranularity(\"1Minute\");\n\t\tEnableMetricsCollectionResult response1 = asClient\n\t\t\t\t.enableMetricsCollection(request1);\n\n\t\treturn arn;\n\t}", "public void setPolicyArn(String policyArn) {\n this.policyArn = policyArn;\n }", "public void setPolicy(String policyName, TPPPolicy tppPolicy) throws VCertException {\n if (!policyName.startsWith(TppPolicyConstants.TPP_ROOT_PATH))\n policyName = TppPolicyConstants.TPP_ROOT_PATH + policyName;\n\n tppPolicy.policyName( policyName );\n\n //if the policy doesn't exist\n if(!TppConnectorUtils.dnExist(policyName, tppAPI)){\n\n //verifying that the policy's parent exists\n String parentName = tppPolicy.getParentName();\n if(!parentName.equals(TppPolicyConstants.TPP_ROOT_PATH) && !TppConnectorUtils.dnExist(parentName, tppAPI))\n throw new VCertException(String.format(\"The policy's parent %s doesn't exist\", parentName));\n\n //creating the policy\n TppConnectorUtils.createPolicy( policyName, tppAPI );\n } else\n TppConnectorUtils.resetAttributes(policyName, tppAPI);\n\n //creating policy's attributes.\n TppConnectorUtils.setPolicyAttributes(tppPolicy, tppAPI);\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "protected void setAccessPolicies(Map<String, PolicyDocument> policies)\n {\n policies.put(\"GlueAthenaS3AccessPolicy\", getGlueAthenaS3AccessPolicy());\n policies.put(\"S3SpillBucketAccessPolicy\", getS3SpillBucketAccessPolicy());\n connectorAccessPolicy.ifPresent(policyDocument -> policies.put(\"ConnectorAccessPolicy\", policyDocument));\n }", "public void setResource(int newResource) throws java.rmi.RemoteException;", "public void setRWResource(RWResource theResource) {\n resource = theResource;\n }", "public void setPolicyLine(java.lang.String value);", "@Test\n public void testSetPolicy2() throws Exception {\n setupPermission(PathUtils.ROOT_PATH, getTestUser().getPrincipal(), true, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n setupPermission(null, getTestUser().getPrincipal(), true, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n\n setupPermission(getTestRoot(), null, EveryonePrincipal.getInstance(), false, JCR_NAMESPACE_MANAGEMENT);\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public synchronized void setEvictionPolicy(EvictionPolicy policy)\n {\n int nType = (policy == null ? EVICTION_POLICY_HYBRID\n : EVICTION_POLICY_EXTERNAL);\n configureEviction(nType, policy);\n }", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public void setPolicyURL(java.lang.String policyURL) {\n this.policyURL = policyURL;\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "protected void checkSetPolicyPermission() {\n\tSecurityManager sm = System.getSecurityManager();\n\tif (sm != null) {\n\t if (setPolicyPermission == null) {\n\t\tsetPolicyPermission = new java.security.SecurityPermission(\"setPolicy\");\n\t }\n\t sm.checkPermission(setPolicyPermission);\n\t}\n }", "public void setResource(ResourceInfo resource) {\n\t\tif (this.resource != null) {\n\t\t\tthrow new IllegalStateException(\"The resource pointer can only be set once for Resource [\" + name + \"]\");\n\t\t}\n\t\tthis.resource = resource;\n\t}", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public static void batchGetEffectiveIamPolicies(String[] resourceNames, String scope) {\n BatchGetEffectiveIamPoliciesRequest request =\n BatchGetEffectiveIamPoliciesRequest.newBuilder()\n .setScope(scope)\n .addAllNames(Arrays.asList(resourceNames))\n .build();\n try (AssetServiceClient client = AssetServiceClient.create()) {\n BatchGetEffectiveIamPoliciesResponse response = client.batchGetEffectiveIamPolicies(request);\n System.out.println(\"BatchGetEffectiveIamPolicies completed successfully:\\n\" + response);\n } catch (IOException e) {\n System.out.println(\"Failed to create client:\\n\" + e);\n } catch (ApiException e) {\n System.out.println(\"Error during BatchGetEffectiveIamPolicies:\\n\" + e);\n }\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "void clearPolicy() {\n policy = new Policy();\n }", "protected void setResource(final Resource resource) {\n this.resource = resource;\n }", "void setResourceID(String resourceID);", "public void setPolicyType(Enumerator newValue);", "@Override\n public void replaceAllItemPolicies(Context context, Item item, List<ResourcePolicy> newpolicies) throws SQLException,\n AuthorizeException\n {\n // remove all our policies, add new ones\n authorizeService.removeAllPolicies(context, item);\n authorizeService.addPolicies(context, newpolicies, item);\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}", "public void setScalePolicy(ScalePolicy policy) {\n\n\t}", "public static void apiManagementCreateProductPolicy(\n com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {\n manager\n .productPolicies()\n .createOrUpdateWithResponse(\n \"rg1\",\n \"apimService1\",\n \"5702e97e5157a50f48dce801\",\n PolicyIdName.POLICY,\n new PolicyContractInner()\n .withValue(\n \"<policies>\\r\\n\"\n + \" <inbound>\\r\\n\"\n + \" <rate-limit calls=\\\"{{call-count}}\\\" renewal-period=\\\"15\\\"></rate-limit>\\r\\n\"\n + \" <log-to-eventhub logger-id=\\\"16\\\">\\r\\n\"\n + \" @( string.Join(\\\",\\\", DateTime.UtcNow,\"\n + \" context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress,\"\n + \" context.Operation.Name) ) \\r\\n\"\n + \" </log-to-eventhub>\\r\\n\"\n + \" <quota-by-key calls=\\\"40\\\" counter-key=\\\"cc\\\" renewal-period=\\\"3600\\\"\"\n + \" increment-count=\\\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\\\" />\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </inbound>\\r\\n\"\n + \" <backend>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </backend>\\r\\n\"\n + \" <outbound>\\r\\n\"\n + \" <base />\\r\\n\"\n + \" </outbound>\\r\\n\"\n + \"</policies>\")\n .withFormat(PolicyContentFormat.XML),\n null,\n com.azure.core.util.Context.NONE);\n }", "private PolicyDocument getS3SpillBucketAccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"s3:GetObject\");\n statementActionsPolicy.add(\"s3:ListBucket\");\n statementActionsPolicy.add(\"s3:GetBucketLocation\");\n statementActionsPolicy.add(\"s3:GetObjectVersion\");\n statementActionsPolicy.add(\"s3:PutObject\");\n statementActionsPolicy.add(\"s3:PutObjectAcl\");\n statementActionsPolicy.add(\"s3:GetLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:PutLifecycleConfiguration\");\n statementActionsPolicy.add(\"s3:DeleteObject\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\n String.format(\"arn:aws:s3:::%s\", spillBucket),\n String.format(\"arn:aws:s3:::%s/*\", spillBucket)))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public FractalTrace setAbyssPolicy(String value)\n {\n\t\n m_AbyssPolicy = value;\n setProperty(\"abyss-policy\", value);\n return this;\n }", "void register(PolicyDefinition policyDefinition);", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void updatePolicy(CompanyPolicy cP ) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, cP.getPolicyNo());\n\t\t//Update fields which are allowed to modify\n\t\tcPolicy.setPolicyTag1(cP.getPolicyTag1());\n\t\tcPolicy.setPolicyTag2(cP.getPolicyTag2());\n\t\tcPolicy.setPolicyDesc(cP.getPolicyDesc());\n\t\tcPolicy.setPolicyDoc(cP.getPolicyDoc());\n\t\tsession.update(cPolicy); \n\t\ttx.commit();\n\t}", "@Override\r\n\tpublic void setGiveResource(ResourceType resource) {\n\t\t\r\n\t}", "@Override\r\n public void setImageResource(int resourceId)\r\n {\r\n new LoadResourceTask().execute(resourceId);\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public void setPolicyEffectiveDate(java.lang.String policyEffectiveDate) {\n this.policyEffectiveDate = policyEffectiveDate;\n }", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "public void setDefaultPolicy(Policy defaultPolicy) {\n\t\tif (defaultPolicy == null)\n\t\t\tthrow new NullPointerException();\n\t\tthis.defaultPolicy = defaultPolicy;\n\t}", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public SharedActivationPolicyPermission(String policy) {\n\tthis(policy, init(policy));\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request, responseObserver);\n }", "public ActiveIAMPolicyAssignment withPolicyArn(String policyArn) {\n setPolicyArn(policyArn);\n return this;\n }", "@Override\n\tpublic void setResourcePrimKey(long resourcePrimKey) {\n\t\t_changesetEntry.setResourcePrimKey(resourcePrimKey);\n\t}", "public LinkedIntegrationRuntimeRbacAuthorization setResourceId(String resourceId) {\n this.resourceId = resourceId;\n return this;\n }", "public void setLoadBalancerPolicy(String loadBalancerPolicy) {\n this.loadBalancerPolicy = loadBalancerPolicy;\n }", "public EditPolicy() {\r\n super();\r\n }", "@Nullable\n public ManagedAppPolicy put(@Nonnull final ManagedAppPolicy newManagedAppPolicy) throws ClientException {\n return send(HttpMethod.PUT, newManagedAppPolicy);\n }", "public int setCurrentResource(final Resource newResource) {\n currentSpinePos = book.getSpine().getResourceIndex(newResource);\n currentResource = newResource;\n return currentSpinePos;\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public MonitoringPoliciesResponse updateMonitoringPolicyProcess(UpdateMPProcessesRequest object, String policyId, String processId) throws RestClientException, IOException {\n return client.update(getUrlBase().concat(parentResource).concat(\"/\").concat(policyId).concat(\"/\").concat(resource).concat(\"/\").concat(processId), object, MonitoringPoliciesResponse.class, 202);\n }", "public DistributionPolicyInternal setName(String name) {\n this.name = name;\n return this;\n }", "public Object\n _set_policy_override(Policy[] policies,\n SetOverrideType set_add) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdPut(String policyId, String contentType,\n AdvancedThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n\n //overridden parameters\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n apiProvider.updatePolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public Optional<CancellationPolicy> updatePolicy(long policyId, CancellationPolicy editedPolicy) throws Exception{\n Optional<CancellationPolicy> updatedPolicy = cancellationPolicyRepository.findById(policyId).map((selectedPolicy) -> {\n selectedPolicy.getRules().clear();\n selectedPolicy.getRules().addAll(editedPolicy.getRules());\n selectedPolicy.getRules().forEach((rule) -> {\n rule.setPolicy(editedPolicy);\n });\n selectedPolicy.setPolicyId(editedPolicy.getPolicyId());\n selectedPolicy.setPolicyName(editedPolicy.getPolicyName());\n selectedPolicy.setPolicySource(editedPolicy.getPolicySource());\n selectedPolicy.setPolicyDescription(editedPolicy.getPolicyDescription());\n selectedPolicy.setPolicyUpdatedBy(editedPolicy.getPolicyUpdatedBy());\n selectedPolicy.setPolicyUpdatedOn();\n selectedPolicy.setPolicyCancelRestrictionDays(editedPolicy.getPolicyCancelRestrictionDays());\n selectedPolicy.setPolicyCancelRestrictionHours(editedPolicy.getPolicyCancelRestrictionHours());\n return cancellationPolicyRepository.save(selectedPolicy);\n });\n return updatedPolicy;\n }", "public void initResourceOfPlayer(Resource resource) throws IOException, InterruptedException {\n try {\n\n currentPlayer.initResource(resource);\n } catch (CallForCouncilException e) {\n exceptionHandler(e);\n } catch (LastSpaceReachedException e) {\n exceptionHandler(e);\n }\n currentPlayer.setInitResource(true);\n notifyToOneObserver(new UpdateInitResourceMessage(resource));\n notifyAllObserverLessOne(new UpdateForNotCurrentResourceMessage(resource));\n\n\n }", "public void giveResourcesToPlayer(Resource resource){\n resources.addResource(resource);\n }", "@Override\n\tprotected void createEditPolicies()\n\t{\n\t\t\n\t}", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "protected ValidatableResponse updateResource(String path, JSONObject newResource) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .contentType(ContentType.JSON)\n .body(newResource.toString())\n .when()\n .put(path)\n .then()\n .statusCode(204);\n }", "public void setStrategyResource(String strategyResource) {\n this.strategyResource = strategyResource;\n }", "@JsonProperty(\"resource\")\n public void setResource(String resource) {\n this.resource = resource;\n }", "public void setPolicyGroupName(String policyGroupName)\n {\n \tthis.policyGroupName = policyGroupName;\n }", "public void setResource(URI resource) {\n this.resource = resource;\n }", "PolicyController createPolicyController(String name, Properties properties);", "public void setContainerPolicy(ContainerPolicy containerPolicy) {\n this.containerPolicy = containerPolicy;\n }", "public boolean setRateLimit (String sliceName, String rate) \n\t\t\tthrows PermissionDeniedException;", "public void setResourceTo(ServiceCenterITComputingResource newResourceTo) {\n addPropertyValue(getResourcesProperty(), newResourceTo);\r\n }", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "public void setResourceArn(String resourceArn) {\n this.resourceArn = resourceArn;\n }", "AgentPolicyBuilder setJobPriority(JobPriority jobPriority);", "public PolicyIDImpl(String idString) {\n super(idString);\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateChannelPolicyMethod(), responseObserver);\n }", "@Override\n public void replaceAllBitstreamPolicies(Context context, Item item, List<ResourcePolicy> newpolicies)\n throws SQLException, AuthorizeException\n {\n // remove all policies from bundles, add new ones\n // Remove bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n bundleService.replaceAllBitstreamPolicies(context, mybundle, newpolicies);\n }\n }", "@Override\n public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeResourcePolicy(request);\n }", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public void setNatPolicy(NatPolicy policy);", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "public lnrpc.Rpc.PolicyUpdateResponse updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request) {\n return blockingUnaryCall(\n getChannel(), getUpdateChannelPolicyMethod(), getCallOptions(), request);\n }", "public void setRating(Rating rating) {\n double boundedRating = this.boundedRating(rating);\n this.normalisedRating = this.normaliseRating(boundedRating);\n this.ratingCount++;\n }", "public AssignTagTabItem(Resource resource){\n\t\tthis.resource = resource;\n\t\tthis.resourceId = resource.getId();\n\t}", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }" ]
[ "0.6696059", "0.60859275", "0.60794866", "0.60415757", "0.5680911", "0.55331045", "0.552961", "0.5435385", "0.54292244", "0.5387349", "0.53254884", "0.5307002", "0.52439326", "0.5039855", "0.5028793", "0.50054604", "0.49540916", "0.4936917", "0.49317548", "0.4896201", "0.4888755", "0.48866346", "0.48629183", "0.4844842", "0.48376587", "0.48295635", "0.48276612", "0.48075965", "0.4794633", "0.47928157", "0.47656748", "0.4759175", "0.47528395", "0.47313592", "0.46628112", "0.46148664", "0.4587609", "0.4580968", "0.45774427", "0.45703512", "0.45530686", "0.45497006", "0.45388883", "0.45308846", "0.45279187", "0.45148787", "0.45078763", "0.44927454", "0.44886774", "0.44885096", "0.44885096", "0.44849482", "0.4478914", "0.4471638", "0.4461956", "0.44445106", "0.44426528", "0.4441641", "0.4434699", "0.44291475", "0.44257775", "0.44249514", "0.44075894", "0.44032705", "0.43786553", "0.43744436", "0.4372399", "0.43577147", "0.43550155", "0.4354426", "0.4353711", "0.43515274", "0.435029", "0.43440023", "0.43292293", "0.43275815", "0.4319506", "0.43158913", "0.4310972", "0.43042699", "0.42977384", "0.4295396", "0.42890364", "0.4275814", "0.4275814", "0.4275814", "0.4271574", "0.42687142", "0.4255559", "0.4252595", "0.42343527", "0.42316887", "0.42206535", "0.42001206", "0.4199483", "0.41992596", "0.41985342", "0.41973558", "0.4196711", "0.41952947" ]
0.5857578
4
Tests IAM permissions for a resource (namespace, service or service workload only).
public com.google.common.util.concurrent.ListenableFuture< com.google.iam.v1.TestIamPermissionsResponse> testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasResourceActionAllowPermissions(Resource resource,\n String action) {\n String whereClause = \"p.resource = :resource AND (\"\n + \"(p.action = :action AND p.type = :typeAllow) OR \"\n + \"(p.type = :typeAllowAll))\";\n Map<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"resource\", resource.getIdentifier());\n parameters.put(\"action\", action);\n parameters.put(\"typeAllow\", PermissionType.ALLOW);\n parameters.put(\"typeAllowAll\", PermissionType.ALLOW_ALL);\n\n Long count = FacadeFactory.getFacade().count(PermissionEntity.class,\n whereClause, parameters);\n\n return count > 0 ? true : false;\n }", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "public int getPermission(Integer resourceId);", "public void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request);\n }", "@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}", "public boolean checkPermissions(String account,String group, String resource, String action)\n throws Exception\n {\n return checkPermissions(new PolicyCredentials(account,group),resource,action);\n }", "@Test\n public void testJdoeAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/jdoe\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"jdoe\");\n\n // jdoe can access information about alice because he is granted with \"people-manager\" role\n response = makeRequest(\"http://localhost:8080/api/alice\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"alice\");\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "default void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getTestIamPermissionsMethod(), responseObserver);\n }", "public boolean checkPermissions(PolicyCredentials credentials, String resource, String action) throws Exception {\n //\n // Set our permissions to null.\n perm = null ;\n //\n // Check if we have a service reference.\n if (null != service)\n {\n perm = service.checkPermissions(credentials,resource,action);\n }\n //\n // Return true if we got a result, and the permissions are valid.\n return (null != perm) ? perm.isValid() : false ;\n }", "@Test\n\tpublic void testIsPermitted_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isHasPermissions();", "void checkPermission(T request) throws AuthorizationException;", "@Test\n\tpublic void testIsPermitted_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "boolean isWritePermissionGranted();", "@Test\n public void testWithExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n AuthorizationResponse response = authzClient.authorization(\"marta\", \"password\", \"foo\")\n .authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource A with client scope bar.\n request = new PermissionRequest(\"Resource A\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource B with client scope bar.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n }", "@Test\n\tpublic void testIsPermitted_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = null;\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "public boolean checkPermission(Permission permission);", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target,\n IPermissionPolicy policy)\n throws AuthorizationException;", "@Test\n public void testWithoutExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"baz\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n\n // Access Resource B with client scope foo.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"foo\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n }", "@Test\n public void testCheckExistsPermission() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE\");\n assertFalse(permissionManager.checkExists(permission2));\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Test\n\tpublic void testIsPermitted_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public abstract boolean checkRolesAllowed(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "public Permissions[] getPermissionsNeeded(ContainerRequestContext context) throws Exception {\n Secured auth = resourceInfo.getResourceMethod().getAnnotation(Secured.class);\n\n // If there's no authentication required on method level, check class level.\n if (auth == null) {\n auth = resourceInfo.getResourceClass().getAnnotation(Secured.class);\n }\n\n // Else, there's no permission required, thus we chan continue;\n if (auth == null) {\n log.log(Level.INFO, \"AUTHENTICATION: Method: \" + context.getMethod() + \", no permission required\");\n return new Permissions[0];\n }\n\n return auth.value();\n }", "public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}", "@Test\n\tpublic void testIsPermitted_7()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n public void testDenyAccessWithRoleCondition() {\n denyAccessWithRoleCondition(false);\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "boolean hasPermission(final Player sniper, final String permission);", "@Test\n\tpublic void testCheckPermissions_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "Resource getAbilityResource();", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;", "public boolean hasPermission(Context paramContext, String paramString) {\n }", "@Test\n\tpublic void testCheckPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test(expected = org.jsecurity.authz.UnauthorizedException.class)\n\tpublic void testCheckPermission_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testCheckPermissions_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void testCheckExistsPermissionWithString() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE2\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission.getName()));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE2\");\n assertFalse(permissionManager.checkExists(permission2.getName()));\n }", "@Test\n\tpublic void testIsPermitted_8()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(null);\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void testIsPermitted_9()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void testGetSetPermission() throws Exception {\n\t Namespace n = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t n.getItem();\n\t String newName = UUID.randomUUID().toString();\n\t Namespace newNamespace = n.createNamespace(newName, \"Created for the purposes of testing\");\n\t // Lets set a strange permission on the namespace so we know what we're checking when \n\t // we get it back\n\t Permission p = new Permission(Policy.OPEN, new String[]{\"fluiddb\"});\n\t newNamespace.setPermission(Namespace.Actions.CREATE, p);\n\t \n\t // OK... lets try getting the newly altered permission back\n\t Permission checkP = newNamespace.getPermission(Namespace.Actions.CREATE);\n\t assertEquals(p.GetPolicy(), checkP.GetPolicy());\n\t assertEquals(p.GetExceptions()[0], checkP.GetExceptions()[0]);\n\t \n\t // Housekeeping to clean up after ourselves...\n\t newNamespace.delete();\n\t}", "@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "public abstract boolean canEditAccessRights(OwObject object_p) throws Exception;", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "@Test\n public void testGetPermissionInstance() throws Exception\n {\n permission = permissionManager.getPermissionInstance();\n assertNotNull(permission);\n assertTrue(permission.getName() == null);\n }", "@Test\n\tpublic void testGetPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;", "@Test\n\tpublic void testCheckPermission_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tfixture.checkPermission(permission);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testGetPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public static boolean isReadStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "void permissionGranted(int requestCode);", "@Test\n\tpublic void testIsPermittedAll_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n public void testRequestGrantedPermission() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // Request the permission and allow it\n BasePermissionActivity.Result firstResult = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(firstResult, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Request the permission and do nothing\n BasePermissionActivity.Result secondResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 1,\n BasePermissionActivity.class, null);\n\n // Expect the permission is granted\n assertPermissionRequestResult(secondResult, REQUEST_CODE_PERMISSIONS + 1,\n permissions, new boolean[] {true});\n }", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "@Override\n public void checkPermission(Permission perm) {\n }", "boolean memberHasPermission(String perm, Member m);", "private boolean checkReadOnlyAndNull(Shell shell, IResource currentResource)\n\t{\n\t\t// Do a quick read only and null check\n\t\tif (currentResource == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do a quick read only check\n\t\tfinal ResourceAttributes attributes = currentResource\n\t\t\t\t.getResourceAttributes();\n\t\tif (attributes != null && attributes.isReadOnly())\n\t\t{\n\t\t\treturn MessageDialog.openQuestion(shell, Messages.RenameResourceAction_checkTitle,\n\t\t\t\t\tMessageFormat.format(Messages.RenameResourceAction_readOnlyCheck, new Object[]\n\t\t\t\t\t\t{ currentResource.getName() }));\n\t\t}\n\n\t\treturn true;\n\t}", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }", "private void usersCheckPermission(PermissionRequest.ActionType grantedAction, IEntity entity)\n {\n authGrantedUser();\n try {\n executeAction(grantedAction, entity);\n } catch (AccessDeniedException e) {\n fail(\"Action \" + grantedAction.name() + \" was granted but could not be executed \" + entity.getEntityName());\n }\n\n authNotGrantedUser();\n try {\n executeAction(grantedAction, entity);\n fail(\"Action \" + grantedAction.name() + \" was not granted but could be executed \" + entity.getEntityName());\n } catch (AccessDeniedException e) {\n //\n }\n }", "@Test\n\tpublic void testIsPermittedAll_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Override\n\tpublic void authorize(String resourceName, String action, String rpcName)\n\t\t\tthrows Exception {\n\t}", "public interface IPermissions {\n}", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "@Test\n\tpublic void testIsPermittedAll_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "@Test\n\tpublic void testIsPermitted_6()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private static boolean isPermissionGranted(Context context, String permission) {\n if (ContextCompat.checkSelfPermission(context, permission)\n == PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG, permission + \" granted\");\n return true;\n }\n Log.i(TAG, permission + \" not granted yet\");\n return false;\n }", "@Override\n\tpublic boolean hasPermission(String string) {\n\t\treturn true;\n\t}", "@Test\n public void testDenyAccessWithNegateRoleCondition() {\n denyAccessWithRoleCondition(true);\n }", "@Test\n public void testPermissions() throws IOException {\n Note note = notebook.createNote(\"note1\", anonymous);\n NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();\n // empty owners, readers or writers means note is public\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n notebookAuthorization.setOwners(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n notebookAuthorization.setReaders(note.getId(), new HashSet(Arrays.asList(\"user1\", \"user2\")));\n notebookAuthorization.setRunners(note.getId(), new HashSet(Arrays.asList(\"user3\")));\n notebookAuthorization.setWriters(note.getId(), new HashSet(Arrays.asList(\"user1\")));\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isOwner(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), false);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user3\"))), true);\n Assert.assertEquals(notebookAuthorization.isRunner(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user2\"))), false);\n Assert.assertEquals(notebookAuthorization.isWriter(note.getId(), new HashSet(Arrays.asList(\"user1\"))), true);\n // Test clearing of permissions\n notebookAuthorization.setReaders(note.getId(), Sets.<String>newHashSet());\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user2\"))), true);\n Assert.assertEquals(notebookAuthorization.isReader(note.getId(), new HashSet(Arrays.asList(\"user4\"))), true);\n notebook.removeNote(note.getId(), anonymous);\n }", "abstract public void getPermission();", "public boolean checkReadPermission(final String bucket_path) {\r\n\t\t\treturn checkReadPermission(BeanTemplateUtils.build(DataBucketBean.class).with(DataBucketBean::full_name, bucket_path).done().get());\r\n\t\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "@Test(dependsOnMethods = {\"modifyResource\"})\n public void modifyNotExistingResource() throws Exception {\n showTitle(\"modifyNotExistingResource\");\n\n try {\n UmaResource resource = new UmaResource();\n resource.setName(\"Photo Album 3\");\n resource.setIconUri(\"http://www.example.com/icons/flower.png\");\n resource.setScopes(Arrays.asList(\"http://photoz.example.com/dev/scopes/view\", \"http://photoz.example.com/dev/scopes/all\"));\n\n getResourceService().updateResource(\"Bearer \" + pat.getAccessToken(), \"fake_resource_id\", resource);\n } catch (ClientErrorException ex) {\n System.err.println(ex.getResponse().readEntity(String.class));\n int status = ex.getResponse().getStatus();\n assertTrue(status != Response.Status.OK.getStatusCode(), \"Unexpected response status\");\n }\n }", "int getPermissionRead();", "@Override\n public void checkPermission(final Permission permission) {\n List<Class> stack = Arrays.asList(getClassContext());\n\n // if no blacklisted classes are in the stack (or not recursive)\n if (stack.subList(1, stack.size()).contains(getClass()) || Collections.disjoint(stack, classBlacklist)) {\n // allow everything\n return;\n }\n // if null/custom and blacklisted classes present, something tried to access this class\n if (permission == null || permission instanceof StudentTesterAccessPermission) {\n throw new SecurityException(\"Security check failed.\");\n }\n // else iterate over all active policies and call their respective methods\n PermissionContext pc = new PermissionContext(stack, permission, instance);\n for (var policy : policies) {\n try {\n policy.getConsumer().accept(pc);\n } catch (SecurityException e) {\n triggered = true;\n // Illegal attempt caught, log an error or do smth\n LOG.severe(String.format(\"Illegal attempt caught: %s\", permission.toString()));\n throw e;\n }\n\n }\n }", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "@Test\n public void testMatchValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n assertTrue(\"no match\", filter.isResourceAccess(mtch));\n }", "@Test\n\tpublic void testIsPermittedAll_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public interface TestService {\n// @PreAuthorize(\"hasAuthority('test')\")\n String test();\n}", "public interface RuntimePermissionRequester {\n /**\n * Asks user for specific permissions needed to proceed\n *\n * @param requestCode Request permission using this code, allowing for\n * callback distinguishing\n */\n void requestNeededPermissions(int requestCode);\n}", "boolean isPermissionsReviewRequired(@NonNull String packageName,\n @UserIdInt int userId);", "public static boolean isWriteStorageAllowed(FragmentActivity act) {\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "PermissionService getPermissionService();", "boolean needsStoragePermission();", "public interface PermissionsInstance {\n\n\t/**\n\t * Check whether the specified member has permission for the following action\n\t * @param perm The permission name\n\t * @param m The member\n\t * @return True, if the member can do the action\n\t */\n\tboolean memberHasPermission(String perm, Member m);\n\t\n}", "public static void checkPermission(com.tangosol.net.Cluster cluster, String sServiceName, String sCacheName, String sAction)\n {\n // import com.tangosol.net.ClusterPermission;\n // import com.tangosol.net.security.Authorizer;\n // import com.tangosol.net.security.DoAsAction;\n // import java.security.AccessController;\n // import javax.security.auth.Subject;\n \n Authorizer authorizer = getAuthorizer();\n Security security = Security.getInstance();\n \n if (authorizer == null && security == null)\n {\n return;\n }\n \n _assert(sServiceName != null, \"Service must be specified\");\n \n String sTarget = \"service=\" + sServiceName +\n (sCacheName == null ? \"\" : \",cache=\" + sCacheName);\n ClusterPermission permission = new ClusterPermission(cluster == null || !cluster.isRunning() ? null :\n cluster.getClusterName(), sTarget, sAction);\n Subject subject = null;\n \n if (authorizer != null)\n {\n subject = authorizer.authorize(subject, permission);\n }\n \n if (security != null)\n {\n Security.CheckPermissionAction action = new Security.CheckPermissionAction();\n action.setCluster(cluster);\n action.setPermission(permission);\n action.setSubject(subject);\n action.setSecurity(security);\n \n AccessController.doPrivileged(new DoAsAction(action));\n }\n }", "void requestNeededPermissions(int requestCode);", "@Override\n public boolean hasPermission(User user, E entity, Permission permission) {\n\n // always grant READ access (\"unsecured\" object)\n if (permission.equals(Permission.READ)) {\n logger.trace(\"Granting READ access on \" + entity.getClass().getSimpleName() + \" with ID \" + entity.getId());\n return true;\n }\n\n // call parent implementation\n return super.hasPermission(user, entity, permission);\n }", "int getPermissionWrite();", "public boolean hasPermission(T object, Permission permission, User user);", "@Test\n public void testRuntimeGroupGrantSpecificity() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // request only one permission from the 'contacts' permission group\n BasePermissionActivity.Result result = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class,\n () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(result, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Make sure no undeclared as used permissions are granted\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n }" ]
[ "0.62609655", "0.614489", "0.6059014", "0.6052047", "0.60418904", "0.5881448", "0.5837688", "0.58285403", "0.57378787", "0.57052714", "0.5686623", "0.5647186", "0.56416863", "0.5606313", "0.55745894", "0.55635655", "0.5555606", "0.55484825", "0.55294716", "0.55029833", "0.5498206", "0.5495045", "0.54808104", "0.5467719", "0.543988", "0.5432032", "0.5431706", "0.54313856", "0.5429418", "0.54257643", "0.54229456", "0.5418606", "0.5416723", "0.53856975", "0.53584117", "0.5350034", "0.5343855", "0.534136", "0.5332795", "0.5332004", "0.5321108", "0.530284", "0.5272554", "0.5269057", "0.52528816", "0.5240779", "0.5236675", "0.52361387", "0.5231748", "0.5223839", "0.5221514", "0.5211344", "0.5205033", "0.51960355", "0.51888114", "0.51850057", "0.5184675", "0.51822853", "0.51771885", "0.51771057", "0.51644033", "0.51578516", "0.51577955", "0.51407737", "0.51406074", "0.51393294", "0.5138801", "0.51375484", "0.5125752", "0.51201576", "0.511362", "0.51086164", "0.509827", "0.5092583", "0.50835776", "0.5081875", "0.5073596", "0.5071088", "0.507024", "0.505556", "0.5051185", "0.5047056", "0.5039472", "0.5038698", "0.50296915", "0.50295234", "0.50220937", "0.50157875", "0.5010187", "0.5002272", "0.49978805", "0.4997564", "0.499107", "0.49909115", "0.4984742", "0.4982276", "0.49758217", "0.49731117", "0.49702263", "0.49677885" ]
0.56532615
11
PRIVATE METHODS Returns all refueling records in the database
private Cursor readReducedRefuelings() { return mDbHelper.getWritableDatabase().query( DatabaseOpenHelper.TABLE_NAME, DatabaseOpenHelper.reducedColumns, null, new String[] {}, null, null, DatabaseOpenHelper._ID + " DESC"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Referee> findAllReferees(){\n\t\treturn refereeRepository.findAll();\n\t}", "private List<Reference> getReferences() {\n logger.debug(\"Get references\");\n\n List<Reference> references = new ArrayList<Reference>();\n\n String query = \"SELECT reference_line, pr.reference_id FROM pride_experiment pe, pride_reference pr, pride_reference_exp_link pl WHERE \" +\n \"pe.accession = ? AND pl.reference_id = pr.reference_id AND pl.experiment_id = pe.experiment_id\";\n\n List<Map<String, Object>> results = jdbcTemplate.queryForList(query, getForegroundExperimentAcc());\n for (Map<String, Object> result : results) {\n List<UserParam> userParams = getUserParams(\"pride_reference_param\", ((Long) result.get(\"reference_id\")).intValue());\n List<CvParam> cvParams = getCvParams(\"pride_reference_param\", ((Long) result.get(\"reference_id\")).intValue());\n references.add(new Reference((String) result.get(\"reference_line\"), new ParamGroup(cvParams, userParams)));\n }\n\n return references;\n }", "public List<Refueling> getPendingRefuelings() throws DataAccessException;", "private List<DataRecord> loadRefTableChanges() {\n \n final DataSource changesDataSource =\n ProjectUpdateWizardUtilities\n .createDataSourceForTable(ProjectUpdateWizardConstants.AFM_FLDS_TRANS);\n changesDataSource.addRestriction(Restrictions.in(\n ProjectUpdateWizardConstants.AFM_FLDS_TRANS, CHANGE_TYPE, DifferenceMessage.NEW.name()\n + \",\" + DifferenceMessage.REF_TABLE.name()));\n changesDataSource.addRestriction(Restrictions.eq(\n ProjectUpdateWizardConstants.AFM_FLDS_TRANS, CHOSEN_ACTION,\n Actions.APPLY_CHANGE.getMessage()));\n\n return changesDataSource.getRecords();\n }", "public Collection<Reference> getReferences();", "public Collection<UniqueID> getReferenceList() {\n return ObjectGraph.getReferenceList(this.id);\n }", "Table getReferences();", "@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}", "public List<Record>getRecords(){\n List<Record>recordList=new ArrayList<>();\n RecordCursorWrapper currsorWrapper=queryRecords(null,null);\n try{\n currsorWrapper.moveToFirst();\n while(!currsorWrapper.isAfterLast()){\n recordList.add(currsorWrapper.getRecord());\n currsorWrapper.moveToNext();\n }\n }finally {\n currsorWrapper.close();\n }\n return recordList;\n }", "public List <reclamation> findall(){\n\t\tList<reclamation> a = reclamationRepository.findAll();\n\t\t\n\t\tfor(reclamation reclamations : a)\n\t\t{\n\t\t\tL.info(\"reclamations :\"+ reclamations);\n\t\t\t\n\t\t}\n\t\treturn a;\n\t\t}", "public ArrayList<Reponce> getAllReponces() {\n\t\tArrayList<Reponce> listReponces = new ArrayList<Reponce>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t// start a transaction\n\t\t//Transaction transaction = session.beginTransaction();\n\t\tQuery en = session.createQuery(\"FROM Reponce\", Reponce.class);\n\t\tlistReponces = (ArrayList<Reponce>) en.getResultList();\n\t\treturn listReponces;\n\t}", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "public List<String> getAllXrefs() {\n\t List<String> xrefList = new ArrayList<String>();\n\t // Select All Query\n\t String selectQuery = \"SELECT * FROM \" + XREF_TABLE;\n\t \n\t SQLiteDatabase db = this.getWritableDatabase();\n\t Cursor cursor = db.rawQuery(selectQuery, null);\n\t \n\t // looping through all rows and adding to list\n\t if (cursor.moveToFirst()) {\n\t do {\n\t xrefList.add(\"Barcode Number: \" + cursor.getString(0) + \" Order Number: \" + cursor.getString(1));\n\t } while (cursor.moveToNext());\n\t }\n\t \n\t // return contact list\n\t return xrefList;\n\t}", "@Override\n public List<RefsetEntry> getRefsetEntries() {\n return refsetEntries;\n }", "List<Bill> all() throws SQLException;", "public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}", "public ReadOnlyIterator<Relation> getAllRelations();", "Iterator<Column> referencedColumns();", "public List<AssetRef> retrieveAllRefs(Date cutoffDate) throws IOException, SQLException {\n List<AssetRef> assetRefList = null;\n String select = \"select definition_id, name, ref from ASSET_REF \";\n if (cutoffDate != null)\n select += \"where ARCHIVE_DT >= ? \";\n select += \"order by ARCHIVE_DT desc\";\n try (Connection conn = getDbConnection();\n PreparedStatement stmt = conn.prepareStatement(select)) {\n if (cutoffDate != null)\n stmt.setTimestamp(1, new Timestamp(cutoffDate.getTime()));\n try (ResultSet rs = stmt.executeQuery()) {\n assetRefList = new ArrayList<AssetRef>();\n while (rs.next()) {\n String name = rs.getString(\"name\");\n if (name != null && !name.endsWith(\"v0\")) // Ignore version 0 assets\n assetRefList.add(new AssetRef(rs.getString(\"name\"), rs.getLong(\"definition_id\"), rs.getString(\"ref\")));\n }\n }\n }\n return assetRefList;\n }", "public List<Record> listAllRecords();", "public abstract void queryReferences(CoreEditorTableModel model) throws SQLException;", "public Cursor getAllRelationships() {\n SQLiteDatabase relationshipDatabase = relationshipDbHelper.getReadableDatabase();\n return relationshipDatabase.rawQuery(\n \"SELECT * FROM \" + RelationshipEntry.TABLE_NAME, null);\n }", "Variable getRefers();", "@Override\n @Transactional(readOnly = true)\n public List<RecordDTO> findAll() {\n log.debug(\"Request to get all Records\");\n return recordRepository.findAll().stream()\n .map(recordMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public final List<Element> getReferences() {\r\n return this.getReferences(true, true);\r\n }", "List<Receipt> getAllReceipts() throws DbException;", "public ReferenceList getRefList( )\n {\n return _refList;\n }", "List<Reimbursement> retrieveAllReimbursements();", "public void linkRecords();", "@GetMapping(\"/def-relations\")\n @Timed\n public List<DefRelation> getAllDefRelations() {\n log.debug(\"REST request to get all DefRelations\");\n return defRelationService.findAll();\n }", "@Override\n public List<BookmarkEntity> findAll() {\n logger.info(\"Entering findAll() in BookmarkDAO\");\n return bookmarkRepository.findAll();\n\n }", "Collection<Book> getAll();", "@Override\n\tpublic List<Resident> getAll() {\n\t\tList<Resident> list = null;\n\t\ttry {\n\t\t\tlist = repository.findAll();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Repair> queryAll() {\n\t\treturn repairDao.queryAll();\r\n\t}", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(CertificationConstants.DB_TABLE, CertificationConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "public List<AbsRecord> getRecords()\n\t{\n\t\treturn getRecordBy(null, new GAZRecordRowMapper());\n\t}", "protected ResultSet getResultSet ()\n throws SQLException\n {\n if ( this.refId == Id.UNDEFINED )\n return this.dbHelper.queryData(this.type, this.id, this.getDbColumns());\n else\n return this.dbHelper.queryDataOfRefTarget\n (this.fromDocType, this.type, this.refId, this.getDbColumns());\n }", "public List<AbsRecord> getRecords()\n\t{\n\t\treturn getRecordBy(null, new HBRecordRowMapper());\n\t}", "public ReadOnlyIterator<Relation> getAllIncomingRelations();", "public List findAll() {\n\t\treturn dao.findAll();\r\n\t}", "@Transactional\n\t@Override\n\tpublic List<Detail> findAll() {\n\t\treturn null;\n\t}", "@Transactional(readOnly = true)\n public List<SubRedditData> getAll() {\n return subRedditRepository.findAll()\n .stream()\n .map(subRedditMapperInterface::mapSubRedditToData)\n .collect(Collectors.toList());\n }", "public ResultSet getRecords() throws SQLException{\n Statement stmt = getConnection().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n String sqlGet = \"SELECT * FROM myStudents\";\n stmt.executeQuery(sqlGet);\n ResultSet rs = stmt.getResultSet();\n return rs;\n }", "@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }", "List<OrdPaymentRefDTO> findAll();", "java.util.List<org.jetbrains.r.rinterop.RRef> \n getRefsList();", "@Override\n public List<T> findAll() {\n String getAllQuery = \"SELECT * FROM \" + getTableName();\n return getJdbcTemplate().query(getAllQuery,\n BeanPropertyRowMapper.newInstance(getEntityClass()));\n }", "LiveData<List<Recommendation>> getAllRecsSortRefreshed() {\n allRecs = recommendationRepository.getAllRecsSortRefreshed();\n return allRecs;\n }", "public Cursor fetchAllPreg() {\n\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_TIME,\n KEY_BODY}, null, null, null, null, null);\n }", "@Override\n\tpublic List<Subordination> readAll() throws DBOperationException {\n\t\treturn null;\n\t}", "public ArrayList<T> all() throws SQLException {\n\t\tPreparedStatement stmt = DatabaseConnection.get().prepareStatement(\"select * from \"+table_name() + order_string());\n\t\treturn where(stmt);\n\t}", "public ReadOnlyIterator<Relation> getRelations();", "private final List<Element> getReferences(final Document doc, final boolean wantSingle, boolean wantMulti) {\r\n return this.desc.getReferences(doc, getName(), wantSingle, wantMulti);\r\n }", "@Override\n public List<Revue> getAll() {\n return null;\n }", "public Vector getAllRecord() throws SQLException, Exception {\n\t\tString query = \"Select * from tblDRARes order by Resource\";\n\t\t\n\t\tVector v=new Vector();\n\t\t\n\t\tConnection con = null;\n\t\tStatement st = null;\n\t\tResultSet rs = null;\n\n\t\ttry{\n\t\t\tcon=ConnectionBean.getConnection();\n\t\t\tst=con.createStatement();\n\t\t\trs=st.executeQuery(query);\n\t\t\twhile(rs.next()){\n\t\t\t\tvotblDRARES vo=new votblDRARES();\n\t\t\t\tvo.setCompetencyID(rs.getInt(\"CompetencyID\"));\n\t\t\t\t\n\t\t\t\tvo.setFKCompanyID(rs.getInt(\"FKCompanyID\"));\n\t\t\t\tvo.setFKOrganizationID(rs.getInt(\"FKOrganizationID\"));\n\t\t\t\tvo.setIsSystemGenerated(rs.getInt(\"IsSystemGenerated\"));\n\t\t\t\tvo.setResID(rs.getInt(\"ResID\"));\n\t\t\t\tvo.setResource(rs.getString(\"Resource\"));\n\t\t\t\tvo.setResType(rs.getInt(\"ResType\"));\n\t\t\t\t\n\t\t\t\tv.add(vo);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"DevelpmentResources.java - getAllRecord- \"+e);\n\t\t}finally{\n\t\t\tConnectionBean.closeRset(rs); //Close ResultSet\n\t\t\tConnectionBean.closeStmt(st); //Close statement\n\t\t\tConnectionBean.close(con); //Close connection\n\n\t\t}\n\t\treturn v;\n\t}", "public static List<Address> GetAllRecordsFromTable() {\n\n return SQLite.select().from(Address.class).queryList();\n\n\n }", "public List<String> getRecordings(){\n findRecordings();\n return _records;\n }", "public List<T> findAll() throws NoSQLException;", "@SuppressWarnings(\"rawtypes\")\n\tpublic List<Census> retrieveAll()\n\t{\n\t\t\n\t\topen();\n\t\tList<Census> list=new LinkedList<Census>();\n\t\ttry\n\t\t{\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\t\n\t\t\tObjectSet result =query.execute();\n\t\t\t\n\t\t\twhile(result.hasNext())\n\t\t\t{\n\t\t\t\tlist.add((Census)result.next());\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\t\n\t\treturn list;\n\t}", "public List<BillingRecord> list() {\n\t\tList<BillingRecord> billingRecords = new ArrayList<BillingRecord>();\n\t\tbillingRecords = billingRecordRepo.findAll();\n\t\treturn billingRecords;\n\t}", "@Override\n\tpublic List<Book> findAll() {\n\t\treturn dao.findAll();\n\t}", "@Override\n @Transactional\n public List<Contacts> findAll() {\n Session currentSession = entiyManager.unwrap(Session.class);\n\n //create the query\n\n Query<Contacts> theQuery = currentSession.createQuery(\"from Contacts\", Contacts.class);\n\n //execute query and get result list\n\n List<Contacts> contacts = theQuery.getResultList();\n\n //return the results\n\n return contacts;\n }", "@Override\n\tpublic ArrayList<Parent> queryAll() {\n\t\treturn parentDao.queryAll();\n\t}", "public java.lang.Object[] getRelationsAsReference() {\n return relationsAsReference;\n }", "@Override\n\tpublic List<BookCopies> get() throws SQLException {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic List<Batch> findAllCurrent();", "public List<Revista> getRevistas(){\n List<Revista> revistas = new ArrayList<>();\n Revista r = null;\n String id, nome, categoria, nrConsultas, editorID, empresaID;\n LocalDate edicao;\n\n\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT * FROM Revista\");\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n id = rs.getString(\"ID\");\n nome = rs.getString(\"Nome\");\n edicao = rs.getDate(\"Edicao\").toLocalDate();\n categoria = rs.getString(\"Categoria\");\n nrConsultas = rs.getString(\"NrConsultas\");\n editorID = rs.getString(\"Editor_ID\");\n empresaID = rs.getString(\"Empresa_ID\");\n r = new Revista(id,nome,edicao,categoria,nrConsultas,editorID,empresaID);\n revistas.add(r);\n }\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally{\n con.close(connection);\n }\n return revistas;\n }", "public Iterable<Relationship> getRelationships();", "private List<String> queryForAll() {\n // query for all of the data objects in the database\n List<Contact> list = dao.queryForAll();\n List<String> creadentials = new ArrayList<String>();\n for (Contact contact : list) {\n creadentials.add(contact.email);\n creadentials.add(contact.password);\n }\n return creadentials;\n }", "public java.util.List<DataEntry> findAll();", "public List<Record> getAllCallRecords() {\n return new ArrayList<>(mCallRecords);\n }", "private static List<RefSeqEntry> getAllRefSeqEntries(VariantContext vc) {\n List<RefSeqEntry> allRefSeq = new LinkedList<RefSeqEntry>();\n\n for (Map.Entry<String, String> entryToName : getRefSeqEntriesToNames(vc).entrySet()) {\n String entry = entryToName.getKey();\n String entrySuffix = entry.replaceFirst(NAME_KEY, \"\");\n allRefSeq.add(new RefSeqEntry(vc, entrySuffix));\n }\n\n return allRefSeq;\n }", "Collection<Feature> getReference();", "private List<Woacrawledurl> readCrawledUrls()\n\t{\n\t\tString hql = \"from Woacrawledurl where instanceId=\"\n\t\t\t\t+ this.param.instance.getTaskinstanceId() + \"order by id\";\n\t\tSessionFactory sessionFactory = TaskFactory.getSessionFactory(this.param.dbid);\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tTransaction t = session.beginTransaction();\n\t\tQuery q = session.createQuery(hql);\n\t\tList<Woacrawledurl> list = q.list();\n\t\tt.commit();\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}", "public java.util.List<ReferenceLine> getReferenceLines() {\n return referenceLines;\n }", "public Set<CompoundName> getResult() { return references; }", "public Cursor getAll()\r\n {\r\n \treturn mDb.query(DB_TABLE_NAME, new String[] {\"_id\",\"fundId\", \"moneyPaid\", \"currentValue\", \"units\", \"simpleReturn\"}, null, null, null, null, null);\r\n }", "@Transactional(readOnly = true)\n Collection<DataRistorante> getAll();", "public List<Consultor> getConsultores()\n\t{\n\t\tList<Consultor> nombres = new ArrayList<Consultor>();\n\t\tLinkedList<Consultor> tb = Consultor.findAll();\n\t\tfor(Consultor c : tb)\n\t\t{\n\t\t\tnombres.add(c);\n\t\t}\n\t\treturn nombres;\t\n\t}", "public Cluster[] getReferences () {\n return references;\n }", "@Override\r\n\tpublic List<BackStone> findAllBackStone() {\n\t\tLOGGER.info(\"查找所有的退石记录:>>\" );\r\n\t\treturn backStoneDao.findAllBackStone();\r\n\t}", "public List<Book> findAll()\r\n\t{\r\n\t\tList<Book> booklist= null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSession();\r\n\t\t booklist=bookdao.findAll();\r\n\t\t\tbookdao.closeCurrentSession();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn booklist;\r\n\t}", "public List<Connection> getReferenceDataConnections()\n {\n if (referenceDataConnections == null)\n {\n return null;\n }\n else if (referenceDataConnections.isEmpty())\n {\n return null;\n }\n else\n {\n return referenceDataConnections;\n }\n }", "public List<Courtyard> findCourtyardAll() {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Courtyard> courtyards = courtyardMapper.findCourtyardAll();\n\t\tSystem.out.println(\"--Into Dao Method of findCourtyardAll!!!--\");\n\t\treturn courtyards;\n\t}", "public List<CellRef> getCellReferences()\n {\n return myCellReferences;\n }", "@Override\n\tpublic List<Employee_Table> allRemList() {\n\t\tList<Employee_Table> tables = new ArrayList<Employee_Table>();\n\t\ttry (Connection con = ConnectionService.getConnection()) {\n\t\t\t\n\t\t\tString sql = \"SELECT * FROM (SELECT E.EMPLOYEE_ID ,E.FIRSTNAME, E.LASTNAME, E.ISADMIN, E.MANAGER_ID, M.FIRSTNAME AS M_F, M.LASTNAME AS M_L\\r\\n\" + \n\t\t\t\t\t\"FROM EMPLOYEE_TABLE E, EMPLOYEE_TABLE M\\r\\n\" + \n\t\t\t\t\t\"WHERE E.MANAGER_ID = M.EMPLOYEE_ID) E\\r\\n\" + \n\t\t\t\t\t\"JOIN REIMBURSEMENT_TABLE R\\r\\n\" + \n\t\t\t\t\t\"ON E.EMPLOYEE_ID = R.EMPLOYEE_ID \"+ \n\t\t\t\t\t\"ORDER BY REIMBURSEMENT_ID DESC\";\t\t\t\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\n\t\t\tpstmt.executeQuery();\n\t\t\tResultSet rs=pstmt.getResultSet();\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee_Table table = new Employee_Table();\n\t\t\t\ttable.setEmployee_id(rs.getInt(\"EMPLOYEE_ID\")); \n\t\t\t\ttable.setFirstName(rs.getString(\"FIRSTNAME\"));\n\t\t\t\ttable.setLastName(rs.getString(\"LASTNAME\"));\n\t\t\t\ttable.setIsAdmin(rs.getInt(\"ISADMIN\"));\n\t\t\t\ttable.setManager_id(rs.getInt(\"MANAGER_ID\"));\n\t\t\t\ttable.setM_f(rs.getString(\"M_F\"));\n\t\t\t\ttable.setM_l(rs.getString(\"M_L\"));\n\t\t\t\tint reimbursement_id = rs.getInt(\"REIMBURSEMENT_ID\");\n\t\t\t\tString details = rs.getString(\"DETAILS\");\n\t\t\t\tString status = rs.getString(\"STATUS\");\n\t\t\t\tdouble balance = rs.getDouble(\"BALANCE\");\n\t\t\t\tint employee_id = rs.getInt(\"EMPLOYEE_ID\");\n\t\t\t\tLocalDate s_date = rs.getDate(\"S_DATE\").toLocalDate();\n\t\t\t\ttable.setRtable(new Reimbursement_Table(reimbursement_id, details, balance, employee_id, status, s_date));\n\t\t\t\ttables.add(table);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn tables;\n\t}", "public String[] listRelations();", "public List<Bill> getBill() {\n\tString sql =\"SELECT * FROM bills JOIN employees e on bills.Id_employees = e.Id_employees JOIN food f on bills.Id_food = f.Id_food\";\n\tList<Bill> list = new ArrayList<Bill>();\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tBill getBill = new Bill();\n\t\t\tgetBill.setId(resultSet.getInt(\"Id_bills\"));\n\t\t\tgetBill.setFood(resultSet.getString(\"Name\"));\n\t\t\tgetBill.setEmployyes(resultSet.getString(\"Name_and_surname\"));\n\t\t\tgetBill.setPrice(resultSet.getDouble(\"Price\"));\n\t\t\tgetBill.setSerialNumber(resultSet.getString(\"Serial_Number_Bill\"));\n\t\t\tgetBill.setTotal(resultSet.getDouble(\"TOTAL\"));\n\t\t\tlist.add(getBill);\n\t\t}\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public List<DBDoc> getAllObjects() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic List<Libro> readAll() {\n\t\treturn libroRepository.findAll();\r\n\t}", "@Override\n\tpublic List<Libro> readAll() {\n\t\treturn libroDao.readAll();\n\t}", "public List<ForeignKey> getForeignKeysOut();", "public List<Bill> getDrinkforBill() {\n\t\n\tString sql = \"SELECT * FROM bills join employees e on bills.Id_employees = e.Id_employees join drink d on bills.Id_drink = d.Id_drink\";\n\t\n\tList<Bill>getDrinkForBill = new ArrayList<Bill>();\n\t\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = ps.executeQuery();\n\t\t\n\t\twhile(rs.next()) {\n\t\t\t\n\t\t\tBill drinkBill = new Bill();\n\t\t\tdrinkBill.setId(rs.getInt(\"Id_bills\"));\n\t\t\tdrinkBill.setDrink(rs.getString(\"Name_Drink\"));\n\t\t\tdrinkBill.setEmployyes(rs.getString(\"Name_and_surname\"));\n\t\t\tdrinkBill.setPrice(rs.getDouble(\"Price\"));\n\t\t\tdrinkBill.setSerialNumber(rs.getString(\"Serial_Number_Bill\"));\n\t\t\tdrinkBill.setTotal(rs.getDouble(\"TOTAL\"));\n\t\t\t\n\t\t\tgetDrinkForBill.add(drinkBill);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\n\t\n\treturn getDrinkForBill;\n}", "public List<UserReference> getUserReferences() {\n return userReferences;\n }", "public List<UserReference> getUserReferences() {\n return userReferences;\n }", "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public Cursor fetchAllEntries() {\n /*\n return database.query(\n DATABASE_TABLE, \n new String[] { ROWID, MAC_ADDRESS, LATITUDE, LONGITUDE, FREQUENCY, SIGNAL}, \n null,\n null, \n null,\n null, \n null);\n */\n \n // sql must NOT be ';' terminated\n String sql = \"SELECT \"+ ROWID + \", \" + MAC_ADDRESS + \", \" + LATITUDE + \", \" + LONGITUDE + \", \" \n + NETWORK_NAME + \", \" + CAPABILITIES + \", \" + FREQUENCY + \", \" + SIGNAL\n + \" FROM \" + DATABASE_TABLE;\n return database.rawQuery(sql, null);\n }" ]
[ "0.7275837", "0.6878248", "0.67681557", "0.6704066", "0.6700901", "0.6586596", "0.6552245", "0.6220036", "0.6179646", "0.6179289", "0.6173924", "0.6160201", "0.6160201", "0.6147117", "0.6102296", "0.6043719", "0.59932286", "0.59640014", "0.5925851", "0.59183514", "0.5894033", "0.5881068", "0.5832552", "0.5807937", "0.5777605", "0.57705677", "0.5729206", "0.5726141", "0.5724674", "0.5715268", "0.5686622", "0.56813943", "0.56685776", "0.5666844", "0.56660944", "0.5661943", "0.56611955", "0.5659285", "0.5653829", "0.5645726", "0.5620678", "0.5609634", "0.56095874", "0.56081015", "0.5601634", "0.5598096", "0.55892855", "0.5588703", "0.557005", "0.5562957", "0.55552214", "0.5550799", "0.5548902", "0.5546058", "0.5544547", "0.5541023", "0.5525345", "0.55227566", "0.5520792", "0.55190355", "0.5508996", "0.5502421", "0.54944086", "0.5492921", "0.5485803", "0.5484425", "0.54815805", "0.5477433", "0.54575264", "0.54568845", "0.54529226", "0.54522467", "0.54493636", "0.5448009", "0.5446618", "0.54459685", "0.5441956", "0.5439838", "0.54385036", "0.5437101", "0.5432901", "0.54327524", "0.5427729", "0.54241216", "0.54220307", "0.542077", "0.54205424", "0.54134566", "0.5412475", "0.5408479", "0.5408164", "0.54037803", "0.5400904", "0.5398221", "0.53971845", "0.5395815", "0.5392699", "0.5392699", "0.53912914", "0.539101" ]
0.5717556
29
Created by Dani on 10/24/2016.
public interface IStmt { String toStr(); PrgState execute(PrgState state) throws StmtException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "public void mo38117a() {\n }", "private void poetries() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void m50366E() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void memoria() {\n \n }", "@Override\n void init() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n protected void initialize() \n {\n \n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public final void mo91715d() {\n }", "Petunia() {\r\n\t\t}", "@Override public int describeContents() { return 0; }", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tpublic void init() {}", "private TMCourse() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo21877s() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "public void mo21779D() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void mo12930a() {\n }", "@Override\n public String toString() {\n return \"\";\n }" ]
[ "0.5989195", "0.58673245", "0.58568084", "0.579372", "0.5790493", "0.5742429", "0.5742429", "0.5672446", "0.5663852", "0.56195116", "0.5614426", "0.5606821", "0.56046474", "0.5584311", "0.5569667", "0.5542484", "0.5541754", "0.55378294", "0.55151206", "0.55120397", "0.5496256", "0.54769707", "0.54682326", "0.54610354", "0.5453332", "0.5442304", "0.54193544", "0.5417114", "0.54166305", "0.5411503", "0.5406054", "0.54043216", "0.5388125", "0.53876203", "0.53876203", "0.53876203", "0.53876203", "0.53876203", "0.5376456", "0.53682584", "0.53632504", "0.53632504", "0.53528017", "0.53499293", "0.53418493", "0.53418493", "0.53344417", "0.53342116", "0.53342116", "0.53342116", "0.53342116", "0.53342116", "0.53342116", "0.532883", "0.5325695", "0.5308302", "0.53008115", "0.52987516", "0.5298465", "0.52965343", "0.52965343", "0.52965343", "0.52965343", "0.52965343", "0.52965343", "0.52965343", "0.5281777", "0.5280823", "0.52739996", "0.52734387", "0.52718955", "0.5266454", "0.5266278", "0.526442", "0.5261333", "0.5260913", "0.52581835", "0.5255116", "0.52475655", "0.5246641", "0.52416784", "0.52403253", "0.52403253", "0.52403253", "0.5239731", "0.523293", "0.523293", "0.523293", "0.52305007", "0.5229919", "0.5228577", "0.5228577", "0.5228165", "0.5225203", "0.52241653", "0.5222427", "0.52218574", "0.52218574", "0.52218574", "0.52184665", "0.5206192" ]
0.0
-1
Checks users cookies, if secret is fine, returns user info. If not you get HTTP unauthorized error (401).
@Get("json") public User checkPlayer(Object o) { User u = getUser(this); if (u == null) { setStatus(Status.CLIENT_ERROR_UNAUTHORIZED); return null; } setStatus(Status.SUCCESS_OK); return u; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean authNeeded();", "boolean hasAuth();", "abstract public boolean checkAuth(String userId) throws IOException;", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "private void authorize(){\n\t\t\n\t\tURL authURL = null;\n\t\tURL homeURL = null;\n\t\tURLConnection homeCon = null;\n\t\t\n\t\tString loginPage = GG.GG_LOGIN+\"?ACCOUNT=\"+GG.GG_UID\n\t\t\t+\"&PASSWORD=\"+GG.GG_PASS;\n\t\tString cookieString = \"\";\n\t\tString cookieString1 = \"\";\n\t\t\n\t\ttry{\n\t\t\thomeURL = new URL(GG.GG_HOME);\n\t\t\thomeCon = homeURL.openConnection();\n\t\t\t\n\t\t\t// Look At the headers\n\t\t\tMap headerMap = homeCon.getHeaderFields();\n\t\t\t\n\t\t\t// Look for the Cookie\n\t\t\tif(headerMap.containsKey(\"Set-Cookie\")){\n\t\t\t\t\n\t\t\t\t// this gets the exact value of the header\n\t\t\t\t// otherwise gets some formatted string\n\t\t\t\tcookieString = homeCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie1: \"+cookieString);\n\t\t\t\t\n\t\t\t\tauthURL = new URL(loginPage);\n\t\t\t\tHttpURLConnection.setFollowRedirects(false);\n\t\t\t\tHttpURLConnection loginCon = (HttpURLConnection) authURL.openConnection();\n\t\t\t\t\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tloginCon.setAllowUserInteraction(true);\n\t\t\t\tloginCon.setUseCaches(false);\n\t\t\t\tloginCon.setDoOutput(true);\n\t\t\t\tloginCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tloginCon.connect();\n\t\t\t\t\n\t\t\t\t// Look At the headers\n\t\t\t\tMap headerMap1 = loginCon.getHeaderFields();\n\t\t\t\t\n\t\t\t\tcookieString1 = loginCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie2: \"+cookieString1);\n\t\t\t\tif(!Pattern.matches(\".*\\\\.\"+GG.GG_UID+\"\\\\.\\\\d+.*\", cookieString1)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString location = loginCon.getHeaderField(\"Location\");\n\t\t\t\tURL gotURL = new URL(location);\n\t\t\t\tHttpURLConnection gotCon = (HttpURLConnection) gotURL.openConnection();\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tgotCon.setAllowUserInteraction(true);\n\t\t\t\tgotCon.setUseCaches(false);\n\t\t\t\tgotCon.setDoOutput(true);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString1);\n\t\t\t\t\n\t\t\t\tgotCon.connect();\n\t\t\t\t\n\t\t\t\t// Got the Cookies\n\t\t\t\tcookies[0] = cookieString;\n\t\t\t\tcookies[1] = cookieString1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tlog.info(\"Unable to find the Cookie\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tauthorized = true;\n\t}", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "boolean isAuthenticated();", "@Override\n public Auth call() throws IOException {\n OkHttpClient client = new OkHttpClient();\n client.setFollowRedirects(false);\n client.setFollowSslRedirects(false);\n\n Request initRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .build();\n\n Response initResponse = client.newCall(initRequest).execute();\n String initCookie = initResponse.header(\"Set-Cookie\").split(\";\")[0];\n String initBody = initResponse.body().string();\n String authenticity_token = Jsoup.parse(initBody).body().select(\"[name=authenticity_token]\").val();\n\n // Phase 2 is to authenticate given the cookie and authentication token\n RequestBody loginBody = new FormEncodingBuilder()\n .add(\"utf8\", \"\\u2713\")\n .add(\"authenticity_token\", authenticity_token)\n .add(\"email\", login)\n .add(\"password\", password)\n .add(\"commit\", \"Login\")\n .add(\"referer\", \"https://lobste.rs/\")\n .build();\n Request loginRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .header(\"Cookie\", initCookie) // We must use #header instead of #addHeader\n .post(loginBody)\n .build();\n\n Response loginResponse = client.newCall(loginRequest).execute();\n String loginCookie = loginResponse.header(\"Set-Cookie\").split(\";\")[0];\n\n // Phase 3 is to grab the actual username/email from the settings page\n Request detailsRequest = new Request.Builder()\n .url(\"https://lobste.rs/settings\")\n .header(\"Cookie\", loginCookie)\n .build();\n Response detailsResponse = client.newCall(detailsRequest).execute();\n String detailsHtml = detailsResponse.body().string();\n\n Document dom = Jsoup.parse(detailsHtml);\n String username = dom.select(\"#user_username\").val();\n String email = dom.select(\"#user_email\").val();\n\n // And then we return the result of all three phases\n return new Auth(email, username, loginCookie);\n }", "public ResponseEntity<OAuth2AccessToken> authenticate(HttpServletRequest request, HttpServletResponse response,\n Map<String, String> params) {\n try {\n String username = params.get(\"username\");\n String password = params.get(\"password\");\n boolean rememberMe = Boolean.valueOf(params.get(\"rememberMe\"));\n OAuth2AccessToken accessToken = authorizationClient.sendPasswordGrant(username, password);\n OAuth2Cookies cookies = new OAuth2Cookies();\n cookieHelper.createCookies(request, accessToken, rememberMe, cookies);\n cookies.addCookiesTo(response);\n if (log.isDebugEnabled()) {\n log.debug(\"successfully authenticated user {}\", params.get(\"username\"));\n }\n return ResponseEntity.ok(accessToken);\n } catch (Exception ex) {\n log.error(\"failed to get OAuth2 tokens from UAA\", ex);\n throw ex;\n }\n }", "public static com.sawdust.gae.logic.User getUser(final HttpServletRequest request, final HttpServletResponse response, final AccessToken accessData)\r\n {\n if (null != response)\r\n {\r\n setP3P(response); // Just always set this...\r\n }\r\n\r\n com.sawdust.gae.logic.User user = null;\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting google authorization...\"));\r\n user = getUser_Google(request, accessData, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting facebook authorization...\"));\r\n user = getUser_Facebook(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting signed-cookie authorization...\"));\r\n user = getUser_Cookied(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n LOG.finer(String.format(\"Using guest authorization...\"));\r\n final String email = getGuestId(request, response);\r\n if (null == email) \r\n {\r\n return null;\r\n }\r\n user = new com.sawdust.gae.logic.User(UserTypes.Guest, email, null);\r\n }\r\n LOG.fine(String.format(\"User is %s\", user.getId()));\r\n if (user.getUserID().endsWith(\"facebook.null\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games/\");\r\n }\r\n else if (user.getUserID().endsWith(\"facebook.beta\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games-beta/\");\r\n }\r\n return user;\r\n }", "boolean hasLoggedIn();", "protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }", "LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;", "private static Object doAuth(Request req, Response res) {\n \n HashMap<String, String> response = new HashMap<>();\n\t\t \n String email = Jsoup.parse(req.queryParams(\"email\")).text();\n\t\t String password = Jsoup.parse(req.queryParams(\"password\")).text();\n\t\t\n res.type(Path.Web.JSON_TYPE);\n \t\t\n\t\t\n\t\tif(email != null && !email.isEmpty() && password != null && !password.isEmpty() ) {\n \n authenticate = new Authenticate(password);\n\t\t\t//note that the server obj has been created during call to login()\n\t\t\tString M2 = authenticate.getM2(server);\n\t\t\t\n if(M2 != null || !M2.isEmpty()) {\n \n \n\t\t\tSession session = req.session(true);\n\t\t\tsession.maxInactiveInterval(Path.Web.SESSION_TIMEOUT);\n\t\t\tUser user = UserController.getUserByEmail(email);\n\t\t\tsession.attribute(Path.Web.ATTR_USER_NAME, user.getUsername());\n session.attribute(Path.Web.ATTR_USER_ID, user.getId().toString()); //saves the id as String\n\t\t\tsession.attribute(Path.Web.AUTH_STATUS, authenticate.authenticated);\n\t\t\tsession.attribute(Path.Web.ATTR_EMAIL, user.getEmail());\n logger.info(user.toString() + \" Has Logged In Successfully\");\n \n response.put(\"M2\", M2);\n response.put(\"code\", \"200\");\n response.put(\"status\", \"success\");\n response.put(\"target\", Path.Web.DASHBOARD);\n \n String respjson = gson.toJson(response);\n logger.info(\"Final response sent By doAuth to client = \" + respjson);\n res.status(200);\n return respjson;\n }\n\t\t\t\t\n\t\t} \n \n res.status(401);\n response.put(\"code\", \"401\");\n response.put(\"status\", \"Error! Invalid Login Credentials\");\n \n return gson.toJson(response);\n }", "private boolean validateAccess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{\r\n\t\t/*institutionalEmail=request.getParameter(\"institutional_email\");\r\n\t\t\t\t\tpassword=request.getParameter(\"password\");*/\r\n\r\n\t\t//check if user has cookies with a logged session\r\n\t\tif(institutionalEmail==null || password==null){\r\n\t\t\tusercookie=getCookie(request,\"institutional_email\");\r\n\t\t\tpasscookie=getCookie(request,\"password\");\r\n\r\n\t\t\tif(usercookie!=null && passcookie!=null){\r\n\t\t\t\tinstitutionalEmail=usercookie.getValue();\r\n\t\t\t\tpassword=passcookie.getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//create cookies if he just logged in\r\n\t\telse{\r\n\t\t\tusercookie=new Cookie(\"user\",institutionalEmail);\r\n\t\t\tpasscookie=new Cookie(\"pass\",password);\r\n\t\t\tusercookie.setMaxAge(30);\r\n\t\t\tpasscookie.setMaxAge(30);\r\n\t\t}\r\n\r\n\t\tif(institutionalEmail==null || password==null){\r\n\t\t\tresponse.sendRedirect(response.encodeRedirectURL(\"Login\"));\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//user doesn't exist or isn't an allowed to view content\r\n\t\tif(ALLOWED.indexOf(ejb.login(institutionalEmail, password))==-1){\r\n\t\t\tresponse.setContentType(\"text/html\");\r\n\r\n\t\t\tif(usercookie!=null && passcookie!=null){\r\n\t\t\t\tusercookie.setMaxAge(0);\r\n\t\t\t\tpasscookie.setMaxAge(0);\r\n\t\t\t\tresponse.addCookie(usercookie);\r\n\t\t\t\tresponse.addCookie(passcookie);\r\n\r\n\t\t\t}\r\n\t\t\tresponse.sendRedirect(response.encodeRedirectURL(\"Login\"));\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tresponse.setContentType(\"text/html\");\r\n\t\tresponse.addCookie(usercookie);\r\n\t\tresponse.addCookie(passcookie);\r\n\r\n\t\trequest.setAttribute(\"institutional_email\", institutionalEmail);\r\n\t\trequest.setAttribute(\"password\", password);\r\n\r\n\t\treturn true;\r\n\t}", "public abstract boolean checkCredentials (String username, String password);", "User getUserByToken(HttpServletResponse response, String token) throws Exception;", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\t System.err.println(\"URI -- \"+request.getRequestURL());\n\t\t if(request.getRequestURI()!=null &&\n\t\t (request.getRequestURI().contains(\"/self/login\"))) return true;\n\t\t \n\t\t \n\t\t String authHeader = request.getHeader(AUTH_HEADER);\n\t\t \n\t\t if (authHeader == null) { \n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t if (authHeader.contains(\"Basic \")) {\n\t\t \n\t\t String encodedUserNamePassword = authHeader.split(\"Basic \")[1]; String\n\t\t strValue = \"\";\n\t\t try\n\t\t { \n\t\t\t strValue = new String(java.util.Base64.getDecoder().decode(encodedUserNamePassword.getBytes(\n\t\t\t\t\t \t\t)), \"UTF-8\"); \n\t\t }\n\t\t catch (Exception e)\n\t\t { \n\t\t\t e.printStackTrace(); \n\t\t\t // TODO: handle exception return false; \n\t\t }\n\t\t \n\t\t String[] arrayOfString = strValue.split(\"\\\\:\");\n\t\t \n\t\t if (arrayOfString.length > 1) \n\t\t { \n\t\t\t \tString userName = arrayOfString[0]; String\n\t\t\t \tpassword = arrayOfString[1]; System.err.println(userName);\n\t\t\t \tSystem.err.println(password);\n\t\t \n\t\t\t \tpassword = Base64.getEncoder().encodeToString((password + \"\").getBytes(\"utf-8\")); \n\t\t\t \tUsernamePasswordAuthenticationToken\n\t\t\t \tusernamePasswordAuthenticationToken = new\n\t\t\t \tUsernamePasswordAuthenticationToken( userName, password);\n\t\t \n\t\t\t \tAuthentication authentication = null; \n\t\t\t \ttry { authentication =\n\t\t\t \t\t\tautheticationManager.authenticate(usernamePasswordAuthenticationToken);\n\t\t \n\t\t } catch (Exception ex) { \n\t\t\t ex.printStackTrace();\n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes());\n\t\t \n\t\t\t return false; \n\t\t } \n\t\t if (authentication.isAuthenticated()) {\n\t\t\t SecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t return true; \n\t\t } else { \n\t\t\t\n\t\t\tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); \n\t\t\t return false; \n\t\t\t } \n\t\t } else { \n\t\t\t String encodedValue = authHeader.split(\"Basic \")[1];\n\t\t \n\t\t\t if (isValidToken(encodedValue)) return true;\n\t\t \n\t\t \tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t \tresponse.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t } \n\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); return\n\t\t false;\n\t\t \n\t\t\n\t}", "public static User getLoggedUser(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"loggedUserPrefs\", 0);\n User user = (new Gson()).fromJson(prefs.getString(\"user\", null), User.class);\n return user;\n }", "private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)\n\t\t\tthrows IOException, ServletException {\n\t\tString jwtInCookie = null;\n\t\tString username = null;\n\n\t\t// try to get authentication from cookie\n\t\tOptional<Cookie> cookieO = CookieUtils.getCookie(request, appProperties.getAuth().getTokenCookieName());\n\t\tif (cookieO.isPresent()) {\n\t\t\tjwtInCookie = cookieO.get().getValue();\n\t\t}\n\n\t\t// if cookie authentication is missing try to get JWT token from HTTP header\n\t\tjwtInCookie = StringUtils.defaultIfBlank(jwtInCookie, jwtTokenProvider.resolveToken(request));\n\n\t\tif (jwtInCookie != null) {\n\t\t\ttry {\n\t\t\t\tusername = jwtTokenProvider.getUsernameFromToken(jwtInCookie);\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tlog.error(\"IN doFilterInternal - an error occured during getting username from token\", e);\n\t\t\t} catch (ExpiredJwtException e) {\n\t\t\t\tlog.warn(\"IN doFilterInternal - the token is expired and not valid anymore\", e);\n\t\t\t} catch (SignatureException e) {\n\t\t\t\tlog.error(\"IN doFilterInternal - Authentication Failed. Username or Password not valid.\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"IN doFilterInternal - couldn't find bearer string, will ignore the header\");\n\t\t}\n\t\tif (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {\n\n\t\t\ttry {\n\t\t\t\tUserDetails userDetails = userService.loadUserByUsername(username);\n\n\t\t\t\tif (!userDetails.isEnabled())\n\t\t\t\t\tthrow new DisabledException(\"Authentication for user '\" + username + \"' is disabled\");\n\n\t\t\t\tif (jwtTokenProvider.validateToken(jwtInCookie, userDetails)) {\n\t\t\t\t\tUsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(\n\t\t\t\t\t\t\tuserDetails, null, userDetails.getAuthorities());\n\t\t\t\t\tauthentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));\n\t\t\t\t\tlog.info(\"IN doFilterInternal - authenticated user \" + username + \", setting security context\");\n\t\t\t\t\tSecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t\t}\n\t\t\t} catch (UsernameNotFoundException e) {\n\t\t\t\tlog.warn(\"IN doFilterInternal - catched UsernameNotFoundException: \" + e.getMessage());\n\t\t\t} catch (DisabledException e) {\n\t\t\t\tlog.warn(\"IN doFilterInternal - catched DisabledException: \" + e.getMessage());\n\t\t\t}\n\n\t\t}\n\n\t\tchain.doFilter(request, response);\n\t}", "String getSecret();", "public boolean isUserLoggedIn();", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "private void getUserInfo() {\n httpClient.get(API.LOGIN_GET_USER_INFO, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n callback.onLoginSuccess(response.optJSONObject(Constant.OAUTH_RESPONSE_USER_INFO));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n super.onFailure(statusCode, headers, responseString, throwable);\n callback.onLoginFailed(throwable.getMessage(), ErrorCode.ERROR_CODE_SERVER_EXCEPTION);\n }\n });\n }", "@RequestMapping(\"login\")\n public boolean Authenticate(String userName, String password, HttpServletResponse res, @CookieValue(value = \"userInfo\", defaultValue = \"\") String userCookie){\n\n if(userCookie != null && !userCookie.equals(\"\")){\n String user = userCookie.split(\"~~~\")[0];\n String pass = userCookie.split(\"~~~\")[1];\n String valid = userCookie.split(\"~~~\")[2];\n\n if(Boolean.valueOf(valid) && userService.authenticate(user, pass).isAuthenticated()) return true;\n }\n\n LoginViewModel viewModel = userService.authenticate(userName, password);\n if(viewModel.isAuthenticated()){\n String[] userInfo = new String[4];\n userInfo[0] = userName;\n userInfo[1] = password;\n userInfo[2] = String.valueOf(viewModel.getUserId());\n\n String userString = Joiner.on(\"~~~\").skipNulls().join(userInfo);\n\n Cookie cookie = new Cookie(\"userInfo\", userString);\n\n res.addCookie(cookie);\n return true;\n }\n return false;\n }", "public abstract boolean isLoggedIn(String url);", "java.lang.String getAuth();", "java.lang.String getAuth();", "java.lang.String getAuth();", "private boolean isLoggedInUser(){\n return true;\n }", "public String getCredentials();", "boolean hasLoginapiavgrtt();", "public void login(HttpServletRequest req, HttpServletResponse res) throws IOException {\n\n // Client credentials\n Properties p = GlobalSettings.getNode(\"oauth.password-credentials\");\n String clientId = p.getProperty(\"client\");\n String secret = p.getProperty(\"secret\");\n ClientCredentials clientCredentials = new ClientCredentials(clientId, secret);\n\n // User credentials\n String username = req.getParameter(\"username\");\n String password = req.getParameter(\"password\");\n UsernamePassword userCredentials = new UsernamePassword(username, password);\n\n // Create request\n TokenResponse oauth = TokenRequest.newPassword(userCredentials, clientCredentials).post();\n if (oauth.isSuccessful()) {\n PSToken token = oauth.getAccessToken();\n\n // If open id was defined, we can get the member directly\n PSMember member = oauth.getMember();\n if (member == null) {\n member = OAuthUtils.retrieve(token);\n }\n\n if (member != null) {\n OAuthUser user = new OAuthUser(member, token);\n HttpSession session = req.getSession(false);\n String goToURL = this.defaultTarget;\n if (session != null) {\n ProtectedRequest target = (ProtectedRequest)session.getAttribute(AuthSessions.REQUEST_ATTRIBUTE);\n if (target != null) {\n goToURL = target.url();\n session.invalidate();\n }\n }\n session = req.getSession(true);\n session.setAttribute(AuthSessions.USER_ATTRIBUTE, user);\n res.sendRedirect(goToURL);\n } else {\n LOGGER.error(\"Unable to identify user!\");\n res.sendError(HttpServletResponse.SC_FORBIDDEN);\n }\n\n } else {\n LOGGER.error(\"OAuth failed '{}': {}\", oauth.getError(), oauth.getErrorDescription());\n if (oauth.isAvailable()) {\n res.sendError(HttpServletResponse.SC_FORBIDDEN);\n } else {\n res.sendError(HttpServletResponse.SC_BAD_GATEWAY);\n }\n }\n\n }", "User getCurrentLoggedInUser();", "LoggedUser getLoggedUser();", "private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public boolean auth() throws IOException {\r\n \treturn auth(false);\r\n }", "public abstract User getLoggedInUser();", "public String loginUser(Credentials credentials) throws Exception {\n\n\t\tString url = server_url + \"/user/login\";\n\t\tURL obj = new URL(url);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\n\t\t//add request header\n\t\tcon.setRequestMethod(\"POST\");\n\t\tcon.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.5\");\n\n\t\t//String urlParameters = \"username=\" + credentials.username + \"&password=\" + credentials.password;\n\t\tJsonObject urlParameters = new JsonObject();\n\t\turlParameters.addProperty(\"username\", credentials.username);\n\t\turlParameters.addProperty(\"password\", credentials.password);\n\t\t\n\t\t// Send post request\n\t\tcon.setDoOutput(true);\n\t\tDataOutputStream wr = new DataOutputStream(con.getOutputStream());\n\t\twr.writeBytes(urlParameters.toString());\n\t\twr.flush();\n\t\twr.close();\n\n\t\tint responseCode = con.getResponseCode();\n\t\t\n\t\tif (responseCode != 200) {\n\t\t\treturn \"Failure\";\n\t\t}\n\t\t////System.out.println(\"\\nSending 'POST' request to URL : \" + url);\n\t\t////System.out.println(\"Post parameters : \" + urlParameters);\n\t\t////System.out.println(\"Response Code : \" + responseCode);\n\t\t\n\t\tif (responseCode == 400) {\n\t\t\tthrow new Exception();\n\t\t}\n\t\t\n\t\t//When we log in the server gives us a cookie that keeps the user identity\n\t\tusercookie = con.getHeaderField(\"set-cookie\");\n\t\tusercookie = usercookie.substring(0, usercookie.length() - 8);\n\n//\t\t@SuppressWarnings(\"deprecation\")\n//\t\tString decodedUserCookie = URLDecoder.decode(usercookie.substring(11));\n//\t\t\n//\t\tJsonParser jsonParser = new JsonParser();\n//\t\tJsonObject element = jsonParser.parse(decodedUserCookie).getAsJsonObject();\n\n\t\tBufferedReader in = new BufferedReader(\n\t\t new InputStreamReader(con.getInputStream()));\n\t\tString inputLine;\n\t\tStringBuffer response = new StringBuffer();\n\n\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\tresponse.append(inputLine);\n\t\t}\n\t\tin.close();\n\t\t\n\t\treturn response.toString();\n\t}", "@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}", "private String getAuthenticatedUser(HttpServletRequest request) throws ServletException, EappException {\n ProxyTicketValidator pv = new ProxyTicketValidator();\n pv.setCasValidateUrl(casValidate);\n pv.setServiceTicket(request.getParameter(\"ticket\"));\n pv.setService(getService(request));\n pv.setRenew(casRenew);\n if (casProxyCallbackUrl != null) {\n pv.setProxyCallbackUrl(casProxyCallbackUrl);\n }\n \n if (!pv.isAuthenticationSuccesful()) {\n try {\n pv.validate();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n throw new EappException(\"Unable to validate ProxyTicketValidator [\" + pv + \"]\");\n }\n }\n \n if (!pv.isAuthenticationSuccesful()) {\n \tthrow new EappException(\"Unable to validate ProxyTicketValidator [\" + pv + \"]\");\n }\n \n \n if (pv.getUser() == null \n \t\t|| pv.getProxyList() == null \n \t\t|| (casRenew && !pv.getProxyList().isEmpty())) {\n \tthrow new EappException(\"Validation of [\" + pv + \"] did not result in an internally consistent CASReceipt.\");\n }\n \n if (!pv.getProxyList().isEmpty()) {\n // ticket was proxied\n if (authorizedProxies.isEmpty()) {\n throw new ServletException(\"this page does not accept proxied tickets\");\n }\n \n String proxy = (String)pv.getProxyList().get(0);\n if (!authorizedProxies.contains(proxy)) {\n \tthrow new ServletException(\"unauthorized top-level proxy: '\" + pv.getProxyList().get(0) + \"'\");\n }\n }\n \n return pv.getUser();\n }", "protected UserDetails processAutoLoginCookie(String[] cookieTokens, HttpServletRequest request, HttpServletResponse response) {\n\n String username = validateToken(cookieTokens, request, response);\n\n //shane\n\n String[] userNameOrgId = splitUserNameOrgId(username);\n //check to make sure we have at least two elements from the split\n if (userNameOrgId != null && userNameOrgId.length == 2) {\n //the second element we are assuming is the orgid - set it in the session\n HttpSession session = request.getSession();\n session.setAttribute(ORGID_SESSION_KEY, userNameOrgId[1]);\n //the first element is the username - load the user details from the first element\n return getUserDetailsService().loadUserByUsername(userNameOrgId[0]);\n }\n\n throw new RememberMeAuthenticationException(\"Cookie username in wrong format\" + username);\n }", "public boolean isLoggedIn(){\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n if (sharedPreferences.getString(KEY_USERNAME, null) != null){\n return true;\n }\n return false;\n }", "public User getLoggedUser();", "Optional<User> findUserWithCookies(String login, String userHash) throws ServiceException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n \n HttpSession session=request.getSession();\n String remoteUser = request.getRemoteUser();\n \n if (remoteUser == null) {\n out.println(\"HTTP 401 Unauthorized\");\n session.invalidate();\n }\n \n \n }", "@RequestMapping(\"/getUserInfo\")\n public UserInfo getUserInfo(@CookieValue(value = \"userInfo\", defaultValue = \"\") String userCookie){\n User userObj = null;\n if(userCookie != null && !userCookie.equals(\"\")){\n String user = userCookie.split(\"~~~\")[0];\n String pass = userCookie.split(\"~~~\")[1];\n String valid = userCookie.split(\"~~~\")[2];\n if(Boolean.valueOf(valid)){\n userObj = userService.getUser(user, pass);\n }\n }\n return userObj != null ? new UserInfo(userObj.getUserName(), userObj.getFirstName(), userObj.getLastName(),\n userObj.getEmailAddress(), userObj.getAddress(), userObj.getTelephoneNumber()) : null;\n }", "static public User getUser(HttpServletRequest request) {\n String accessToken = request.getParameter(\"access_token\");\n if (accessToken == null) {\n return null;\n } else {\n try {\n URL url = new URL(\n \"https://www.googleapis.com/oauth2/v1/tokeninfo\"\n + \"?access_token=\" + accessToken);\n\n Map<String, String> userData = mapper.readValue(\n new InputStreamReader(url.openStream(), \"UTF-8\"),\n new TypeReference<Map<String, String>>() {\n });\n if (userData.get(\"audience\") == null\n || userData.containsKey(\"error\")\n || !userData.get(\"audience\")\n .equals(Constants.CLIENT_ID)) {\n return null;\n } else {\n String email = userData.get(\"email\"),\n userId = userData.get(\"user_id\");\n User user = null;\n PersistenceManager pm = PMF.get().getPersistenceManager();\n try {\n user = pm.getObjectById(User.class, userId);\n } catch (JDOObjectNotFoundException ex) {\n user = new User(userId, email);\n pm.makePersistent(user);\n } finally {\n pm.close();\n }\n return user;\n }\n } catch (Exception ex) {\n System.err.println(ex.getMessage());\n return null;\n }\n }\n }", "List<String> authenticateUser(String userName, String password);", "Boolean checkCredentials(ClientCredentialsData clientData) throws AuthenticationException;", "@RequestMapping(value=\"{username}\", method=RequestMethod.GET)\n UserInfo getUserInfo(@PathVariable String username, @RequestParam(USER_COOKIE) String cookie)\n throws UserException, ServerException {\n try {\n LOGGER.info(\"/users/{username} GET hit with username {} and cookie {}\", username, cookie);\n return userFacade.getUser(username, cookie);\n } catch (RuntimeException e) {\n LOGGER.error(\"Error in /users/{username} GET {}\", e);\n throw new ServerException(e);\n }\n }", "private User checkForUserCredentials(String data) throws IOException {\n if (data.matches(\".*:.*\")) {\n String[] credentials = data.split(\":\");\n\n return new User(credentials[0], credentials[1]);\n }\n\n return null;\n }", "private void loginHandler(RoutingContext context) {\n JsonObject creds = new JsonObject()\n .put(\"username\", context.getBodyAsJson().getString(\"username\"))\n .put(\"password\", context.getBodyAsJson().getString(\"password\"));\n\n // TODO : Authentication\n context.response().setStatusCode(500).end();\n }", "Boolean checkCredentials(String username, String password) throws\n SQLException, UserNotFoundException;", "public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}", "@Override\n /**\n * Handles a HTTP GET request. This implements obtaining an authentication token from the server.\n */\n protected void handleGet(Request request, Response response) throws IllegalStateException {\n String username = String.valueOf(request.getAttributes().get(\"username\"));\n String password = String.valueOf(request.getAttributes().get(\"password\"));\n /* Construct MySQL Query. */\n String query = \"SELECT COUNT(id) AS `CNT`, `authToken` FROM accounts WHERE `username` = '\" + username + \"' AND \" +\n \"`password` = '\" + password + \"' LIMIT 0,1;\";\n /* Obtain the account count and existing token pair, as object array. */\n Object[] authenticationArray = dataHandler.handleAuthentication(database.ExecuteQuery(query,\n new ArrayList<String>()));\n int cnt = (int) authenticationArray[0];\n String existingToken = (String) authenticationArray[1];\n String authenticationToken = null;\n if (cnt == 1) { // There is exactly one account matching the parameterised username and password.\n if (existingToken == null) { // No token yet existed, generate one.\n authenticationToken = TokenGenerator.getInstance().generateAuthenticationToken(TOKEN_LENGTH);\n } else {\n authenticationToken = existingToken;\n }\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n if (!(authenticationToken == null || authenticationToken == \"\")) { // Update the database with the new token.\n Database.getInstance().ExecuteUpdate(\"UPDATE `accounts` SET `authToken` = '\" + authenticationToken +\n \"', `authTokenCreated` = CURRENT_TIMESTAMP WHERE `username` = '\" + username + \"';\",\n new ArrayList<String>());\n this.returnResponse(response, authenticationToken, new TokenSerializer());\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n }", "public LoginResult login() {\n\t\tif (!auth.isLoggedIn())\n\t\t\treturn LoginResult.MAIN_LOGOUT;\n\n\t\ttry {\n\t\t\tHttpURLConnection conn = Utility.getGetConn(FUND_INDEX);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tArrayList<Cookie> tmpCookies = Cookie.getCookies(conn);\n\t\t\taws = Cookie.getCookie(tmpCookies, \"AWSELB\");\n\t\t\tphp = Cookie.getCookie(tmpCookies, \"PHPSESSID\");\n\t\t\t\n\t\t\tconn = Utility.getGetConn(FUND_LOGIN);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tString location = Utility.getLocation(conn);\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t// TODO: future speed optimization\n\t\t\t//if (auth.getPHPCookie() == null) {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie()));\n\t\t\t\tCookie phpCookie = Cookie.getCookie(Cookie.getCookies(conn), \"PHPSESSID\");\n\t\t\t\t// saves time for Blackboard and retrieveProfileImage().\n\t\t\t\tauth.setPHPCookie(phpCookie);\n\t\t\t\t\n\t\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\t\n\t\t\t\tlocation = Utility.getLocation(conn);\n\t\t\t\tif (location.startsWith(\"signin.aspx\"))\n\t\t\t\t\tlocation = \"https://eraider.ttu.edu/\" + location;\n\t\t\t\tconn = Utility.getGetConn(location);\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\t// might need to set ESI and ELC here. If other areas are bugged, this is why.\n\t\t\t/*} else {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie(), auth.getPHPCookie()));\n\t\t\t\t/// TODO This is in retirevProfileImage, maybe Mobile Login, and Blackboard!!!\n\t\t\t\tthrow new NullPointerException(\"Needs implementation!\");\n\t\t\t}*/\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php?elu=XXXXXXXXXX&elk=XXXXXXXXXXXXXXXX\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/login.php?ticket=ST-...\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/funds_home.php\n\t\t\tlocation = Utility.getLocation(conn);\n\t\t\tif (location.startsWith(\"index.\")) {\n\t\t\t\tlocation = \"https://get.cbord.com/raidercard/full/\" + location;\n\t\t\t}\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tUtility.readByte(conn);\n\t\t} catch (IOException e) {\n\t\t\tTTUAuth.logError(e, \"raiderfundlogin\", ErrorType.Fatal);\n\t\t\treturn LoginResult.OTHER;\n\t\t} catch (Throwable t) {\n\t\t\tTTUAuth.logError(t, \"raiderfundlogingeneral\", ErrorType.APIChange);\n\t\t\treturn LoginResult.OTHER;\n\t\t}\n\n\t\tloggedIn = true;\n\n\t\treturn LoginResult.SUCCESS;\n\t}", "java.lang.String getSecret();", "Credential<?>[] readAuthorization(HttpServletRequest request)\n throws IOException,ServletException;", "protected void doPostLogin(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tout.println(\"Look where we are, it's the login page\");\n\t\t\n\t\t//get parameter Names\n\t\tsetParameters(request);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tKeyspace keyspace = Connection.getKeyspace();\n\t\tStringSerializer se = StringSerializer.get();\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// given Keyspace keyspace and StringSerializer se\n\t\t\tSliceQuery<String, String, String> q = HFactory.createSliceQuery(keyspace, se, se, se);\n\t\t\tq.setColumnFamily(\"Users\") .setKey(displayName).setColumnNames(\"fullname\", \"email\", \"password\");\n\t\t\tQueryResult<ColumnSlice<String, String>> r = q.execute();\n\n\t\t\tfullname = r.get().getColumnByName(\"fullname\").getValue();\n\t\t\temail = r.get().getColumnByName(\"email\").getValue();\n\n\t\t\tif(password.equals(r.get().getColumnByName(\"password\").getValue()))\n\t\t\t{\n\t\t\t\t//LOGGED IN CORRECTLY\n\t\t\t\t\n\t\t\t\tmySexySession.setAttribute(\"displayName\", displayName);\n\t\t\t\tmySexySession.setAttribute(\"fullname\", fullname);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmySexySession.setAttribute(\"message\", \"Incorrect Password.\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t//catches happen when the key is not found (i.e. user doesn't exist)\n\t\t\tmySexySession.setAttribute(\"message\", \"User does not exist.\");\n\t\t}\n\t\tresponse.sendRedirect(\"/quotes/home\");\n\t}", "public UserInfo getUserInfo() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return (UserInfo) authentication.getPrincipal();\n }", "public void extractAuth(DnCxt cxt, DnRequestHandler handler) throws DnException {\n Map<String,String> cookies = handler.getRequestCookies();\n String encryptedCookie = cookies.get(AUTH_COOKIE_NAME);\n if (encryptedCookie != null && encryptedCookie.length() > 10) {\n // A valid auth cookie.\n try {\n String decodedCookie = coreNode.decryptString(encryptedCookie);\n handler.userAuthCookie = UserAuthCookie.extract(decodedCookie);\n } catch (DnException e) {\n LogServlet.log.debug(cxt, \"Failed to decrypt and unpack cookie. \" + e.getFullMessage());\n }\n }\n\n // Call hook to fill in initial user information.\n // This allows the *core* component to be ignorant of some of the messier implementation\n // details of authentication.\n UserAuthHook.extractAuth.callHook(cxt, this, handler);\n if (cxt.userProfile == null) {\n var userAuthData = handler.userAuthData;\n if (userAuthData != null && userAuthData.determinedUserId) {\n cxt.userProfile = userAuthData.createProfile();\n }\n }\n }", "String getUserInfoFromServer(String userID);", "private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "boolean hasLoginResponse();", "String getUser();", "String getUser();", "public static Result isUser() {\n String email = session().get(\"email\");\n if (email == null) {\n return unauthorized(\"unauthorized - you must be logged in!\");\n }\n // Otherwise, all good:\n User user = User.findByEmail(email);\n response().setHeader(\"X-Auth-Remote-User\", user.name);\n response().setHeader(\"X-Auth-Remote-User-Email\", user.email);\n response().setHeader(\"X-Auth-Remote-User-Primary-Role\",\n user.getRole().name);\n return ok(Json.toJson(\"isUser\"));\n }", "String signIn(String userName, String password) throws UserNotFoundException;", "public void checkAddAuthCookies(DnCxt cxt, DnRequestHandler handler) throws DnException {\n UserAuthHook.prepAuthCookies.callHook(cxt, this, handler);\n if (handler.setAuthCookie && handler.userAuthCookie != null) {\n var authCookie = handler.userAuthCookie;\n String cookieString = authCookie.toString();\n String cookieVal = coreNode.encryptString(cookieString);\n // Let old cookies hang out for 400 days, even if the cookie only provides a login\n // for day or so.\n Date cookieExpireDate = DnDateUtil.addDays(authCookie.modifiedDate, 400);\n handler.addResponseCookie(AUTH_COOKIE_NAME, cookieVal, cookieExpireDate);\n }\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\n throws ServletException, IOException {\n resp.setContentType(\"text/html;charset=UTF-8\");\n out = resp.getWriter();\n mPrintWriter = out;\n\n String authString =\n req.getHeader(CommonParamString.PARAM_HEADER_USERNAME_PASSWORD);\n //Get the UserName and Password\n parseAuthString(authString);\n getAccountInfo(getUserName());\n }", "User checkUser(String username, String password);", "@GetMapping(\"/\")\n public String readCookie(@CookieValue(value = \"disclaimer\") String username) {\n return this.restTemplate.getForObject(\n \"http://ping-server/\", String.class);\n }", "public boolean hasCredentials(){\r\n return state;\r\n }", "java.lang.String getServerSecret();", "Pokemon.RequestEnvelop.AuthInfo getAuth();", "ApplicationUser getUser();", "public boolean checkAuth() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n return sharedPreferences.getBoolean(AUTH, false);\n }", "public Boolean isUserLoggedIn(String user) throws IOException, JSONException {\n\n this.prefs = this.context.getSharedPreferences(\n this.context.getString(R.string.sp_tag_session),//\"usersession\",\n context.MODE_PRIVATE\n );\n\n Log.d(\"Session\",\"Intialize preferences\");\n\n if (this.prefs.contains(this.context.getString(R.string.sp_tag_session_id))) {\n this.cookie = this.prefs.getString(\n this.context.getString(R.string.sp_tag_session_id),\n \"default\"\n );\n }\n else this.cookie = \"\";\n\n Log.d(\"Session\",\"Intialize cookie\");\n\n Log.d(\"hw4\",\"cookie in the onResume is \"+this.cookie);\n InputStream is = null;\n\n // Check for a live network connection.\n Log.d(\"hw4\", \"network availablility: \" + isNetworkAvailable());\n if (!isNetworkAvailable()) return false;\n\n try {\n\n String query = this.url + \"/loggedin?username=\" + user;\n Log.d(\"hw4\", \"isUserLoggedIn query is: \" + query);\n\n HttpURLConnection conn = (HttpURLConnection) ((new URL(query).openConnection())); //this.url + \"?\" + user\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestProperty(\"Cookie\", this.cookie);\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n Log.d(\"Session\", \"connected\");\n\n\n // handling the response\n StringBuilder sb = new StringBuilder();\n // int HttpResult = conn.getResponseCode();\n is = conn.getResponseCode() >= 400 ? conn.getErrorStream() : conn.getInputStream();\n\n\n // TODO: what does \"readIt()\" do?\n String resp=readIt(is, 2).substring(0, 1);\n\n Log.d(\"hw4\",\"readIT gets:\"+resp);\n if (!resp.contains(\"0\")) { //\"0\"\n return true;\n } else {\n Log.d(\"hw4\",\"not logged in and ...?\");\n return false;\n }\n\n\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } catch (Exception e) {\n Log.d(\"vt\", \" and the exception is \" + e);\n } finally {\n if (is != null) {\n is.close();\n }\n }\n\n return false;\n }", "public static void isAuth(HttpResponse response, JSONObject jsonObj) throws JSONException, NotAuthException {\n if (response.getStatusLine().getStatusCode() != 200) {\n if (jsonObj.getBoolean(\"error\")) {\n String errorMsj = jsonObj.getString(\"message\");\n if (errorMsj.equals(\"No Autenticado\")) {\n throw new NotAuthException(errorMsj, true);\n }\n }\n\n }\n }", "public Result authenticate() {\r\n // 1. Define class to send JSON response back\r\n class Login {\r\n public Long id;\r\n public String gamerTag;\r\n public String token;\r\n\r\n public Login() {\r\n }\r\n }\r\n\r\n // 2. Read email and password from request()\r\n JsonNode request = request().body().asJson();\r\n String gamerTag = request.get(\"gamerTag\").asText();\r\n String password = request.get(\"password\").asText();\r\n\r\n // 3. Find user with given gamerTag\r\n Login ret = new Login();\r\n User user = User.gamerTagLogin(gamerTag);\r\n if (user == null) {\r\n return unauthorized(Json.toJson(ret));\r\n }\r\n // 4. Compare password.\r\n String sha256 = User.getSha256(request.get(\"password\").asText());\r\n if (sha256.equals(user.getPassword())) {\r\n // Success\r\n String authToken = generateAuthToken();\r\n user.setToken(authToken);\r\n Ebean.update(user);\r\n ret.token = authToken;\r\n ret.gamerTag = user.getGamerTag();\r\n ret.id = user.getId();\r\n return ok(Json.toJson(ret));\r\n\r\n }\r\n // 5. Unauthorized access\r\n return unauthorized();\r\n }", "public boolean isUserAuthenticated() {\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n if(settings!=null){\n String user=settings.getString(\"userid\",null);\n String area=settings.getString(\"areaid\",null);\n if (user != null && !user.equals(\"\")) {\n mUserId=user;\n mAreaId=area;\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "@GET\n @Path(\"/{userid}/{password}\")\n public Response logIn(@PathParam(\"userid\") String userid, @PathParam(\"password\") String password) throws ProfileDaoException {\n Optional<Profile> user = api.getProfile(userid);\n\n \n \n if(BCrypt.hashpw(password, user.get().getPassword()).equals(user.get().getPassword())){\n //create Session\n return Response\n .ok(loginApi.logIn(userid))\n .build();\n } else {\n return Response.status(Response.Status.NOT_FOUND).build();\n }\n\n }", "@Test\n\t //Extracting a string from the response\n\t public void getBasicAuthTestResultCookies() {\n\t Cookies cookies = given ()\n\t \t.spec(requestSpec)\n\t .when()\n\t .get (\"/maps/api/place/textsearch/json\")\n\t .detailedCookies();\n\t System.out.println(\"Cookies\"+cookies.size());\n\t System.out.println(\"CookiesList\"+cookies.getList(\"cookie1\").size());\n\t //System.out.println(\"Cookies\"+cookies.values().toString());\n\t //Assert.assertEquals(statusCode.toString(), \"200\");\n\t }", "public abstract String getSecret();", "private Boolean authorize() {\n\n return Session.getInstance().login(user.getText(), password.getText());\n }", "private void checkIfUserIsAuthenticated() {\n splashViewModel.checkIfUserIsAuthenticated();\n splashViewModel.getIsUserAuthenticated().observe(this, user -> {\n if (!user.isAuthenticated()) {\n startAuthActivity();\n finish();\n } else {\n getUserFromDatabase(user.getUid());\n }\n });\n }", "boolean authenticate(String userName, String password);", "private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}", "boolean hasAuthKey();", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "User authenticate(String username, String password);", "boolean hasLogin();", "boolean hasLogin();", "UserInfo getUserInfo(String username);", "public String authenticate() throws LoginException\r\n {\r\n HttpRequest conn = null;\r\n String cookie = \"\";\r\n conn = new HttpRequest(this.url, Method.POST);\r\n HttpResponse _response = conn.send(\"name=\" + username + \"&password=\" + password);\r\n if (_response.getStatus() == HttpURLConnection.HTTP_OK)\r\n {\r\n List<String> cookies = _response.getHeader(AUTH_COOKIE);\r\n for (String c : cookies)\r\n {\r\n this.cookieSession = c.split(\";\")[0];\r\n if (this.cookieSession != null)\r\n break;\r\n }\r\n cookie = this.cookieSession;\r\n }\r\n else if (_response.getStatus() == 401)\r\n {\r\n throw new LoginException(\"Access denied, unauthorized for user [\" + username + \"] and url [\" + url + \"]\");\r\n }\r\n else\r\n {\r\n throw new LoginException(\"Cannot make login in COUCHDB for user [\" + username + \"] and url [\" + url + \"]\"\r\n + \"Http code[\" + _response.getStatus() + \"] \" + _response.getBody());\r\n }\r\n return cookie;\r\n }", "public Boolean isAuthorized(String userId);", "public static void getUserInfoFromOIDC(HttpServletRequest req,HttpServletResponse resp) throws IOException, InterruptedException\n\t{\n\t\tCookie c[]=req.getCookies(); \n\t\tString accessToken=null;\n\t\t//c.length gives the cookie count \n\t\tfor(int i=0;i<c.length;i++){ \n\t\t if(c[i].getName().equals(\"access_token\"))\n\t\t\t accessToken=c[i].getValue();\n\t\t}\n\t\t//Send HTTP Post request to get the users profile to msOIDC userinfo endpoint\n\t\tHttpRequest IDTokKeyVerified = HttpRequest.newBuilder()\n\t\t .uri(URI.create(\"http://localhost:8080/OPENID/msOIDC/userinfo\"))\n\t\t .POST(BodyPublishers.ofString(\"\"))\n\t\t .header(\"client_id\",\"mano.lmfsktkmyj\")\n\t\t .header(\"scope\",\"profile\")\n\t\t .header(\"access_token\",accessToken)\n\t\t .build();\n\t\tHttpClient client = HttpClient.newHttpClient();\n\t\t // Send HTTP request\n\t HttpResponse<String> tokenResponse;\n\t\ttokenResponse = client.send(IDTokKeyVerified,\n\t HttpResponse.BodyHandlers.ofString());\n\t\t\t\t\t\t\n\t\t//Enclosed the response in map datastructure ,it is easy to parse the response\n\t\tMap<String,Object> validateissuer_resp=processJSON(tokenResponse.body().replace(\"{\", \"\").replace(\"}\",\"\"));\n\t\tresponseFormat(validateissuer_resp, resp);\n\t}", "public static String retrieveLoginCookies(HashMap<String, String> params) throws IOException {\n String url = Constants.LOGIN_URL;\n CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));\n HttpURLConnection con = null;\n try {\n URL obj = new URL(url);\n con = (HttpURLConnection) obj.openConnection();\n } catch (UnknownHostException e) {\n //try to fix broken url\n con = (HttpURLConnection) new URL(\"http://\" + url).openConnection();\n }\n\n //add request header\n con.setRequestMethod(\"POST\");\n //just for fun\n con.setRequestProperty(\"Accept-Language\", \"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4,de;q=0.2\");\n\n String urlParameters = \"\";\n\n for (Map.Entry<String, String> e : params.entrySet()) {\n urlParameters += e.getKey() + \"=\" + e.getValue() + \"&\";\n }\n\n //send post request\n con.setDoOutput(true);\n DataOutputStream wr = new DataOutputStream(con.getOutputStream());\n wr.writeBytes(urlParameters);\n wr.flush();\n wr.close();\n\n\n // temporary to build request cookie header\n String sessionCookie = \"\";\n // find the cookies in the response header from the first request\n List<String> cookies = con.getHeaderFields().get(\"Set-Cookie\");\n if (cookies != null) {\n for (String cookie : cookies) {\n // only want the first part of the cookie header that has the value\n String value = cookie.split(\";\")[0];\n sessionCookie += value + \";\";\n }\n }\n return sessionCookie;\n }", "@Test\n public void doSuccessfulAuthTest() throws IOException {\n // Load valid credentials\n loadValidCredentials();\n\n final RestClient restClient = new HttpClientRestClient();\n restClient.init(testConfig);\n\n // Validate not yet valid\n assertFalse(\"should not yet be valid\", sessionRefreshHandler.isValid());\n// TODO\n// assertNull(\"Should have no header value yet\", sessionRefreshHandler.getAuthorizationHeaderValue());\n\n // Call method with valid credentials and this should return true.\n assertTrue(sessionRefreshHandler.refreshCredentials(pardotClient));\n\n // Sanity check\n assertTrue(sessionRefreshHandler.isValid());\n// TODO\n// assertNotNull(sessionRefreshHandler.getAuthorizationHeaderValue());\n }" ]
[ "0.601629", "0.5917276", "0.5899695", "0.5845882", "0.5754622", "0.57012165", "0.56877023", "0.5659176", "0.5591113", "0.55131", "0.5472257", "0.5471158", "0.54601604", "0.5430219", "0.5401093", "0.53854203", "0.53812635", "0.5359939", "0.535955", "0.53191805", "0.5293877", "0.5288617", "0.52867126", "0.52817374", "0.52735615", "0.52645284", "0.5243034", "0.52422994", "0.52422994", "0.52422994", "0.52364486", "0.5220324", "0.5203846", "0.5202357", "0.5184732", "0.5179486", "0.5176818", "0.51756334", "0.51748025", "0.5169406", "0.51551837", "0.51534104", "0.5140996", "0.513567", "0.5127997", "0.51270294", "0.51228493", "0.5119769", "0.51063645", "0.5099209", "0.50967866", "0.50927734", "0.5092562", "0.5070258", "0.5061713", "0.505583", "0.50468", "0.5042974", "0.50428003", "0.5038876", "0.50303346", "0.5017949", "0.5012949", "0.5007049", "0.50037307", "0.5001285", "0.5000682", "0.5000682", "0.49990496", "0.49945047", "0.49875194", "0.49850205", "0.49817908", "0.49797475", "0.49797195", "0.4971755", "0.49680823", "0.4967212", "0.49663028", "0.49623322", "0.49590918", "0.49550954", "0.49522144", "0.49508977", "0.4948136", "0.49392748", "0.49389032", "0.49365434", "0.49281326", "0.49194136", "0.49167755", "0.49126902", "0.49111947", "0.4910887", "0.4910887", "0.49089006", "0.48938367", "0.48905626", "0.48894733", "0.48845372", "0.4880294" ]
0.0
-1
The name of the object
@Override public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String get_object_name() {\n\t\treturn this.name;\n\t}", "protected String get_object_name() {\n\t\treturn this.name;\n\t}", "String getObjectName();", "public String getObject_name() {\n return object_name;\n }", "public String getName() {\n\t\treturn \"Object class name\";\n\t}", "public String getObjectName() {\r\n return objectName;\r\n }", "public String getObjectName() {\r\n\t\treturn objectName;\r\n\t}", "public String getObjectName() { return objectName; }", "public String getObjName()\n {\n return this.objName;\n }", "public ObjectName getName() {\n\t\treturn name;\n\t}", "protected String get_object_name() {\n\t\treturn null;\n\t}", "protected String get_object_name() {\n\t\treturn null;\n\t}", "public java.lang.String getObjectName(){\n return localObjectName;\n }", "@Override\n\tpublic String getObjectName() {\n\t\t// Follow priorities to obtain the object name\n\t\tif (!CompileUtil.isBlank(this.label)) {\n\t\t\treturn this.label;\n\t\t} else if (this.key != null) {\n\t\t\treturn this.key.toString();\n\t\t} else {\n\t\t\treturn String.valueOf(this.index);\n\t\t}\n\t}", "protected String get_object_name() {\n\t\treturn this.fieldname;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn heldObj.getName();\n\t}", "public String getName() {\r\n \treturn this.getClass().getName();\r\n }", "public String objectName() {\n return this.objectName;\n }", "String getObjectRefName();", "public String getObjectName() {\r\n\t\tif (objectName == null || objectName.length() == 0)\r\n\t\t\tsetObjectName(\"jk\" + jkNr);\r\n\t\treturn objectName;\r\n\t}", "@Override\n\tpublic String name() {\n\n\t\treturn NAME;\n\t}", "public String getObjectName() {\r\n\t\tif (objectName == null || objectName.length() == 0)\r\n\t\t\tsetObjectName(\"entity\" + entityNr);\r\n\t\treturn objectName;\r\n\t}", "@Override\n public String getObjectName() {\n\treturn null;\n }", "public final String name() {\n\t\treturn name;\n\t}", "@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }", "public String name() {\n this.use();\n\n return name;\n }", "Object getName() {\n return name;\n }", "public java.lang.String getName();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "@Override\n public String getName() {\n return name();\n }", "public String getName() {\n return instance.getName();\n }", "public String getName() {\n return instance.getName();\n }", "public String getName() {\n return instance.getName();\n }", "@Override\n\tpublic String getName() {\n\t\treturn name + instanceName;\n\t}", "public Object getName() {\n\t\treturn this.name;\n\t}", "public Object getName() {\n\t\treturn this.name;\n\t}", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "protected String get_object_name() {\n\t\treturn this.hostname;\n\t}", "public String getName() {\n\t}", "public final String name ()\r\n {\r\n return _name;\r\n }", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();" ]
[ "0.86018866", "0.86018866", "0.8401811", "0.8399744", "0.83631927", "0.8179105", "0.81269765", "0.8116265", "0.8067802", "0.8008268", "0.80028385", "0.80028385", "0.7826029", "0.78245026", "0.7822519", "0.7789233", "0.77659243", "0.7702567", "0.76279205", "0.7598861", "0.759383", "0.75715053", "0.7560234", "0.75400245", "0.753101", "0.7521073", "0.7516934", "0.7514118", "0.75129706", "0.7505119", "0.7499601", "0.7499601", "0.7499601", "0.74959916", "0.7493359", "0.7493359", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7490277", "0.7459357", "0.7441551", "0.7432798", "0.74300975", "0.74296635", "0.74296635", "0.74296635", "0.74296635", "0.74296635", "0.74296635", "0.74296635", "0.74296635", "0.74296635" ]
0.0
-1
The pluralized name of the object
@Override public String getPluralName() { return pluralName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPluralisedName();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public String getTypeName() {\n\t\t\t\tif (_type.equals(TYPE_OBJECT)) {\n\t\t\t\t\treturn StringUtils.capitalize(_name);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn _type;\n\t\t\t}", "PropertyName getName();", "protected String get_object_name() {\n\t\treturn this.name;\n\t}", "protected String get_object_name() {\n\t\treturn this.name;\n\t}", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "public String getLocalizedName() {\n\t\treturn this.name().toUpperCase();\n\t}", "SimpleName getName();", "public String getName() {\n\t\treturn \"Object class name\";\n\t}", "default String getDisplayName() {\r\n\t\treturn getClass().getSimpleName();\r\n\t}", "public String getLocalizedName()\n {\n return StatCollector.translateToLocal(this.getUnlocalizedName() + \".\" + TreeOresLogs2.EnumType.DIAMOND.getUnlocalizedName() + \".name\");\n }", "String getSimpleName();", "String getSimpleName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public java.lang.String getName();", "String getObjectName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();", "public String getName();" ]
[ "0.80947906", "0.68333584", "0.6706688", "0.66735524", "0.66140157", "0.66140157", "0.6497912", "0.6488702", "0.6463129", "0.6443918", "0.64429635", "0.6432356", "0.64122766", "0.64122766", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6403828", "0.6365613", "0.6363982", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489", "0.635489" ]
0.76290226
1
The type of the object
@Override public Type getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getType()\r\n {\r\n\treturn type;\r\n }", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}", "public ObjType getType () {\n\t\tif (type == null) {\n\t\t\ttype = Virtue.getInstance().getConfigProvider().getObjTypes().list(id);\n\t\t}\n\t\treturn type;\n\t}", "type getType();", "public Type getType();", "public String getType() {\r\n return this.getClass().getName();\r\n }", "public Class getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "public Class getType();", "@Override\n\tpublic Type getType() {\n\t\treturn heldObj.getType();\n\t}", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public final String getType() {\n return this.getClass().getName();\n }", "public Class<?> getObjectType() {\n return objectType;\n }", "public String type();", "public String getType() {\n return (String) getObject(\"type\");\n }", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public Type getType () {\n\t\treturn type;\n\t}", "public Type type() {\n\t\treturn type;\n\t}", "abstract public Type getType();", "public synchronized String getType() {\n\t\treturn type;\n\t}", "public final Type getType(){\r\n return type;\r\n }" ]
[ "0.80398756", "0.79766655", "0.78162223", "0.7787771", "0.77850056", "0.77125615", "0.7689074", "0.76560324", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.7641367", "0.76217717", "0.76074964", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.75926673", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.7558677", "0.750762", "0.748657", "0.7476575", "0.7476511", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7475706", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.7425567", "0.74085265", "0.73803514", "0.7366166", "0.7357251", "0.73547184" ]
0.0
-1
The type of the object's parent
@Override public Type getParentType() { return parentType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getParentType() {\r\n return parent_type;\r\n }", "public String getParentType() {\n return this.parentType;\n }", "public java.lang.String getContainingParentType() {\n return containingParentType;\n }", "public java.lang.String getContainingParentType() {\n return containingParentType;\n }", "public abstract Optional<TypeName> parent();", "public TopLevelType getParentTopLevelType() {\r\n return parent;\r\n }", "public TopLevelType getParentTopLevelType() {\r\n return parent;\r\n }", "Object getParent();", "public String getType() {\r\n return this.getClass().getName();\r\n }", "public IPartitionType getParentContainerType()\n\t{\n\t\treturn parentContainerType;\n\t}", "public Type getPointedType() {\n return getChild();\n }", "ISourceType getEnclosingType();", "public final String getType() {\n return this.getClass().getName();\n }", "public String getParentTypeCode() {\n return parentTypeCode;\n }", "public String getType () {\n // Will resolve to specific subclass\n return this.getClass().getSimpleName();\n }", "private String getAltBlockParentType() {\n\t\tRegSetProperties parent = getRegSetParent();\n\t\tString blockBase = ((parent == null) || parent.getBaseName().isEmpty())? \"\" : \"_\" + parent.getBaseName();\n\t\treturn altModelRootType + blockBase; \n\t}", "public IBuildObject getParent();", "public Object getParent() {\r\n return this.parent;\r\n }", "public Object getParent() {\n return this.parent;\n }", "public Object getParent() {\n return this.parent;\n }", "public Object getParent() {\n return this.parent;\n }", "@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "public boolean isParent();", "@Override\n public ResolvedType getParentClass() { return null; }", "IClassBuilder getParent();", "public boolean hasContainingParentType() {\n return fieldSetFlags()[2];\n }", "public void setParentType(String type) {\n this.parentType = type;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}", "public OwObject getParent()\r\n {\r\n return m_Parent;\r\n }", "@Override\n\tpublic Type getType() {\n\t\treturn heldObj.getType();\n\t}", "public final String getTopLevelType() {\n return this.type;\n }", "public Instance getParent() {\r\n \t\treturn parent;\r\n \t}", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public Boolean getIsParent() {\n return isParent;\n }", "<P extends CtElement> P getParent(Class<P> parentType) throws ParentNotInitializedException;", "@VTID(7)\r\n void getParent();", "public Class getType();", "public Type type() {\n if (local() != null && local().squawkIndex() != -1) {\n return local().type();\n }\n else {\n return super.type();\n }\n }", "public CarrierShape parent()\n\t{\n\t\treturn parent;\n\t}", "public String getType() {\n return relationshipName;\n }", "Node<T> parent();", "public Type getType() {\n return referentType;\n }", "public final ShapeParent getShapeParent()\n {\n return parent;\n }", "protected TacticalBattleProcessor getParent() {\n return parent;\n }", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "IGLProperty getParent();", "public int Parent() { return this.Parent; }", "public String getParent() {\n return _theParent;\n }", "public Concept getParent() { return parent; }", "public ConversionHelper getParent()\n {\n return parent;\n }", "PSObject getTypeReference();", "public RMParentShape getParent() { return _parent; }", "public Foo getParent() {\n return parent;\n }", "public String getClazz() {\n return relationshipName;\n }", "public Boolean isParentable();", "public String getParent() {\n return _parent;\n }", "public Class<?> getObjectType() {\n return objectType;\n }", "public Object getTipo() {\n\t\treturn null;\n\t}", "abstract public Container<?> getParent();", "public int getParent();", "public E getParentEntity() {\n return parentEntity;\n }", "public String getSuperclass() {\n\t\treturn null;\n\t}", "public Class getType();", "@DISPID(1610743809) //= 0x60020001. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject parent();", "@Override\n\t\tpublic ParentInfo getParentInfo() {\n\t\t\treturn null;\n\t\t}", "private TypeBodyImpl getApparentType() {\n TypeBodyImpl enclosingType = getEnclosingTypeBody();\n while (enclosingType != null) {\n TypeBodyImpl superType = enclosingType;\n while (superType != null) {\n if (superType == method.getEnclosingTypeBody()) {\n // We've found the method on a superclass\n return enclosingType;\n }\n superType = superType.getSupertype() == null ? null : superType.getSupertype().getTypeBody();\n }\n // Not found on this type, so try the enclosing type\n enclosingType = enclosingType.getEnclosingTypeBody();\n }\n return null;\n }", "@Override\r\n\tpublic Long getEventParentClass() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Long getEventParentClass() {\n\t\treturn null;\r\n\t}", "public Entity getParent() {\n return parent;\n }", "public int getType() {\n\t\treturn 1;\r\n\t}", "public Type getType();", "protected abstract Class<? extends TreeStructure> getTreeType();", "public String getParent() {\r\n return parent;\r\n }", "@DISPID(1002) //= 0x3ea. The runtime will prefer the VTID if present\r\n @VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject parent();", "@DISPID(1002) //= 0x3ea. The runtime will prefer the VTID if present\r\n @VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject parent();", "public ModelObjectType getType() {\n return type;\n }", "TMNodeModelComposite getParent() {\n return parent;\n }", "public abstract boolean isParent(T anItem);", "Entity getSuperType();", "type getType();", "public abstract Type getType();", "public String getParent() {\n return parent;\n }", "@Override\n public final Integer getOwnerType() {\n return null;\n }", "Spring getParent() {\n return parent;\n }", "public boolean isParent(T anItem) { return false; }", "@NonNull <T extends ContainerHolder> Optional<T> parent();", "public final Cause<?> getParent() {\n return parent;\n }", "public Type type() {\n\t\treturn type;\n\t}", "public ClassReferenceMirror getType() {\n\t\treturn type;\n\t}", "@Override public Type type() {\n return type;\n }", "public Type getType()\n {\n return type;\n }", "public CompositeObject getParent(\n )\n {return (parentLevel == null ? null : (CompositeObject)parentLevel.getCurrent());}", "abstract public Type getType();", "public IType getType();" ]
[ "0.79814094", "0.7954942", "0.7436656", "0.7385757", "0.7287881", "0.7153707", "0.7153707", "0.7088897", "0.6862895", "0.6823026", "0.6809532", "0.6808478", "0.6750998", "0.6709413", "0.6638883", "0.6611937", "0.6596458", "0.6589147", "0.65827477", "0.65827477", "0.65827477", "0.6582384", "0.6537685", "0.6537685", "0.6537685", "0.6537685", "0.65239793", "0.6523484", "0.6506121", "0.645961", "0.6446589", "0.6444602", "0.64165354", "0.6414405", "0.6400851", "0.6377144", "0.63649976", "0.635104", "0.63332945", "0.6324029", "0.6321042", "0.632029", "0.631036", "0.6306955", "0.6292906", "0.6284059", "0.62831026", "0.6273783", "0.6249892", "0.62473476", "0.62473476", "0.62441295", "0.62431026", "0.6239138", "0.6232771", "0.62105155", "0.62063795", "0.62046355", "0.6197832", "0.61968595", "0.61861545", "0.6164238", "0.61633575", "0.61632854", "0.61586255", "0.6157466", "0.61551034", "0.6149058", "0.61372703", "0.61328906", "0.6117281", "0.61120516", "0.61087275", "0.61087275", "0.61004364", "0.6097946", "0.6094708", "0.6084275", "0.60828155", "0.6073265", "0.6073265", "0.606614", "0.60653085", "0.6058164", "0.60580087", "0.60304606", "0.60293144", "0.6027841", "0.6015485", "0.6013048", "0.6009163", "0.6003476", "0.5997459", "0.59955233", "0.5993448", "0.5991985", "0.5984807", "0.5984528", "0.59783375", "0.597342" ]
0.76815903
2
The attributes of the object
@Override public List<MappedField<?>> getAttributes() { return attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Attributes getAttributes() { return this.attributes; }", "Attributes getAttributes();", "IAttributes getAttributes();", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}", "public java.util.Collection getAttributes();", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "public Map<String, Object> getAttributes();", "public Map<String, Object> getAttributes();", "public Object[] getAttributes() {\n\t\treturn new Object[] {true}; //true for re-init... \n\t}", "public abstract Map<String, Object> getAttributes();", "Map<String, String> getAttributes();", "public String getAttributes() {\n return attributes;\n }", "public String getAttributes() {\n return attributes;\n }", "public Map<String, Object> getAttrs();", "public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}", "public Map<String, String> getAttributes();", "public Attribute[] getAttributes()\n {\n return _attrs;\n }", "public Map<String, String> getAttributes() {\n\t\treturn atts;\n\t}", "public Map<String, String> getAttributes() {\n\t\treturn attributes;\n\t}", "@Override\r\n\tpublic Map<String, Object> getAttributes() {\n\t\treturn null;\r\n\t}", "public abstract Map getAttributes();", "public List<GenericAttribute> getAttributes() {\n return attributes;\n }", "public List<Pair<String, String>> getAttributes() {\n\t\treturn attributes;\n\t}", "public List<String> attributes() {\n return this.attributes;\n }", "public Collection<HbAttributeInternal> attributes();", "public final String[] getAttributes() {\n return this.attributes;\n }", "public List<Attribute> getAttributes() {\r\n return attributes;\r\n }", "public Map<String, Set<String>> getAttributes() {\n return attributes;\n }", "ArrayList getAttributes();", "public Vector<HibernateAttribute> getAttributes() {\n\t\treturn attributes;\n\t}", "public java.lang.Integer getAttributes() {\r\n return attributes;\r\n }", "public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}", "public WSLAttributeList getAttributes() {return attributes;}", "public List<TLAttribute> getAttributes();", "public FactAttributes getAttributes() {\r\n return localAttributes;\r\n }", "public List<Attribute<?>> getAttributes() {\r\n\t\treturn Collections.unmodifiableList(attributes);\r\n\t}", "@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayload getAttributes() {\n return attributes_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : attributes_;\n }", "public String[] getRelevantAttributes();", "public List<Attribute> getAttributes() {\n return Collections.unmodifiableList(attributes);\n }", "public Map<String, String> getAttributes() {\n return Collections.unmodifiableMap(attributes);\n }", "@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}", "public String[] getAllAttributes() {\n\t\treturn allAttributes;\n\t}", "public Vector getAttributeFields() {\n\treturn attributeFields;\n }", "public TableAttributes getAttributes() {\n\treturn attrs;\n }", "public Attributes getAttributes() {\n\t\treturn null;\r\n\t}", "trinsic.services.common.v1.CommonOuterClass.JsonPayload getAttributes();", "public String getAttributes() {\n StringBuilder sb = new StringBuilder();\n\n // class\n if (!getClassAttribute().isEmpty()) {\n sb.append(\"class='\").append(getClassAttribute()).append(\"' \");\n }\n\n // data-*\n if (!getDataAttributes().isEmpty()) {\n sb.append(getDataAttributes()).append(\" \");\n }\n\n // hidden\n if (isHiddenAttribute()) {\n //sb.append(\"hidden \");\n addSpecialAttribute(\"hidden\");\n }\n\n // id\n if (!getIdAttribute().isEmpty()) {\n sb.append(\"id='\").append(getIdAttribute()).append(\"' \");\n }\n\n // style\n if (!getStyleAttribute().isEmpty()) {\n sb.append(\"style='\").append(getStyleAttribute()).append(\"' \");\n }\n\n // title\n if (!getTitleAttribute().isEmpty()) {\n sb.append(\"title='\").append(getTitleAttribute()).append(\"' \");\n }\n\n // custom\n if (!getCustomAttributes().isEmpty()) {\n sb.append(getCustomAttributes()).append(\" \");\n }\n \n // special\n if (!getSpecialAttribute().isEmpty()) {\n sb.append(getSpecialAttribute());\n }\n\n return sb.toString().trim();\n }", "@Override\n\tpublic AttributeMap getAttributes() {\n\t\treturn defaultEdgle.getAttributes();\n\t}", "public Vector getAttributes(boolean create) {\n\treturn attributeFields;\n }", "private byte attributes() {\n return (byte) buffer.getShort(ATTRIBUTES_OFFSET);\n }", "public HashMap<String, String> GetRawAttributes();", "public Enumeration enumeratePropertyNames() {\n return this.attributes.keys();\n }", "public Map getAttributes() {\n Map common = channel.getAttributes();\n \n if(map == null) {\n map = new HashMap(common);\n }\n return map;\n }", "public Map<String, Object> attributes() {\n Map<String, Object> attributes = new HashMap<String, Object>();\n for (Column column : getColumns()) {\n String name = Strings.camelize(column.getName(), true);\n attributes.put(name, attribute(name));\n }\n return attributes;\n }", "public String [] getNames () { \n return this.listAttributes(); \n }", "@Override\n public ArrayList<SCANAttributesXML> getAttributes() {\n return mesoCfgXML.getAttributesData();\n }", "@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayloadOrBuilder getAttributesOrBuilder() {\n return getAttributes();\n }", "public final native JsArray<Attribute> getAttributes() /*-{\n\t\t\treturn this.attributes;\n\t\t}-*/;", "@Override\n\tpublic ArrayList<Object> getAttributeList() {\n\t\tArrayList<Object> attributes = new ArrayList<Object>();\n//\t\tattributes.add(\"s2014_age\");\n//\t\tattributes.add(\"s2014_prog_skill\");\n//\t\tattributes.add(\"s2014_uni_yrs\");\n//\t\tattributes.add(\"s2014_os\");\n//\t\tattributes.add(\"s2014_progLangs\");\n//\t\tattributes.add(\"s2014_engSkill\");\n\t\tattributes.add(\"s2014_favAnimal\");\n\t\tattributes.add(\"s2014_MoreMtns\");\n//\t\tattributes.add(\"s2014_winter\");\n\t\tattributes.add(\"s2014_favColor\");\n//\t\tattributes.add(\"s2014_neuralNetwork\");\n//\t\tattributes.add(\"s2014_vectorMachine\");\n//\t\tattributes.add(\"s2014_sql\");\n//\t\tattributes.add(\"s2014_favSQLServ\");\n//\t\tattributes.add(\"s2014_apriori\");\n\t\treturn attributes;\n\t}", "public Map<String, Map<String, String>> getUserAttributes() {\n return m_userAttributes;\n }", "public ObjectProperties getObjectProperties();", "@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "protected StringBuffer getAttributes()\r\n\t{\r\n\t\t// Output buffer\r\n\t\tStringBuffer transformBuff\t= new StringBuffer();\r\n\t\t// The various transformation buffers.\r\n\t\tStringBuffer rotateBuff\t\t= new StringBuffer();\r\n\t\tStringBuffer translateBuff\t= new StringBuffer();\r\n\t\tStringBuffer scaleBuff \t\t= new StringBuffer();\r\n\r\n\t\t\r\n\t\t// now let's calculate our transformation information if any.\r\n\t\t////////////////// Rotate the object ////////////\r\n\t\t// you may want to play with this if it doesn't work\r\n\t\t// Transformation a followed by tranformation b is not the\r\n\t\t// same as transformation b followed by transformation a.\r\n\t\t// Page 65 SVG Essentials, J. David Eisenberg, O'Reilly Press.\r\n\t\tif (Rotation != 0.0)\r\n\t\t{\r\n\t\t\trotateBuff.append(\"rotate(\");\r\n\t\t\trotateBuff.append(Rotation + \" \");\r\n\t\t\t// Blocks are rotated around their insertion point.\r\n\t\t\trotateBuff.append(Anchor.toTransformCoordinate());\r\n\t\t\trotateBuff.append(\") \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\r\n\t\t///////////////// Scale the object //////////////\r\n\t\tif ((xScale != 1.0) || (yScale != 1.0))\r\n\t\t{\r\n\t\t\tscaleBuff.append(\" scale(\"+xScale);\r\n\t\t\tif (xScale != yScale)\r\n\t\t\t\tscaleBuff.append(\",\"+yScale);\r\n\t\t\tscaleBuff.append(\")\");\r\n\t\t\t\r\n\t\t\t// Now we have to compensate for any scaling in the y axis \r\n\t\t\t// because Dxf scales objects from the lower left corner of\r\n\t\t\t// the drawing and SVG scales from the top left.\r\n\t\t\t//\r\n\t\t\t// This requires a little explanation as it took some time \r\n\t\t\t// to work out exactly what is going on between DXF and SVG.\r\n\t\t\t//\r\n\t\t\t// Blocks in AutoCAD have their own space. When you choose \r\n\t\t\t// an insertion point for a block you are telling the block\r\n\t\t\t// that it's new origin is the insert point, not the drawing's\r\n\t\t\t// origin.\r\n\t\t\t//\r\n\t\t\t// Dxf2Svg reads the blocks section of the DXF and interprets the\r\n\t\t\t// entities within a block literally and converts them into \r\n\t\t\t// XML entities with the insert point as their origin.\r\n\t\t\t// \r\n\t\t\t// Now DXF's drawing origin is in the bottom lefthand corner of the page.\r\n\t\t\t// SVG's origin is the top left hand corner. That means that all blocks \r\n\t\t\t// are drawn in reference to the lower left corner. We have already converted\r\n\t\t\t// the blocks entities to assume that the origin is SVG style (top left)\r\n\t\t\t// so when we try to specify an insert point in SVG, we have a problem. The\r\n\t\t\t// references are from different corners of the page.\r\n\t\t\t//\r\n\t\t\t// To compensate blocks have two points; an Anchor like all other graphic \r\n\t\t\t// objects and a Virtual DXF Coordinate (VDC). The VDC is basically\r\n\t\t\t// the x, and y values from the DXF file, converted to USR_UNITS.\r\n\t\t\t// That's all. It is not converted to SVG space. \r\n\t\t\t// \r\n\t\t\t// First you \r\n\t\t\t// must imagine that you are overlaying SVG space (0,0 top left) on top\r\n\t\t\t// of DXF space (0,0 bottom left). To get objects to appear in the same\r\n\t\t\t// location as they did in the DXF you must move that insertion point\r\n\t\t\t// up above the SVG y = 0 line (so y becomes negative in SVG).\r\n\t\t\t// This requires knowing the height of \r\n\t\t\t// the drawing which SvgUtil.java can provide. Once you know the height\r\n\t\t\t// you find out how subtract the anchor's y coordinate from the height\r\n\t\t\t// thus in effect you are flipping between the two drawing spaces.\r\n\t\t\t//\r\n\t\t\t// Inserting an object is easy now; just use the VDC as the anchor and \r\n\t\t\t// reference the block within a &lt;g&gt; tag. If you want to scale\r\n\t\t\t// that object, things get a little more complicated. The y\r\n\t\t\t// value is in the negative 'y' range of the SVG space. Any scaling of\r\n\t\t\t// that object will be in reference to that point.\r\n\t\t\t//\r\n\t\t\t// So to get the object to appear in it's original position we must move\r\n\t\t\t// it further up into negative y SVG space by the distance it would \r\n\t\t\t// have grown during transformation. I.e. if the object grew by 25% or\r\n\t\t\t// 1.25 in AutoCAD, and the object is 1 inch in height then the growth\r\n\t\t\t// through scaling is 1 * (1.25 -1) or 1 * 0.25 or 0.25 inches.\r\n\t\t\t//\r\n\t\t\t// Now we need to now the distance of the VDC from the SVG object's\r\n\t\t\t// origin. That should be the height of the drawing, but to be sure \r\n\t\t\t// add the absolute value of the distance from SVG y = 0 to the object's\r\n\t\t\t// origin in negative y SVG space, and add it to the distance from \r\n\t\t\t// SVG y = 0 to the VDC y coordinate. Now if you multiply that distance\r\n\t\t\t// by the above 0.25, and subtract that from the SVG origin point\r\n\t\t\t// in negative SVG y space you will have compensated for the shift of \r\n\t\t\t// due to scaling.\r\n\t\t\t//\r\n\t\t\t// We don't need to do anything with the x value because it is \r\n\t\t\t// just the VDC x value, which has a one-to-one relationship to\r\n\t\t\t// SVG space except that it is not in SVG space, but in DXF space.\r\n\t\t\t//\r\n\t\t\t// I'm sorry this would have benifited from a picture so perhaps you\r\n\t\t\t// should browse through the paper documentation as there is a diagram\r\n\t\t\t// that I used to formulate the algorithm.\r\n\t\t\t\r\n\t\t\t//double VDCx = virtualDxfPoint.getX();\r\n\t\t\tdouble VDCy = virtualDxfPoint.getY();\r\n\t\t\t//double Ax\t= Anchor.getX();\r\n\t\t\tdouble Ay\t= Anchor.getY();\r\n\t\t\t\r\n\t\t\t////////////////////////////////\r\n\t\t\t//VDCx = VDCx;\r\n\t\t\tVDCy = VDCy - ((Ay + Math.abs(VDCy))*(yScale -1));\r\n\t\t\t////////////////////////////////\r\n\r\n\t\t\t// We do not need to set the x value for this point. I don't know why.\r\n\t\t\t//virtualDxfPoint.setXUU(VDCx);\r\n\t\t\tvirtualDxfPoint.setYUU(VDCy);\r\n\t\t}\r\n\t\t\r\n\t\t// We do this last because we might have adjusted the virtualDxfPoint's y \r\n\t\t// value, but the transformation is best done after the rotation and it seems\r\n\t\t// before the scale. \r\n\t\ttranslateBuff.append(\"translate(\");\r\n\t\ttranslateBuff.append(virtualDxfPoint.toTransformCoordinate());\r\n\t\ttranslateBuff.append(\")\");\r\n\t\t\r\n\t\t\r\n\t\t// Put all three parts together now.\r\n\t\ttransformBuff.append(\" transform=\\\"\");\r\n\t\t// Can only do this with Java 1.4\r\n\t\t// The transformation ordering can be changed here.\r\n\t\ttransformBuff.append(rotateBuff);\r\n\t\ttransformBuff.append(translateBuff);\r\n\t\ttransformBuff.append(scaleBuff);\t// this may be an empty buffer.\r\n\t\t// closing quote on the transformation string.\r\n\t\ttransformBuff.append(\"\\\"\");\r\n\t\ttransformBuff.append(getAdditionalAttributes());\r\n\t\t\r\n\t\treturn transformBuff;\r\n\t}", "@java.lang.Override\n public int getAttributesCount() {\n return attributes_.size();\n }", "Map getPassThroughAttributes();", "public trinsic.services.common.v1.CommonOuterClass.JsonPayload getAttributes() {\n if (attributesBuilder_ == null) {\n return attributes_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : attributes_;\n } else {\n return attributesBuilder_.getMessage();\n }\n }", "public ShapeAttributes getAttributes()\n {\n return this.normalAttrs;\n }", "public ConnectionAttributes getAttributes() {\n \treturn new ConnectionAttributes(strDbName , strUser, strPasswd, strCharSet, iLoginTimeout);\n }", "@java.lang.Override\n public java.util.List<google.maps.fleetengine.v1.VehicleAttribute> getAttributesList() {\n return attributes_;\n }", "public VAttribute[] getAttributes() throws VlException \n {\n return getAttributes(getAttributeNames());\n }", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "public String printAttributes() {\n checkNotUnknown();\n StringBuilder b = new StringBuilder();\n if (hasDontDelete()) {\n b.append(\"(DontDelete\");\n if (isMaybeDontDelete())\n b.append(\"+\");\n if (isMaybeNotDontDelete())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasDontEnum()) {\n b.append(\"(DontEnum\");\n if (isMaybeDontEnum())\n b.append(\"+\");\n if (isMaybeNotDontEnum())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasReadOnly()) {\n b.append(\"(ReadOnly\");\n if (isMaybeReadOnly())\n b.append(\"+\");\n if (isMaybeNotReadOnly())\n b.append(\"-\");\n b.append(\")\");\n }\n return b.toString();\n }", "public Attributes getFileAttributes()\r\n {\r\n return aFileAttributes;\r\n }", "public void PrintAttributes()\n\t{\n\t\tSystem.out.println(\"Name: \"+ name);\n\t\tSystem.out.println(\"Address: \"+ address);\n\t\tSystem.out.println(\"Phone_Number: \"+ phoneNumber);\n\t\tSystem.out.println(\"Year_Built: \"+ yearBuilt);\n\t\tSystem.out.println(\"Price: \"+ price);\n\t\tSystem.out.println(\"Max_Residents: \"+ maxResidents);\n\t\tSystem.out.println(\"Catagory: \"+ catagory);\n\t\t\n\t\t//GetKeywords(); \n\t\tif(keywords.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Keywords\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Keyword: \" + keywords.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//GetAvailableDates(); \n\t\tif(openDates.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Available Date\");\n\t\t}\n\t\tfor(int j = 0; j < openDates.size(); j++)\n\t\t{\n\t\t\tSystem.out.println(\"Available Date: \"+openDates.get(j).PrintDate());\n\t\t}\n\t}", "Iterable<? extends XomNode> attributes();", "public ConcurrentHashMap<String, Attribute> getAttributes() {\n\t\treturn list;\n\t}", "public Map<String, Object> getAttributesMap() {\n\t\treturn this.staticAttributes;\n\t}", "public int getNumAttributes() {\n return m_NumAttributes;\n }", "public List<SyntacticAttribute> attributes() {\n\t\t\treturn attributes;\n\t\t}", "Map getGenAttributes();", "public Set<String> getAttributes() {\r\n return attributeMap.keySet();\r\n }", "public List<GenericAttribute> getGenericAttributes () {\n return genericAttributes;\n }", "@Override\n public String getAttributesToString() {\n StringBuilder attributes = new StringBuilder();\n attributes.append(\"1 - Nominal Power: \" + nominalPower + \"\\n\");\n attributes.append(\"2 - Number of Bottles: \" + numberOfBottles + \"\\n\");\n attributes.append(\"3 - Annual Energy Consumption: \" + annualEnergyConsumption + \"\\n\");\n\n return attributes.toString();\n }", "public final int getAttributes() {\n\t\treturn m_info.getFileAttributes();\n\t}", "public List<Jattr> attributes() {\n NamedNodeMap attributes = node.getAttributes();\n if (attributes == null)\n return new ArrayList<Jattr>();\n List<Jattr> jattrs = new ArrayList<Jattr>();\n for (int i = 0; i < attributes.getLength(); i++) {\n jattrs.add(new Jattr((Attr) attributes.item(i)));\n }\n return jattrs;\n }", "public final Map<String, DomAttr> getAttributesMap() {\n return attributes_;\n }", "public Map<TextAttribute,?> getAttributes(){\n return (Map<TextAttribute,?>)getRequestedAttributes().clone();\n }", "@Nullable\n public Map<String, Object> getCustomAttributes() {\n return mCustomAttributes;\n }", "public Map<String, Object> getAttributeValues()\n\t{\n\t\tMap<String, Object> retval = new TreeMap<>();\n\t\t\n\t\tfor (ClassAttribute attribute : attributes.keySet())\n\t\t{\n\t\t\tretval.put(attribute.shortName, attributes.get(attribute));\n\t\t}\n\t\t\n\t\treturn retval;\n\t}", "@java.lang.Override\n public java.util.List<? extends google.maps.fleetengine.v1.VehicleAttributeOrBuilder> \n getAttributesOrBuilderList() {\n return attributes_;\n }", "java.util.List<tendermint.abci.EventAttribute> \n getAttributesList();", "List<Attribute<T, ?>> getAttributes();", "public Enumeration getAttributes() {\n\t\treturn url.getAttributes();\n }", "java.util.Map<java.lang.String, java.lang.String> getAttributesMap();", "protected Map<String, String> getElementAttributes() {\n // Preserve order of attributes\n Map<String, String> attrs = new HashMap<>();\n\n if (this.getName() != null) {\n attrs.put(\"name\", this.getName());\n }\n if (this.getValue() != null) {\n attrs.put(\"value\", this.getValue());\n }\n\n return attrs;\n }", "public Map getProperties() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return new HashMap();\n }\n HashMap properties = new HashMap();\n Enumeration enuAttributes = session.getAttributeNames();\n while (enuAttributes.hasMoreElements()) {\n String nextAttribute = (String) enuAttributes.nextElement();\n Object value = session.getAttribute(nextAttribute);\n properties.put(nextAttribute, value);\n }\n return properties;\n }", "public Enumeration getAttributes()\n {\n ensureLoaded();\n return m_tblAttribute.elements();\n }" ]
[ "0.76212144", "0.75751394", "0.7570012", "0.74666244", "0.74666244", "0.74666244", "0.7360459", "0.73430157", "0.7304732", "0.7285054", "0.7285054", "0.7214333", "0.7198343", "0.7174345", "0.7163679", "0.7163679", "0.7137233", "0.7098338", "0.69795674", "0.6977811", "0.6973204", "0.6972696", "0.69541967", "0.69331384", "0.6907273", "0.6900318", "0.68864626", "0.68649864", "0.6827528", "0.6821685", "0.6762778", "0.6757015", "0.673852", "0.67014796", "0.6669888", "0.6656942", "0.6641483", "0.6620535", "0.66091853", "0.66034573", "0.6583466", "0.6574453", "0.65728736", "0.6558624", "0.65544724", "0.6524805", "0.64793754", "0.6463999", "0.64496624", "0.6436281", "0.64114964", "0.6403984", "0.63986576", "0.63868964", "0.6347469", "0.6323117", "0.6322337", "0.632228", "0.63046277", "0.63019395", "0.6289036", "0.62877667", "0.62533116", "0.62410456", "0.6234758", "0.6234436", "0.6206285", "0.6198704", "0.6198374", "0.61979747", "0.6195842", "0.6188938", "0.6180674", "0.617517", "0.6153336", "0.6151596", "0.61449385", "0.6133491", "0.6125652", "0.6118396", "0.6103653", "0.6096427", "0.6091081", "0.6087702", "0.6087259", "0.6077968", "0.6070345", "0.60685354", "0.6057654", "0.6052942", "0.6049042", "0.6043789", "0.6042937", "0.6040898", "0.60298663", "0.60011685", "0.5999182", "0.5996753", "0.59890676", "0.5988018" ]
0.723674
11
TODO Autogenerated method stub
private String insert(String input_from_user) { System.out.println("Enter the position you want to insert a character in the string"+input_from_user); int position = in.nextInt(); char get_char = in.next().charAt(0); String result = insertCharAt(input_from_user,get_char,position); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private String insertCharAt(String input_from_user, char get_char, int position) { String compute = null; if(position == 0){ compute = get_char + input_from_user.substring(0, input_from_user.length()); } else{ compute = input_from_user.substring(0,position)+get_char+input_from_user.substring(position,input_from_user.length()); } return compute; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private String edit(String input_from_user, char[] input_array) { System.out.println("Enter the number of positions you want to change the string"+input_from_user); int user_input = in.nextInt(); String result = null; for(int i=0; i <user_input; i++){ System.out.println("Enter the"+i+"th to edit in the "+input_from_user +" string"); System.out.println("Position?"); int pos = in.nextInt(); char input_char = in.next().charAt(0); char get_user_char = input_array[pos]; input_from_user = input_from_user.replace(get_user_char, input_char); } return input_from_user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
private String delete(String input_from_user) { System.out.println("Enter the position of the character to delete, index starts from zero"+input_from_user); int get_position = in.nextInt(); String result = null; if(get_position == 0){ result = input_from_user.substring(1,input_from_user.length()); System.out.println(result); } else{ result = input_from_user.substring(0,get_position).concat(input_from_user.substring(get_position+1, input_from_user.length())); System.out.println(result); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Constructors Create a detached DictProvinceRecord
public DictProvinceRecord() { super(DictProvince.DICT_PROVINCE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DictProvinceRecord(Integer provinceId, String name, Integer countryId, Integer areaId, String shortName, String pinyin, Timestamp modified) {\n super(DictProvince.DICT_PROVINCE);\n\n set(0, provinceId);\n set(1, name);\n set(2, countryId);\n set(3, areaId);\n set(4, shortName);\n set(5, pinyin);\n set(6, modified);\n }", "void insertSelective(VRpWkProvinceGprsCsBh record);", "void insert(VRpWkProvinceGprsCsBh record);", "public PersonRecord() {}", "public String createProvincePre() throws Exception {\r\n\r\n province = new Province();\r\n return SUCCESS;\r\n }", "public PointRecord(){\n \n }", "public void insertSelective(HProvinceFb record) {\r\n getSqlMapClientTemplate().insert(\"H_PROVINCE_FB.ibatorgenerated_insertSelective\", record);\r\n }", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "public HProvinceFbDAOImpl() {\r\n super();\r\n }", "public StudentRecord() {}", "public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }", "public PurchaseDto() {}", "public EnvioPersonaPK() {\r\n }", "private Province getProvince(JSONObject data, String provinceId) {\n Province province = null;\n JSONObject provinceJson = data.optJSONObject(provinceId);\n if (provinceJson != null) {\n province = new Province();\n province.setStatus(provinceJson.optString(STATUS));\n //set neighbors NOT DONE\n\n province.setProvince_I18N(provinceJson.optString(PROVINCE_I_18_N));\n province.setRevenue(provinceJson.optInt(REVENUE));\n province.setVehicleMaxLevel(provinceJson.optInt(VEHICLE_MAX_LEVEL));\n province.setArenaName(provinceJson.optString(ARENA));\n\n //regionInfo\n province.setPrimaryRegion(provinceJson.optString(PRIMARY_REGION));\n try {\n JSONObject region = data.optJSONObject(REGIONS);\n JSONObject regionInfo = region.optJSONObject(province.getPrimaryRegion());\n province.setRegionID(regionInfo.optString(REGION_ID));\n province.setRegion_i18n(regionInfo.optString(REGION_I_18_N));\n } catch (Exception e) {\n\n }\n province.setClanId(provinceJson.optInt(CLAN_ID));\n province.setProvinceID(provinceJson.optString(PROVINCE_ID1));\n long prime_time = provinceJson.optLong(PRIME_TIME);\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(prime_time * ParserHelper.MILLIS);\n province.setPrimeTime(cal);\n }\n return province;\n }", "public EmployeeRecord(){}", "public void insert(HProvinceFb record) {\r\n getSqlMapClientTemplate().insert(\"H_PROVINCE_FB.ibatorgenerated_insert\", record);\r\n }", "public LayerDto() {}", "public Department(){}", "public TradeRecordStruct() {\n }", "public Region() { }", "public void setProvince(String province) {\n this.province = province;\n }", "public void setProvince(String province) {\n this.province = province;\n }", "public void setProvince(String province) {\n this.province = province;\n }", "public City() {\n }", "public void setProvince(String province) {\r\n this.province = province;\r\n }", "public void setProvince(String province) {\r\n this.province = province;\r\n }", "public CreatePrivateZoneRecordRequest(CreatePrivateZoneRecordRequest source) {\n if (source.ZoneId != null) {\n this.ZoneId = new String(source.ZoneId);\n }\n if (source.RecordType != null) {\n this.RecordType = new String(source.RecordType);\n }\n if (source.SubDomain != null) {\n this.SubDomain = new String(source.SubDomain);\n }\n if (source.RecordValue != null) {\n this.RecordValue = new String(source.RecordValue);\n }\n if (source.Weight != null) {\n this.Weight = new Long(source.Weight);\n }\n if (source.MX != null) {\n this.MX = new Long(source.MX);\n }\n if (source.TTL != null) {\n this.TTL = new Long(source.TTL);\n }\n }", "public AvroPerson() {}", "public City() {\n\t}", "public City() {\n\t}", "public CommAreaRecord() {\n\t}", "public void setProvinceId(Integer provinceId) {\n this.provinceId = provinceId;\n }", "public void setProvinceid(Integer provinceid) {\n this.provinceid = provinceid;\n }", "public void setProvinceid(Integer provinceid) {\n this.provinceid = provinceid;\n }", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "public PaymentRecordKey() {\n super();\n }", "public Location(String state, String city) {\n try {\n this.city = city;\n this.state = state;\n\n Table<String,String,Demographics> allDemographics = Demographics.load(state);\n\n // this still works even if only 1 city given,\n // because allDemographics will only contain that 1 city\n // we copy the Map returned by the Google Table.row since the implementing\n // class is not serializable\n this.demographics = new HashMap<String, Demographics>(allDemographics.row(state));\n\n if (city != null\n && demographics.values().stream().noneMatch(d -> d.city.equalsIgnoreCase(city))) {\n throw new Exception(\"The city \" + city\n + \" was not found in the demographics file for state \" + state + \".\");\n }\n\n long runningPopulation = 0;\n // linked to ensure consistent iteration order\n populationByCity = new LinkedHashMap<>();\n populationByCityId = new LinkedHashMap<>();\n // sort the demographics to ensure tests pass regardless of implementing class\n // for this.demographics, see comment above on non-serializability of Google Table.row\n ArrayList<Demographics> sortedDemographics =\n new ArrayList<Demographics>(this.demographics.values());\n Collections.sort(sortedDemographics);\n for (Demographics d : sortedDemographics) {\n long pop = d.population;\n runningPopulation += pop;\n if (populationByCity.containsKey(d.city)) {\n populationByCity.put(d.city, pop + populationByCity.get(d.city));\n } else {\n populationByCity.put(d.city, pop);\n }\n populationByCityId.put(d.id, pop);\n }\n\n totalPopulation = runningPopulation;\n } catch (Exception e) {\n System.err.println(\"ERROR: unable to load demographics\");\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n\n String filename = null;\n try {\n filename = Config.get(\"generate.geography.zipcodes.default_file\");\n String csv = Utilities.readResource(filename, true, true);\n List<? extends Map<String,String>> ziplist = SimpleCSV.parse(csv);\n\n zipCodes = new HashMap<>();\n for (Map<String,String> line : ziplist) {\n Place place = new Place(line);\n\n if (!place.sameState(state)) {\n continue;\n }\n\n if (!zipCodes.containsKey(place.name)) {\n zipCodes.put(place.name, new ArrayList<Place>());\n }\n zipCodes.get(place.name).add(place);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR: unable to load zips csv: \" + filename);\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n\n socialDeterminantsOfHealth = new HashMap<String, Map<String, Double>>();\n try {\n filename = Config.get(\"generate.geography.sdoh.default_file\",\n \"geography/sdoh.csv\");\n String csv = Utilities.readResource(filename, true, true);\n List<? extends Map<String,String>> sdohList = SimpleCSV.parse(csv);\n\n for (Map<String,String> line : sdohList) {\n String lineState = line.remove(\"STATE\");\n if (!lineState.equalsIgnoreCase(state)) {\n continue;\n }\n line.remove(\"FIPS_CODE\");\n line.remove(\"COUNTY_CODE\");\n String county = line.remove(\"COUNTY\");\n line.remove(\"ST\");\n\n Map<String, Double> sdoh = new HashMap<String, Double>();\n for (String attribute : line.keySet()) {\n Double probability = Double.parseDouble(line.get(attribute));\n sdoh.put(attribute.toLowerCase(), probability);\n }\n\n socialDeterminantsOfHealth.put(county, sdoh);\n }\n } catch (Exception e) {\n System.err.println(\"WARNING: unable to load SDoH csv: \" + filename);\n e.printStackTrace();\n }\n\n if (!socialDeterminantsOfHealth.isEmpty()) {\n Map<String, Double> averages = new HashMap<String, Double>();\n for (String county : socialDeterminantsOfHealth.keySet()) {\n Map<String, Double> determinants = socialDeterminantsOfHealth.get(county);\n for (String determinant : determinants.keySet()) {\n Double probability = determinants.get(determinant);\n Double sum = averages.getOrDefault(determinant, 0.0);\n averages.put(determinant, probability + sum);\n }\n }\n for (String determinant : averages.keySet()) {\n Double probability = averages.get(determinant);\n averages.put(determinant, (probability / socialDeterminantsOfHealth.keySet().size()));\n }\n socialDeterminantsOfHealth.put(\"AVERAGE\", averages);\n }\n }", "public VehicleInfoAvro() {}", "public Region() {\n }", "public Country() {}", "public static Provinces createEntity(EntityManager em) {\n Provinces provinces = new Provinces()\n .provinceName(DEFAULT_PROVINCE_NAME);\n // Add required entity\n Countries countryName = CountriesResourceIntTest.createEntity(em);\n em.persist(countryName);\n em.flush();\n provinces.setCountryName(countryName);\n return provinces;\n }", "public City(Integer aKey)\r\n {\r\n label = \" \";\r\n key = aKey;\r\n }", "public Builder setProvince(com.google.protobuf.StringValue value) {\n if (provinceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n province_ = value;\n onChanged();\n } else {\n provinceBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder clearProvince() {\n if (provinceBuilder_ == null) {\n province_ = null;\n onChanged();\n } else {\n province_ = null;\n provinceBuilder_ = null;\n }\n\n return this;\n }", "RecordInfo clone();", "public static Province getProvinceById(int provinceid)\n\t{\n\t\treturn Province.find.where().eq(\"provinceId\", provinceid).findUnique();\n\t}", "public SceneFurniRecord ()\n {\n }", "DataHRecordData() {}", "public DBRecord(String encodedForm)\n\t{\n\t\tselected = false;\n\t\tbindings = new ChunkList<DBBinding>();\n\t\tloadFromEncodedForm(encodedForm);\n\t}", "public PersonaVO() {\n }", "public dc_wallet() {}", "public PaymentDetailPojo() {\n }", "public List initProvince(Map map) {\n\t\treturn apMessageDao.initProvince(map);\r\n\t}", "public DoctorRecord(Integer id, Integer age, Integer workTime, Byte sex, String name, String url, Byte duty, String hospitalCode, String certificateCode, String professionalCode, Date registerTime, String registerHospital, String mobile, Integer titleId, BigDecimal consultationPrice, String treatDisease, Byte status, Integer userId, Byte isDelete, Timestamp createTime, Timestamp updateTime, Timestamp onDutyTime, Byte isOnDuty, Byte canConsultation, Integer avgAnswerTime, Integer consultationNumber, BigDecimal avgCommentStar, Integer attentionNumber, String userToken, Timestamp authTime, BigDecimal consultationTotalMoney, Byte isFetch, String signature) {\n super(Doctor.DOCTOR);\n\n set(0, id);\n set(1, age);\n set(2, workTime);\n set(3, sex);\n set(4, name);\n set(5, url);\n set(6, duty);\n set(7, hospitalCode);\n set(8, certificateCode);\n set(9, professionalCode);\n set(10, registerTime);\n set(11, registerHospital);\n set(12, mobile);\n set(13, titleId);\n set(14, consultationPrice);\n set(15, treatDisease);\n set(16, status);\n set(17, userId);\n set(18, isDelete);\n set(19, createTime);\n set(20, updateTime);\n set(21, onDutyTime);\n set(22, isOnDuty);\n set(23, canConsultation);\n set(24, avgAnswerTime);\n set(25, consultationNumber);\n set(26, avgCommentStar);\n set(27, attentionNumber);\n set(28, userToken);\n set(29, authTime);\n set(30, consultationTotalMoney);\n set(31, isFetch);\n set(32, signature);\n }", "public MapEntity() {\n\t}", "public EastNbkmdzb (EastNbkmdzbPK id) {\n\t\tsuper(id);\n\t}", "@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}", "public BookRecord() {\n super(Book.BOOK);\n }", "public ProjectPhaseDTO() {\r\n }", "public LeaguePrimaryKey() {\n }", "public SongRecord(){\n\t}", "public void setProvince(Integer province) {\n this.province = province;\n }", "public void setProvince(Integer province) {\n this.province = province;\n }", "public Profile() {}", "private DungeonRecord(Parcel in){\n _id = in.readLong();\n mDate = in.readString();\n mType = in.readString();\n mOutcome = in.readInt();\n mDistance = in.readInt();\n mTime = in.readInt();\n mReward = in.readString();\n mCoords = in.readString();\n mSkips = in.readString();\n\n }", "public LargeObjectAvro() {}", "public GO_RecordType() {\n }", "public LesserDemandDetail() {\n //For serialization.\n }", "@Override\n public PatientCaseDto createByDoctor(PatientCaseDto patientCaseDto) {\n return null;\n }", "public CloudinsRegionRecord() {\n super(CloudinsRegion.CLOUDINS_REGION);\n }", "public CreateStatus()\n {\n super(new DataMap(), null);\n }", "public Dictionary createDictionary(){\n Dictionary dict = new Dictionary(9973);\n return dict;\n }", "public PaperDTO() {\n }", "public PurchaseCaseDAO() {\n\t\tsuper(PurchaseCaseVO.class, \"purchaseCaseId\");\n\t}", "public VaccineInfo(){}", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public Dict(Obj value) {\n this.value = value;\n }", "public void setProvince(String province) {\r\n this.province = province == null ? null : province.trim();\r\n }", "public ClientDetailsEntity() {\n\t\t\n\t}", "public KeyValuePair () {\n key = null;\n value = null;\n }", "private ReviewRecord newInstanceWithPrimaryKey(String customerCode, Integer bookId) {\n\t\tReviewRecord review = new ReviewRecord ();\n review.setCustomerCode(customerCode); \n review.setBookId(bookId); \n\t\treturn review;\n\t}", "public SegmentInformationTable()\n\t{\n\n\t}", "MAP createMAP();", "@SuppressWarnings(\"unused\")\n private MyPropertiesMapEntry() {\n this.key = null;\n this.value = null;\n }", "public StreetAddress() {}", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public DomainPK()\n {\n }", "public Department(String name, String adress, int dNo, String postCode, String city, String phone) {\n\t\tsuper(name);\n\t\tthis.adress = adress;\n\t\tthis.dNo = dNo;\n\t\tthis.postCode = postCode;\n\t\tthis.city = city;\n\t\tthis.phone = phone;\n\t\tcl = new ArrayList<CompositeLine>();\n\t}", "public void setLivingProvince(Province livingProvince) {\n this.livingProvince = livingProvince;\n }", "public TreeDictionary() {\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getProvinceOrBuilder() {\n return getProvince();\n }", "public Address() {}", "public OpenERPRecordSet() {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t}", "public SchemataRecord() {\n super(Schemata.SCHEMATA);\n }", "public ProfileBankAccount() {\r\n }", "public static TransitDataMapFragment newInstance() {\n Bundle bundle = new Bundle();\n TransitDataMapFragment mapFragment = new TransitDataMapFragment();\n mapFragment.setArguments(bundle);\n return mapFragment;\n }" ]
[ "0.6795921", "0.55619574", "0.54978406", "0.5337015", "0.529529", "0.5207295", "0.51808935", "0.51067233", "0.50812024", "0.5078175", "0.5025402", "0.50239", "0.50166905", "0.5007625", "0.50072056", "0.49483588", "0.4942437", "0.49169567", "0.49041757", "0.4807383", "0.48038194", "0.48038194", "0.48038194", "0.48034057", "0.47996107", "0.47996107", "0.47708857", "0.47641885", "0.47517967", "0.47517967", "0.47470453", "0.4742405", "0.47310933", "0.47310933", "0.4726677", "0.47156596", "0.46993956", "0.46971717", "0.46908358", "0.46878296", "0.46487176", "0.46289417", "0.4618352", "0.4616522", "0.46061164", "0.46025878", "0.45980728", "0.4597795", "0.45801187", "0.45645067", "0.4561663", "0.45616508", "0.45576847", "0.45526415", "0.45499468", "0.45408633", "0.45377743", "0.45371452", "0.45313463", "0.45282444", "0.4526134", "0.45142668", "0.45142668", "0.4512856", "0.45014283", "0.44895163", "0.44885805", "0.44834873", "0.44776452", "0.44741434", "0.44735238", "0.44678038", "0.44523233", "0.4448835", "0.4437932", "0.44320706", "0.44320706", "0.44320706", "0.44320706", "0.44320706", "0.44278768", "0.44254667", "0.4421449", "0.44178528", "0.44173878", "0.44104573", "0.44073066", "0.4403782", "0.4396285", "0.43866423", "0.43841973", "0.43840283", "0.43833897", "0.43799058", "0.43788266", "0.43769905", "0.43762437", "0.43750578", "0.43749076", "0.43747884" ]
0.78949386
0
Create a detached, initialised DictProvinceRecord
public DictProvinceRecord(Integer provinceId, String name, Integer countryId, Integer areaId, String shortName, String pinyin, Timestamp modified) { super(DictProvince.DICT_PROVINCE); set(0, provinceId); set(1, name); set(2, countryId); set(3, areaId); set(4, shortName); set(5, pinyin); set(6, modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DictProvinceRecord() {\n super(DictProvince.DICT_PROVINCE);\n }", "void insertSelective(VRpWkProvinceGprsCsBh record);", "public String createProvincePre() throws Exception {\r\n\r\n province = new Province();\r\n return SUCCESS;\r\n }", "void insert(VRpWkProvinceGprsCsBh record);", "public void insertSelective(HProvinceFb record) {\r\n getSqlMapClientTemplate().insert(\"H_PROVINCE_FB.ibatorgenerated_insertSelective\", record);\r\n }", "public void insert(HProvinceFb record) {\r\n getSqlMapClientTemplate().insert(\"H_PROVINCE_FB.ibatorgenerated_insert\", record);\r\n }", "public static Provinces createEntity(EntityManager em) {\n Provinces provinces = new Provinces()\n .provinceName(DEFAULT_PROVINCE_NAME);\n // Add required entity\n Countries countryName = CountriesResourceIntTest.createEntity(em);\n em.persist(countryName);\n em.flush();\n provinces.setCountryName(countryName);\n return provinces;\n }", "@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}", "private Province getProvince(JSONObject data, String provinceId) {\n Province province = null;\n JSONObject provinceJson = data.optJSONObject(provinceId);\n if (provinceJson != null) {\n province = new Province();\n province.setStatus(provinceJson.optString(STATUS));\n //set neighbors NOT DONE\n\n province.setProvince_I18N(provinceJson.optString(PROVINCE_I_18_N));\n province.setRevenue(provinceJson.optInt(REVENUE));\n province.setVehicleMaxLevel(provinceJson.optInt(VEHICLE_MAX_LEVEL));\n province.setArenaName(provinceJson.optString(ARENA));\n\n //regionInfo\n province.setPrimaryRegion(provinceJson.optString(PRIMARY_REGION));\n try {\n JSONObject region = data.optJSONObject(REGIONS);\n JSONObject regionInfo = region.optJSONObject(province.getPrimaryRegion());\n province.setRegionID(regionInfo.optString(REGION_ID));\n province.setRegion_i18n(regionInfo.optString(REGION_I_18_N));\n } catch (Exception e) {\n\n }\n province.setClanId(provinceJson.optInt(CLAN_ID));\n province.setProvinceID(provinceJson.optString(PROVINCE_ID1));\n long prime_time = provinceJson.optLong(PRIME_TIME);\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(prime_time * ParserHelper.MILLIS);\n province.setPrimeTime(cal);\n }\n return province;\n }", "public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }", "public void setProvince(String province) {\r\n this.province = province;\r\n }", "public void setProvince(String province) {\r\n this.province = province;\r\n }", "public void setProvince(String province) {\n this.province = province;\n }", "public void setProvince(String province) {\n this.province = province;\n }", "public void setProvince(String province) {\n this.province = province;\n }", "public PersonRecord() {}", "public HProvinceFbDAOImpl() {\r\n super();\r\n }", "public void setProvinceid(Integer provinceid) {\n this.provinceid = provinceid;\n }", "public void setProvinceid(Integer provinceid) {\n this.provinceid = provinceid;\n }", "public MappedModelEVO create(MappedModelEVO evo) throws Exception {\n\t MappedModelPK local = this.server.ejbCreate(evo);\r\n MappedModelEVO newevo = this.server.getDetails(\"<UseLoadedEVOs>\");\r\n MappedModelPK pk = newevo.getPK();\r\n this.mLocals.put(pk, local);\r\n return newevo;\r\n }", "public void setProvinceId(Integer provinceId) {\n this.provinceId = provinceId;\n }", "public List initProvince(Map map) {\n\t\treturn apMessageDao.initProvince(map);\r\n\t}", "public Dictionary createDictionary(){\n Dictionary dict = new Dictionary(9973);\n return dict;\n }", "public Builder clearProvince() {\n if (provinceBuilder_ == null) {\n province_ = null;\n onChanged();\n } else {\n province_ = null;\n provinceBuilder_ = null;\n }\n\n return this;\n }", "public Builder setProvince(com.google.protobuf.StringValue value) {\n if (provinceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n province_ = value;\n onChanged();\n } else {\n provinceBuilder_.setMessage(value);\n }\n\n return this;\n }", "public static Province getProvinceById(int provinceid)\n\t{\n\t\treturn Province.find.where().eq(\"provinceId\", provinceid).findUnique();\n\t}", "public gDBR createRecord(Map<String,String> valMap)\n throws DBException \n {\n DBRecordKey<? extends DBRecord<?>> rcdKey = this.createKey(valMap); // may throw DBException\n if (rcdKey != null) {\n @SuppressWarnings(\"unchecked\")\n gDBR rcd = (gDBR)rcdKey.getDBRecord();\n // (Java 5) I don't know why this produced an \"unchecked\" warning (the \"setFieldValues\" above does not)\n rcd.setAllFieldValues(valMap);\n return rcd; // not yet saved\n } else {\n Print.logError(\"Unable to create key: \" + this.getUntranslatedTableName());\n return null;\n }\n }", "public TradeRecordStruct() {\n }", "public int updateByPrimaryKeySelective(HProvinceFb record) {\r\n int rows = getSqlMapClientTemplate().update(\"H_PROVINCE_FB.ibatorgenerated_updateByPrimaryKeySelective\", record);\r\n return rows;\r\n }", "public CreatePrivateZoneRecordRequest(CreatePrivateZoneRecordRequest source) {\n if (source.ZoneId != null) {\n this.ZoneId = new String(source.ZoneId);\n }\n if (source.RecordType != null) {\n this.RecordType = new String(source.RecordType);\n }\n if (source.SubDomain != null) {\n this.SubDomain = new String(source.SubDomain);\n }\n if (source.RecordValue != null) {\n this.RecordValue = new String(source.RecordValue);\n }\n if (source.Weight != null) {\n this.Weight = new Long(source.Weight);\n }\n if (source.MX != null) {\n this.MX = new Long(source.MX);\n }\n if (source.TTL != null) {\n this.TTL = new Long(source.TTL);\n }\n }", "RecordInfo clone();", "public EnvioPersonaPK() {\r\n }", "public PointRecord(){\n \n }", "MAP createMAP();", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "int insert(DictDoseUnit record);", "public Location(String state, String city) {\n try {\n this.city = city;\n this.state = state;\n\n Table<String,String,Demographics> allDemographics = Demographics.load(state);\n\n // this still works even if only 1 city given,\n // because allDemographics will only contain that 1 city\n // we copy the Map returned by the Google Table.row since the implementing\n // class is not serializable\n this.demographics = new HashMap<String, Demographics>(allDemographics.row(state));\n\n if (city != null\n && demographics.values().stream().noneMatch(d -> d.city.equalsIgnoreCase(city))) {\n throw new Exception(\"The city \" + city\n + \" was not found in the demographics file for state \" + state + \".\");\n }\n\n long runningPopulation = 0;\n // linked to ensure consistent iteration order\n populationByCity = new LinkedHashMap<>();\n populationByCityId = new LinkedHashMap<>();\n // sort the demographics to ensure tests pass regardless of implementing class\n // for this.demographics, see comment above on non-serializability of Google Table.row\n ArrayList<Demographics> sortedDemographics =\n new ArrayList<Demographics>(this.demographics.values());\n Collections.sort(sortedDemographics);\n for (Demographics d : sortedDemographics) {\n long pop = d.population;\n runningPopulation += pop;\n if (populationByCity.containsKey(d.city)) {\n populationByCity.put(d.city, pop + populationByCity.get(d.city));\n } else {\n populationByCity.put(d.city, pop);\n }\n populationByCityId.put(d.id, pop);\n }\n\n totalPopulation = runningPopulation;\n } catch (Exception e) {\n System.err.println(\"ERROR: unable to load demographics\");\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n\n String filename = null;\n try {\n filename = Config.get(\"generate.geography.zipcodes.default_file\");\n String csv = Utilities.readResource(filename, true, true);\n List<? extends Map<String,String>> ziplist = SimpleCSV.parse(csv);\n\n zipCodes = new HashMap<>();\n for (Map<String,String> line : ziplist) {\n Place place = new Place(line);\n\n if (!place.sameState(state)) {\n continue;\n }\n\n if (!zipCodes.containsKey(place.name)) {\n zipCodes.put(place.name, new ArrayList<Place>());\n }\n zipCodes.get(place.name).add(place);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR: unable to load zips csv: \" + filename);\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n\n socialDeterminantsOfHealth = new HashMap<String, Map<String, Double>>();\n try {\n filename = Config.get(\"generate.geography.sdoh.default_file\",\n \"geography/sdoh.csv\");\n String csv = Utilities.readResource(filename, true, true);\n List<? extends Map<String,String>> sdohList = SimpleCSV.parse(csv);\n\n for (Map<String,String> line : sdohList) {\n String lineState = line.remove(\"STATE\");\n if (!lineState.equalsIgnoreCase(state)) {\n continue;\n }\n line.remove(\"FIPS_CODE\");\n line.remove(\"COUNTY_CODE\");\n String county = line.remove(\"COUNTY\");\n line.remove(\"ST\");\n\n Map<String, Double> sdoh = new HashMap<String, Double>();\n for (String attribute : line.keySet()) {\n Double probability = Double.parseDouble(line.get(attribute));\n sdoh.put(attribute.toLowerCase(), probability);\n }\n\n socialDeterminantsOfHealth.put(county, sdoh);\n }\n } catch (Exception e) {\n System.err.println(\"WARNING: unable to load SDoH csv: \" + filename);\n e.printStackTrace();\n }\n\n if (!socialDeterminantsOfHealth.isEmpty()) {\n Map<String, Double> averages = new HashMap<String, Double>();\n for (String county : socialDeterminantsOfHealth.keySet()) {\n Map<String, Double> determinants = socialDeterminantsOfHealth.get(county);\n for (String determinant : determinants.keySet()) {\n Double probability = determinants.get(determinant);\n Double sum = averages.getOrDefault(determinant, 0.0);\n averages.put(determinant, probability + sum);\n }\n }\n for (String determinant : averages.keySet()) {\n Double probability = averages.get(determinant);\n averages.put(determinant, (probability / socialDeterminantsOfHealth.keySet().size()));\n }\n socialDeterminantsOfHealth.put(\"AVERAGE\", averages);\n }\n }", "Department createOrUpdate(Department department);", "public void setProvince(String province) {\r\n this.province = province == null ? null : province.trim();\r\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public void setProvince(String province) {\n this.province = province == null ? null : province.trim();\n }", "public InMemoryKeyValueStorage(final Map<Bytes, Optional<byte[]>> initialMap) {\n super(SEGMENT_IDENTIFIER, new SegmentedInMemoryKeyValueStorage(asSegmentMap(initialMap)));\n rwLock = ((SegmentedInMemoryKeyValueStorage) storage).rwLock;\n }", "public Map<String, Object> createFldNames2ValsMap(Record record)\n {\n return (createFldNames2ValsMap(record, null));\n }", "public void setProvince(Integer province) {\n this.province = province;\n }", "public void setProvince(Integer province) {\n this.province = province;\n }", "@Override\n\tprotected VtbObject createImpl(Connection conn, VtbObject domainObject)\n\t\t\tthrows SQLException, MappingException {\n\t\treturn null;\n\t}", "public HProvinceFb selectByPrimaryKey(Integer id) {\r\n HProvinceFb key = new HProvinceFb();\r\n key.setId(id);\r\n HProvinceFb record = (HProvinceFb) getSqlMapClientTemplate().queryForObject(\"H_PROVINCE_FB.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }", "protected void perRecordInit(Record record)\n {\n }", "public PDEncryptionDictionary()\n {\n encryptionDictionary = new COSDictionary();\n }", "public StudentRecord() {}", "void createOrUpdateVocabulary(final VocabularyPE vocabularyPE);", "public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}", "public String createProvince() throws Exception {\r\n\r\n ProvinceBusiness provinceBusiness = new ProvinceBusiness();\r\n provinceBusiness.createProvince(province);\r\n if (provinceBusiness.hasErrors()) {\r\n setActionMessages(getMessageText(provinceBusiness.getErrors()));\r\n return INPUT;\r\n }\r\n\r\n return SUCCESS;\r\n }", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "DataHRecordData() {}", "public DBRecord(String encodedForm)\n\t{\n\t\tselected = false;\n\t\tbindings = new ChunkList<DBBinding>();\n\t\tloadFromEncodedForm(encodedForm);\n\t}", "public void createPolygonMap(){\n Log.d(\"POLYGON MAP\",\"SETTING\");\n PolygonManager.getIstance().putPolygonRegion(gMap);\n }", "Snapshot create();", "public EmployeeRecord(){}", "public PurchaseDto() {}", "public abstract ExternalRecord createExternalRecord()\r\n\t\t\tthrows Exception;", "@Override\n public PatientCaseDto createByDoctor(PatientCaseDto patientCaseDto) {\n return null;\n }", "public int updateByPrimaryKey(HProvinceFb record) {\r\n int rows = getSqlMapClientTemplate().update(\"H_PROVINCE_FB.ibatorgenerated_updateByPrimaryKey\", record);\r\n return rows;\r\n }", "public static TransitDataMapFragment newInstance() {\n Bundle bundle = new Bundle();\n TransitDataMapFragment mapFragment = new TransitDataMapFragment();\n mapFragment.setArguments(bundle);\n return mapFragment;\n }", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "int insertMapSelective(Map<String, Object> record);", "public void setLivingProvince(Province livingProvince) {\n this.livingProvince = livingProvince;\n }", "public SavedState(SavedStateMap savedStateMap) {\n this.savedStateMap = savedStateMap;\n this.modelName = savedStateMap.associatedModel;\n this.displayName = savedStateMap.displayName;\n model = findModel(this.modelName);\n createBean();\n if (stateBean != null) {\n this.makeSynchronizers();\n }\n }", "FromTable createFromTable();", "void createRuntimeRecord(ScriptRuntimeDTO record) throws PersistenceException;", "@SuppressWarnings(\"unused\")\n private MyPropertiesMapEntry() {\n this.key = null;\n this.value = null;\n }", "int insert(TDictAreas record);", "public VehicleInfoAvro() {}", "public Builder mergeProvince(com.google.protobuf.StringValue value) {\n if (provinceBuilder_ == null) {\n if (province_ != null) {\n province_ =\n com.google.protobuf.StringValue.newBuilder(province_).mergeFrom(value).buildPartial();\n } else {\n province_ = value;\n }\n onChanged();\n } else {\n provinceBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public void preSaveInit() {\n persistentData.clear();\n for (int i = 0; i < getNumPoints(); i++) {\n persistentData.add(getPoint(i));\n }\n }", "public PaymentRecordKey() {\n super();\n }", "public abstract mapnik.Map createMap(Object recycleTag);", "private void enterEmptyBook(String sku) {\n Book book = new Book();\n bookDB.put(sku, book);\n return;\n }", "public dc_wallet() {}", "public Long createRecord(Record object);", "private KeyValueVersion createAppLobKVV(boolean requirePresent,\n boolean requireAbsent)\n throws ResumePutException {\n\n internalLOBKey = createInternalLobKey();\n final Value appLobValue = ilkToValue(internalLOBKey);\n final ValueVersion prevVV;\n if (requirePresent) {\n /* Inspect non destructively, must not create a new version. */\n prevVV = kvsImpl.get(appLOBKey,Consistency.ABSOLUTE,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n if (prevVV == null) {\n return null;\n }\n /* full or partial LOB */\n } else {\n prevVV = new ReturnValueVersion(Choice.ALL);\n final Version appLobVersion =\n kvsImpl.putIfAbsent(appLOBKey,\n appLobValue,\n (ReturnValueVersion)prevVV,\n CHUNK_DURABILITY,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n /* No LOB or partial LOB */\n if (appLobVersion != null) {\n return new KeyValueVersion(appLOBKey, appLobValue,\n appLobVersion);\n }\n }\n\n /*\n * Three possible alternatives for an existing key/value pair:\n *\n * 1) Partially deleted LOB: delete the LOB and start new insert\n * 2) Complete LOB: delete the LOB and start new insert\n * 3) Partially inserted LOB: resume insert\n */\n final Key extantInternalLobKey = valueToILK(prevVV.getValue());\n final Value extantAppLobValue = ilkToValue(extantInternalLobKey);\n final Version extantAppLobVersion = prevVV.getVersion();\n\n final ValueVersion metadataVV =\n kvsImpl.get(extantInternalLobKey,\n Consistency.ABSOLUTE,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n if (metadataVV == null) {\n /* Can resume with initial metadata creation. */\n internalLOBKey = extantInternalLobKey;\n return new KeyValueVersion(appLOBKey,\n extantAppLobValue,\n extantAppLobVersion);\n }\n\n /* Have old metadata */\n initMetadata(metadataVV.getValue());\n\n if (!lobProps.isPartiallyDeleted()) {\n if (!lobProps.isComplete()) {\n /*\n * A partially inserted object, resume the put operation using\n * the old metadata.\n */\n if (lobProps.isPartiallyAppended()) {\n throw new PartialLOBException(\"Partially appended LOB. Key: \" +\n UserDataControl.displayKey(appLOBKey) +\n \" Internal key: \" + internalLOBKey,\n LOBState.PARTIAL_APPEND,\n false);\n }\n\n internalLOBKey = extantInternalLobKey;\n final KeyValueVersion kvv =\n new KeyValueVersion(appLOBKey,\n extantAppLobValue,\n extantAppLobVersion);\n throw new ResumePutException(kvv, metadataVV.getVersion());\n\n } else if (requireAbsent) {\n /* Complete LOB present. */\n return null;\n }\n }\n\n /* Deleted or complete existing LOB, we are going to start a new. */\n new DeleteOperation(kvsImpl, appLOBKey, lobDurability,\n chunkTimeoutMs,\n TimeUnit.MILLISECONDS).execute(true);\n\n /*\n * App key is still present, replace it atomically, transitioning from\n * the old partial LOB without any rep in the internal lob space to the\n * new partial LOB which will be filled in by the rest of the put\n * operation.\n */\n final Version replaceAppLobVersion =\n kvsImpl.putIfVersion(appLOBKey,\n appLobValue,\n prevVV.getVersion(),\n null,\n CHUNK_DURABILITY,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n if (replaceAppLobVersion == null) {\n final String msg = \"Concurrent LOB put detected \" +\n \"for key: \" + UserDataControl.displayKey(appLOBKey);\n throw new ConcurrentModificationException(msg);\n\n }\n return new KeyValueVersion(appLOBKey, appLobValue,\n replaceAppLobVersion);\n }", "static Wallet createInMemoryWallet() {\n return new InMemoryWallet();\n }", "public abstract Object create(ElementMapping elementMapping, ReadContext context);", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "protected abstract D createData();", "@Override\n\tpublic boolean create(Eleve o) {\n\t\tmap.put(o.getId(),o);\n\t\treturn true;\n\t}", "private ReviewRecord newInstanceWithPrimaryKey(String customerCode, Integer bookId) {\n\t\tReviewRecord review = new ReviewRecord ();\n review.setCustomerCode(customerCode); \n review.setBookId(bookId); \n\t\treturn review;\n\t}", "public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }", "@Override\n public Preparation mapToEntity(PreparationDto dto) {\n return null;\n }", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "protected PersistenceEnvironment<ReadBuffer> createPersistenceEnv(File fileActive, File fileSnapshot,\n File fileTrash)\n throws IOException\n {\n return new BerkeleyDBEnvironment(fileActive, fileSnapshot, fileTrash);\n }", "protected abstract T _createEmpty(DeserializationContext ctxt);", "private Prize createPrizeForTest() {\r\n\r\n EntityManager em = com.topcoder.service.studio.contest.bean.MockEntityManager.EMF.createEntityManager();\r\n em.getTransaction().begin();\r\n\r\n PrizeType prizeType = new PrizeType();\r\n prizeType.setDescription(\"desc\");\r\n prizeType.setPrizeTypeId(2L);\r\n em.persist(prizeType);\r\n\r\n Prize prize = new Prize();\r\n prize.setAmount(new Double(100));\r\n prize.setCreateDate(new Date());\r\n prize.setPlace(new Integer(1));\r\n prize.setType(prizeType);\r\n em.persist(prize);\r\n em.getTransaction().commit();\r\n em.close();\r\n\r\n return prize;\r\n }", "int insertSelective(DictDoseUnit record);", "public OpenERPRecordSet() {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t}", "private void loadRecordIntoDataModel(final String tableName, final String pkName,\n final Object pkValue) {\n final DataSource dataSource = getDataSourceForTable(tableName);\n dataSource.addRestriction(Restrictions.eq(tableName, pkName, pkValue));\n final DataRecord record = dataSource.getRecord();\n\n if (record != null) {\n final Map<String, DataValue> fields = record.getFieldsByName();\n final Map<String, Object> values = new HashMap<String, Object>();\n \n for (final String fieldName : fields.keySet()) {\n final String shorFieldName = fieldName.split(\"\\\\.\")[1];\n if ((fieldName.indexOf(\"date\") >= 0 || fieldName.indexOf(\"time\") >= 0)\n && fields.get(fieldName).getValue() != null) {\n values.put(shorFieldName,\n SqlUtils.normalizeValueForSql(fields.get(fieldName).getValue()).toString());\n } else {\n values.put(shorFieldName, fields.get(fieldName).getValue());\n }\n }\n \n this.dataModel.put(tableName, values);\n }\n }", "private DungeonRecord(Parcel in){\n _id = in.readLong();\n mDate = in.readString();\n mType = in.readString();\n mOutcome = in.readInt();\n mDistance = in.readInt();\n mTime = in.readInt();\n mReward = in.readString();\n mCoords = in.readString();\n mSkips = in.readString();\n\n }" ]
[ "0.7215658", "0.57537854", "0.5697629", "0.5688946", "0.5460344", "0.5319444", "0.5047405", "0.4922014", "0.49046585", "0.48512954", "0.48149648", "0.48149648", "0.4813079", "0.4813079", "0.4813079", "0.48046932", "0.4742642", "0.4671588", "0.4671588", "0.46526808", "0.46415943", "0.46321422", "0.46282014", "0.46165472", "0.45814714", "0.45684454", "0.4551651", "0.45396432", "0.45290858", "0.45274177", "0.45256194", "0.45196408", "0.45128822", "0.45057797", "0.45022744", "0.4483172", "0.44693577", "0.44651303", "0.44633204", "0.44632465", "0.44632465", "0.44632465", "0.44632465", "0.44632465", "0.44599307", "0.44402605", "0.4438153", "0.4438153", "0.44281617", "0.4427544", "0.4425101", "0.4419449", "0.44173932", "0.44164217", "0.4410356", "0.4390616", "0.43786094", "0.4377575", "0.43763322", "0.43755895", "0.4352002", "0.43511856", "0.43504506", "0.43410304", "0.43364486", "0.43350416", "0.4323762", "0.43204868", "0.4308158", "0.42997393", "0.4287907", "0.4285242", "0.4278805", "0.42766544", "0.4275351", "0.42659727", "0.4258786", "0.42528418", "0.4250859", "0.42496914", "0.42459604", "0.42427376", "0.42371073", "0.42344108", "0.42338875", "0.42335638", "0.42274246", "0.42248097", "0.4224309", "0.42217052", "0.4218405", "0.4216845", "0.4216112", "0.4214357", "0.42093474", "0.42085603", "0.42010435", "0.41997522", "0.41943765", "0.4194023" ]
0.6224823
1
GET request for the health check resource. Always returns 200 Success and a response body containing the text "Ok" when server is up and running.
@GET @Produces(MediaType.TEXT_PLAIN) @ApiOperation(value = "Checks if the application is running", response = String.class) @ApiResponses(value = {@ApiResponse(code = 200, message = "Application is running", response = String.class)}) public Response healthCheck() { return Response.ok("Ok") .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "@GET\n\t@Produces(MediaType.TEXT_HTML)\n\t@TypeHint(String.class)\n\tpublic Response healthCheck()\n\t{\n\t\t// very simple health check to validate the web application is running\n\t\t// just return a hard coded HTML resource (HTTP 200) if we're here\n\t\treturn Response.ok(getClass().getResourceAsStream(\"/html/healthResponse.html\")).cacheControl(noCache).build();\n\t}", "@RequestMapping(value = \"/health\", method = RequestMethod.GET)\n public ResponseEntity<String> healthCheck() {\n\n return new ResponseEntity<String>(\"Up and Running\", HttpStatus.OK);\n }", "@ApiOperation(value = \"Check the heart beat.\")\r\n @GetMapping(path = RestfulEndPoints.AUTHENTICATION_HEALTH_CHECK)\r\n public String healthCheck() {\r\n return \"Hello, I am 'Authentication Service' and running quite healthy at port: \"\r\n + env.getProperty(\"local.server.port\");\r\n }", "@GET\n @Path(\"/ping\")\n\tpublic Response ping() {\n\t\tlog.debug(\"Ping check ok\");\n return Response.status(Response.Status.OK).entity(1).build();\n \n\t}", "@GetMapping(\"/health\")\n\t@ApiOperation(value = \"Checks the health of Authentication microservice\")\n\tpublic ResponseEntity<String> healthCheckup() {\n\t\tlog.info(\"Health Check for Authentication Microservice\");\n\t\tlog.info(\"health checkup ----->{}\", \"up\");\n\t\treturn new ResponseEntity<>(\"Up and running...\", HttpStatus.OK);\n\t}", "@GET(\"system/status\")\n Call<InlineResponse200> getStatus();", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "Future<GetHealthCheckerResponse> getHealthChecker(\n GetHealthCheckerRequest request,\n AsyncHandler<GetHealthCheckerRequest, GetHealthCheckerResponse> handler);", "@Test(enabled = true, groups = {\"servicetest.p1\"})\n public void testGetHealthCheck(){\n\n RestResponse<HealthCheck> healthCheckRestResponse = new ServiceWorkflow().getHealthCheck();\n Assert.assertTrue(healthCheckRestResponse.getStatus() == 200, \"Invalid Status\");\n Assert.assertEquals(healthCheckRestResponse.getBody().getService(),serviceName, \"Incorrect Service Name\");\n Assert.assertEquals(healthCheckRestResponse.getBody().getVersion(),version, \"Incorrect version\");\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void getHealthStatus() {\n getHealthStatusAsync().block();\n }", "public Result healthz() {\n return ok(\"OK\");\n }", "@Override\n public HealthCheckResponse call() {\n HealthCheckResponseBuilder hcrb = HealthCheckResponse.named(\"WorldClockAPIHealtCheck\");\n try(Socket socket = new Socket()) {\n socket.connect(new InetSocketAddress(\"worldclockapi.com\", 80), 1000);\n hcrb.up();\n } catch (IOException e) {\n hcrb.down();\n }\n return hcrb.build();\n }", "@Produces\r\n @Readiness\r\n public HealthCheck checkReadiness() {\n return () -> HealthCheckResponse.named(readinessName).up().build();\r\n }", "@RequestMapping(value = {\"/status\",}, method = RequestMethod.GET)\n //@RequestMapping(value = { \"\", \"/\", }, method = RequestMethod.GET)\n @ResponseBody\n public ResponseEntity<String> healthCheck(Locale locale) {\n logger.info(\"Welcome home. The client locale is {}\", locale);\n DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n String formattedDate = dateFormat.format(new Date());\n return new ResponseEntity<String>(\"Welcome, SpringMVC Rest Demo is running. The time on the server is: \"\n + formattedDate, HttpStatus.OK);\n }", "Http.Status status();", "@Override\r\n protected Result check() throws Exception {\n try {\r\n Response response = webTarget.request().get();\r\n\r\n if (!response.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL)) {\r\n\r\n return Result.unhealthy(\"Received status: \" + response.getStatus());\r\n }\r\n\r\n return Result.healthy();\r\n } catch (Exception e) {\r\n\r\n return Result.unhealthy(e.getMessage());\r\n }\r\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/apiservers/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<APIServer> readAPIServerStatus(\n @Path(\"name\") String name);", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/apiservers/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<APIServer> readAPIServerStatus(\n @Path(\"name\") String name, \n @QueryMap ReadAPIServerStatus queryParameters);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Response<Void>> getHealthStatusWithResponseAsync() {\n if (this.client.getHost() == null) {\n return Mono.error(\n new IllegalArgumentException(\"Parameter this.client.getHost() is required and cannot be null.\"));\n }\n return FluxUtil.withContext(\n context -> service.getHealthStatus(this.client.getHost(), this.client.getApiVersion(), context));\n }", "public String status() throws Exception {\n\n \t\tString apiUrl = \"api/status.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}", "@GetMapping(path=\"/health/isReady\", produces = \"plain/text\")\n public ResponseEntity<String> readinessProbe(@RequestParam Optional<Boolean> offline)\n {\n if ( offline.isPresent() )\n this.isOffline = offline.get();\n\n // Obtém o limite de requests simultâneos (parametrizado em variável de ambiente)\n int activeRequestsLimit = Helpers.getEnvVar(\"ACTIVE_REQUESTS_LIMIT\", 999);\n\n // Obtém a quantidade atual de requests ativos (i.e. em execução no momento)\n int activeRequestCount = RequestControl.getActiveRequestCount();\n \n // Retorna erro HTTP 503 se quantidade de requests simultâneos supera o limite definido,\n if ( activeRequestCount > activeRequestsLimit )\n {\n System.out.printf(\"[%s] The readiness probe has failed due to excessive simultaneous requests (Active Requests: %d)\\n\", \n new Date(), activeRequestCount);\n return new ResponseEntity<>(\"Not Ready\", HttpStatus.SERVICE_UNAVAILABLE);\n }\n\n // Retorna erro HTTP 503 se a probe liveness falhou\n if ( livenessProbe().getStatusCode() == HttpStatus.SERVICE_UNAVAILABLE )\n {\n System.out.printf(\"[%s] The readiness probe has failed because this pod is going to be evicted\\n\", new Date());\n return new ResponseEntity<>(\"Not Ready\", HttpStatus.SERVICE_UNAVAILABLE);\n }\n\n // Retorna erro HTTP 503 se a flag forced-offline tiver sido ativada\n if ( this.isOffline )\n {\n System.out.printf(\"[%s] The readiness probe has failed because the flag offline is enabled\\n\", new Date());\n return new ResponseEntity<>(\"Not Ready\", HttpStatus.SERVICE_UNAVAILABLE);\n }\n\n // Retorna status HTTP 200 OK\n return new ResponseEntity<>(\"Ready\", HttpStatus.OK);\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Response<Void>> getHealthStatusWithResponseAsync(Context context) {\n if (this.client.getHost() == null) {\n return Mono.error(\n new IllegalArgumentException(\"Parameter this.client.getHost() is required and cannot be null.\"));\n }\n return service.getHealthStatus(this.client.getHost(), this.client.getApiVersion(), context);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Response<Void> getHealthStatusWithResponse(Context context) {\n return getHealthStatusWithResponseAsync(context).block();\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> getHealthStatusAsync() {\n return getHealthStatusWithResponseAsync().flatMap((Response<Void> res) -> Mono.empty());\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> getHealthStatusAsync(Context context) {\n return getHealthStatusWithResponseAsync(context).flatMap((Response<Void> res) -> Mono.empty());\n }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public Response getIt() {\n logger.info(\"Hello World method called.\");\n\n return Response\n .status(Response.Status.OK)\n .entity(\"Hello World\")\n .build();\n }", "public Response rerouteHealthMonitorData() {\n Response response;\n try {\n response = this.createRequest(\n ProteusEndpointConstants.HEALTH_STATUS_REPORT).getResponse(\n HttpMethod.GET);\n } catch (Exception e) {\n response = Response.serverError().build();\n // if response has an exception, let's assume that OODT cannot be accessed\n // (aka it's been stopped/not started)\n }\n return response;\n }", "@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }", "@Delegate\n @Path(\"/projects/{project}/global\")\n HttpHealthCheckApi getHttpHealthCheckApi(@PathParam(\"project\") String projectName);", "@RequestMapping(value = \"/get\", method = RequestMethod.GET)\n @ResponseBody\n public ResponseVO getStatus() {\n SettingVO settingVO = settingService.getStatus();\n return ResponseVO.success(settingVO);\n }", "public interface HealthCheck {\n\n String getName();\n\n Result check();\n\n /**\n * The result of a {@link HealthCheck} being run. It can be healthy (with an optional message)\n * or unhealthy (with either an error message or a thrown exception).\n */\n class Result {\n private final boolean healthy;\n private final String message;\n private final Throwable error;\n\n public Result(boolean healthy) {\n this.healthy = healthy;\n this.message = null;\n this.error = null;\n }\n\n public Result(boolean healthy, String message) {\n this.healthy = healthy;\n this.message = message;\n this.error = null;\n }\n\n public Result(boolean healthy, String message, Throwable error) {\n this.healthy = healthy;\n this.message = message;\n this.error = error;\n }\n\n public boolean isHealthy() {\n return healthy;\n }\n\n public String getMessage() {\n return message;\n }\n\n public Throwable getError() {\n return error;\n }\n }\n}", "@GetMapping({\"/\", \"actuator/info\"})\n public ResponseEntity<String> info() {\n // Indicate the request succeeded and return the\n // application name and thread name.\n return ResponseEntity\n .ok(mApplicationContext.getId()\n + \" is alive and running on \"\n + Thread.currentThread()\n + \"\\n\");\n }", "@Test\n public void simpleGet(){\n when()\n .get(\"http:://34.223.219.142:1212/ords/hr/employees\")\n .then().statusCode(200);\n\n }", "@GET\n @Path(\"/status\")\n @Produces(MediaType.TEXT_PLAIN)\n public String status() {\n Device device = getDevice();\n try {\n StreamingSession session = transportService.getSession(device.getId());\n return \"Status device:[\" + device.getId() + \"]\" + \" session [\" + session.toString() + \"]\";\n } catch (UnknownSessionException e) {\n return e.getMessage();\n }\n }", "@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }", "public ApplicationGatewayBackendHealthServerHealth health() {\n return this.health;\n }", "@RequestMapping(value = \"/ping\", produces = \"text/plain\")\n public String ping() {\n return \"OK\";\n }", "@GET\n @Path(\"/metrics\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getStatus(@Context HttpServletRequest request) {\n try {\n BlahguaSession.ensureAdmin(request);\n return RestUtilities.make200OkResponse(SystemManager.getInstance().processMetrics(false));\n } catch (ResourceNotFoundException e) {\n return RestUtilities.make404ResourceNotFoundResponse(request, e);\n } catch (SystemErrorException e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n } catch (Exception e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n }\n }", "public String hello() throws Exception {\n\n \t\tString apiUrl = \"api/hello.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}", "@RequestLine(\"GET /status\")\n Status getNeustarNetworkStatus();", "RequestStatus getStatus();", "com.google.rpc.Status getStatus();", "com.google.rpc.Status getStatus();", "@RequestMapping(value = \"/status\", method = RequestMethod.GET)\n public String status()\n {\n return \"status\";\n }", "@Override\n protected Result check() throws Exception {\n\n try {\n mongoClient.getDB(\"system\").getStats();\n }catch(MongoClientException ex) {\n return Result.unhealthy(ex.getMessage());\n }\n\n\n return Result.healthy();\n }", "public String getStatus() {\n try {\n ClusterHealthResponse clusterHealthResponse =\n this.client.admin().cluster().health(new ClusterHealthRequest()).get();\n return clusterHealthResponse.getStatus().name();\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error when obtain cluster health\", e);\n throw new ElasticExecutionException(\"Error when trying to obtain the server status\");\n }\n }", "public String greeting() {\n ServiceInstance serviceInstance = loadBalancerClient.choose(EUREKA_AWARE_CLIENT_SERVICE_ID);\n LOGGER.info(\"Service instance picked up by load balancer: \");\n printServiceInstance(serviceInstance);\n String result = restTemplate.exchange(serviceInstance.getUri() + \"/greeting\", HttpMethod.GET, null, String.class).getBody();\n\n LOGGER.info(\"Service returns: \" + result);\n return result;\n }", "private void applicationHealthHandler(RoutingContext routingContext) {\n HttpServerResponse httpServerResponse = routingContext.response();\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(\"myRetailApplication is up and running\");\n }", "@RequestMapping(value = \"urlchecks\", method = RequestMethod.GET)\n @ResponseBody\n @ResponseStatus(HttpStatus.OK)\n public List<UrlCheck> getUrlChecks()\n {\n System.out.println(\"urlchecks\");\n return urlChecker.getUrlChecks();\n }", "com.clarifai.grpc.api.status.Status getStatus();", "public StatusCode GetStatus();", "@GET\n\t@Path(\"/status\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getStatus() {\n\t\treturn new JSONObject().put(\"currFloor\", Constants.currFloor).put(\"movingState\", Constants.movingState).toString();\n\t}", "public Status getStatus();", "private void verifyServing(int port) throws IOException {\n String response = httpGet(port, \"\");\n assertTrue(response.contains(\"Ping\"));\n assertTrue(response.contains(\"Metrics\"));\n assertTrue(response.contains(\"Healthcheck\"));\n \n response = httpGet(port, \"/ping\");\n assertEquals(\"pong\", response.trim());\n \n response = httpGet(port, \"/threads\");\n assertTrue(response.startsWith(\"main id=\"));\n \n response = httpGet(port, \"/healthcheck\");\n assertTrue(response.startsWith(\"{\\\"deadlocks\\\":{\\\"healthy\\\":true}}\"));\n \n response = httpGet(port, \"/metrics\");\n assertTrue(response.startsWith(\"{\\\"version\\\":\")); \n Iterator iter = new ObjectMapper().reader(JsonNode.class).readValues(response);\n JsonNode node = (JsonNode) iter.next();\n assertEquals(1, node.get(\"counters\").get(\"myMetrics.myCounter\").get(\"count\").asInt());\n assertEquals(2, node.get(\"meters\").get(\"morphline.logWarn.numProcessCalls\").get(\"count\").asInt());\n assertEquals(3, node.get(\"meters\").get(\"morphline.logDebug.numProcessCalls\").get(\"count\").asInt()); \n assertTrue(node.get(\"gauges\").get(\"jvm.memory.heap.used\").get(\"value\").asInt() > 0);\n \n assertFalse(iter.hasNext()); \n }", "@GetMapping(PRODUCT_HEALTH_CHECK)\n public String index() {\n return serviceName + \", system time: \" + System.currentTimeMillis();\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "@Override\n\tpublic Health getHealthInfo(String id) {\n\t\t RestTemplate restTemplate = new RestTemplate();\n\t\t \n\t\t Health healthInfo = restTemplate.getForObject(BASE_URL + HEALTH_STATUS_URL, Health.class, id);\n\t\t logger.debug(\"Employee Info :\" + healthInfo);\n\t\treturn healthInfo;\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Ingress> readIngressStatus(\n @Path(\"name\") String name, \n @QueryMap ReadIngressStatus queryParameters);", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Ingress> readIngressStatus(\n @Path(\"name\") String name);", "@GET\r\n\t@Produces(MediaType.TEXT_PLAIN)\r\n\tpublic String sayHello() {\r\n\t\treturn \"Hello Jersey\";\r\n\t}", "public Map<String, Object> getStatus() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/_status\"));\n return mapper.readValue(httpResponse, new TypeReference<Map<String, Object>>() {\n });\n }", "@RequestMapping(value = \"/test\", method = RequestMethod.GET)\n\tpublic @ResponseBody ResponseEntity test() throws Exception {\n\t\tAppResponse appResponse = new AppResponse();\n\t\tappResponse.setMessage(AppConstants.CONNECTION_STATUS);\n\t\treturn new ResponseEntity<>(appResponse, HttpStatus.OK);\n\t}", "@GET\n @Produces(\"text/html\")\n public Response Hello() {\n return Response.status(Response.Status.OK).entity(\"This is a restaurant api service\").build();\n }", "public Response get(String path) throws IOException {\n return get(cluster, path);\n }", "@Test\n void getTest() {\n URI uri = URI.create(endBody + \"/get\");\n\n // get the response\n HttpResponse<String> response = HttpMethods.get(uri);\n\n // check if it received OK\n assertEquals(200, response.statusCode());\n }", "private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }", "@GET\n @StatusCodes ({\n @ResponseCode ( code = 200, condition = \"Upon a successful read.\"),\n @ResponseCode( code = 204, condition = \"Upon a successful query with no results.\"),\n @ResponseCode( code = 404, condition = \"The specified entity has been moved, deleted, or otherwise not found.\")\n })\n Response get();", "@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}", "@Test\n public void canReturnHtml() {\n given()\n .port(7070)\n .get(\"/\")\n .then()\n .body(containsString(\"Conveyal Analysis\"));\n }", "default void checkIn(String name, HealthStatus status) {\n }", "@GET\n @Path (\"{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getApplication(@Context final HttpServletRequest httpServletRequest, @PathParam(\"id\") String appId, @QueryParam(\"serviceId\") String serviceId, @QueryParam(\"checkEnablement\") String checkEnablement) {\n try {\n \t\n \t\tApplicationManager appManager = ApplicationManagerImpl.getInstance();\n\t\t\tApplication app = appManager.getApplication(appId);\n\t\t\t\n\t\t\t\n\t\t\tMap<String, Object> json = new HashMap<String, Object>();\n\t\t\tString appType = null;\n\t\t\tif (app.getAppType() != null)\n\t\t\t\tappType = app.getAppType();\n\t\t\tif (appType != null)\n\t\t\t\tjson.put(\"type\", appType);\n\t\t\tjson.put(\"policyId\", app.getPolicyId());\n\t\t\tjson.put(\"state\", app.getPolicyState());\n\t\t\t\n\t\t\tMetricConfigManager configService = MetricConfigManager.getInstance();\n Map<String, Object> configMap = configService.loadDefaultConfig(appType, appId);\n json.put(\"config\", configMap);\n\t\t\treturn RestApiResponseHandler.getResponseOk(objectMapper.writeValueAsString(json));\n\t\t} catch (DataStoreException e) {\n\n return RestApiResponseHandler.getResponseError(MESSAGE_KEY.RestResponseErrorMsg_database_error, e, httpServletRequest.getLocale());\n\t\t} catch (CloudException e) {\n\t\t\treturn RestApiResponseHandler.getResponseError(MESSAGE_KEY.RestResponseErrorMsg_cloud_error, e, httpServletRequest.getLocale());\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn Response.status(Status.INTERNAL_SERVER_ERROR).build();\n\t\t}\n }", "public GetStatusTResponse getStatus(String path, GetStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;", "@GetMapping(\"/status\")\n boolean getSetupStatus() {\n return isSetup();\n }", "public boolean getResponseStatus();", "@GET\n\t@Path(\"/test\")\n\t@Produces(\"text/plain\")\n\tpublic String resourceTest(){\n\t\treturn OpenstackNetProxyConstants.MESSAGE_TEST;\n\t}", "@GetMapping(\"ping\")\n public String ping() {\n return \"pong\";\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/clusterversions/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<ClusterVersion> readClusterVersionStatus(\n @Path(\"name\") String name, \n @QueryMap ReadClusterVersionStatus queryParameters);", "@Test(enabled=true)\npublic void getRequest() {\n\t\tString url = \"https://reqres.in/api/users?page=2\";\n\t\t\n\t\t//create an object of response class\n\t\t\n\t\t//Restassured will send get request to the url and store response in response object\n\t\tResponse response = RestAssured.get(url);\n\t\t\n\t\t//We have to put assertion in response code and response data\n\t\tAssert.assertEquals(response.getStatusCode(), 200 , \"Response code Mismatch\");\n\t\t\n\t\tint total_pages = response.jsonPath().get(\"total_pages\");\n\t\tAssert.assertEquals(total_pages, 2 , \"Total Pages value Mismatch\");\n \n}", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "public ServiceInfo getServiceStatus(String url) throws IOException {\n Request request = new Request.Builder().url(url).build();\n Response response = client.newCall(request).execute();\n serviceInfo = new ServiceInfo(response.code(),\n response.message(),response.receivedResponseAtMillis());\n return serviceInfo;\n }", "@SuppressWarnings(\"unchecked\")\n\t@GET\n @Path(\"get/{hash}\")\n @Produces(\"application/json\")\n public Response getIt(@PathParam(\"hash\") String curHash) {\n \t\n \tJSONObject resp = new JSONObject();\n \t\n \tOnlineStatus on = OnlineStatus.getInstance(); \n \t\n \t// Find SA\n \tint saID = SADAO.hashToId(curHash);\n \t\n \tif (saID == 0) {\n \t\tresp.put(\"Error\", \"Hash not in database\");\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n \t\n \t//if SA is set for exit\n \tif(on.isForExit(curHash)){\n \t\tresp.put(\"Signal\" , \"Kill\");\n \t\ton.exited(curHash);\n \t\t\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n \t\n \t// Update SAs Online Status\n \ton.update(curHash);\n \t\n \t// Find jobs for SA\n \tLinkedList<Job> jobsToSendToSa = JobDAO.getAllSAJobs(saID);\n \t\n \tif(jobsToSendToSa.size() > 0){\n \t\tSystem.out.println(\"Sending to SA \"+curHash+\" the following job(s) :\");\n \t}\n \tfor (Job j : jobsToSendToSa) {\n \t\tj.print();\n \t}\n \t\n \t// Create JSON and Sent\n \tObjectMapper mapper = new ObjectMapper();\n \t\n \ttry{\n \t\t\n \t\tString jsonInString = mapper.writeValueAsString(jobsToSendToSa);\n \t\t\n \t\treturn Response.status(200).entity(jsonInString).build();\n \t\n \t}catch (JsonProcessingException ex){\n \t\t\n \t\tSystem.out.println(ex.getMessage());\n \t\t\n \t\tresp.put(\"Error\", ex.getMessage());\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n }", "public ResponseEntity<?> getElasticsearchClustersHealth() {\n try {\n ClusterHealthResponse response = client.cluster().health(new ClusterHealthRequest(), RequestOptions.DEFAULT);\n return new ResponseEntity<>(response, HttpStatus.OK);\n } catch (Exception e) {\n log.error(\"Error encountered getElasticsearchDetails\", e);\n return new ResponseEntity<>(e, HttpStatus.INTERNAL_SERVER_ERROR);\n }\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/dnses/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<DNS> readDNSStatus(\n @Path(\"name\") String name);", "@GetMapping(\n value = \"/status\",\n produces = MediaType.APPLICATION_JSON\n )\n public ResponseEntity<LearnerStatus> getStatus(@PathVariable(\"projectId\") Long projectId) {\n final User user = authContext.getUser();\n LOGGER.traceEntry(\"getStatus() for user {}.\", user);\n final LearnerStatus status = learnerService.getStatus(projectId);\n LOGGER.traceExit(status);\n return ResponseEntity.ok(status);\n }", "@Test\n\tpublic void readSystemPlayerStateUsingGETTest() throws ApiException {\n\t\tString gameId = \"mockGameId\";\n\t\tString playerId = \"mockPlayerId\";\n\t\tString conceptName = \"mockConcept\";\n\t\tApiClient client = new ApiClient();\n\t\tclient.setBasePath(\"http://localhost:\" + PORT);\n\t\tConfiguration.setDefaultApiClient(client);\n\n\t\tPlayerControllerApi api = new PlayerControllerApi();\n\n\t\tString mResponse = \"[\\\"mockChallenger\\\"]\";\n\n\t\tstubFor(get(\n\t\t\t\turlEqualTo(\"/data/game/\" + gameId + \"/player/\" + playerId + \"/challengers?conceptName=\" + conceptName))\n\t\t\t\t\t\t.willReturn(aResponse().withHeader(\"Content-Type\", \"application/json\").withBody(mResponse)));\n\n\t\tList<String> response = api.readSystemPlayerStateUsingGET(gameId, playerId, conceptName);\n\n\t\tassertEquals(response.contains(\"mockChallenger\"), true);\n\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET, produces=APPLICATION_HTML)\r\n public @ResponseBody String status() {\r\n return \"Default Status Message\";\r\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/dnses/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<DNS> readDNSStatus(\n @Path(\"name\") String name, \n @QueryMap ReadDNSStatus queryParameters);", "public String GET(String name){\n return \"OK \" + this.clientData.get(name);\n }", "public String get(String path)\n {\n\n Client client = Client.create();\n\n WebResource webResource = client.resource(getHostAddress() + \":\" + getPort() + \"/api/\" + path);\n ClientResponse response = webResource.type(\"application/json\").get(ClientResponse.class);\n\n String message = response.getEntity(String.class);\n\n return message;\n }" ]
[ "0.7694793", "0.7684962", "0.74534", "0.6929321", "0.69250244", "0.6726437", "0.66739273", "0.6632833", "0.65504026", "0.6482907", "0.6453961", "0.6334432", "0.6278346", "0.62398183", "0.6168451", "0.610069", "0.6081616", "0.6073755", "0.5999887", "0.5978036", "0.5966157", "0.5963588", "0.5958388", "0.5909014", "0.58875716", "0.5822877", "0.5818739", "0.5725661", "0.5613436", "0.5609109", "0.5577487", "0.5562587", "0.54948246", "0.54827994", "0.54742986", "0.5428227", "0.5417282", "0.54138935", "0.5413351", "0.53981537", "0.5395488", "0.5391093", "0.5373794", "0.5373794", "0.53677773", "0.53373593", "0.5335467", "0.53280145", "0.53080255", "0.53035444", "0.529563", "0.5283619", "0.52813417", "0.5274563", "0.52666533", "0.52634645", "0.52391106", "0.5237302", "0.5235302", "0.5233999", "0.5227181", "0.52014214", "0.51805085", "0.5173045", "0.51514304", "0.5148289", "0.5138115", "0.51352966", "0.51337487", "0.51294106", "0.5108914", "0.51004064", "0.5095789", "0.50950766", "0.50946933", "0.5083048", "0.5081917", "0.50764763", "0.50744945", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.50627315", "0.5057738", "0.5055782", "0.5053356", "0.50485736", "0.5039885", "0.50343466", "0.5033757", "0.5024764", "0.50176424", "0.50170493" ]
0.7756477
0
userAccount user =this.accountRepo.findById(email); System.out.println("Email:"+account.getEmail()); System.out.println("user:"+account.getUsername()); System.out.println("pass:"+account.getPassword());
@PostMapping(path = "userLogind/") public ResponseEntity<passConfirmation> getUserByEmail(@RequestBody userAccount account){ String passwordByUser = accountRepo.getPasswordByUsername(account.getUsername()); // System.out.println("****************************************"); // System.out.println("pass:"+account.getPassword()); // System.out.println("passfromdb:"+ passwordByEmail); if (account.getPassword().toString().equals(passwordByUser)){ passConfirmation confirmationOK = new passConfirmation("Confirmed"); return ResponseEntity.ok().body(confirmationOK); }else{ passConfirmation confirmationDenied = new passConfirmation("Denied"); return ResponseEntity.ok().body(confirmationDenied); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account findByEmail(String email);", "User find(String email);", "Account findById(int id);", "User findUserByEmail(String email) throws Exception;", "Optional<Account> findByEmail(@Param(\"email\") String email);", "@Test\n void retrieveByEmailPasswordTest() {\n Admin retrieved = adminJpa.retrieveByEmailPassword(\"[email protected]\", \"Ciao1234.\");\n assertEquals(\"[email protected]\", retrieved.getEmail());\n }", "public User findByEmail(String email);", "public User findByEmail(String email);", "public User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User find(String username, String password);", "User findUserByEmail(String userEmail);", "public User getUser(String email);", "Optional<User> findByEmail(String email);", "Optional<User> findByEmail(String email);", "public UserDetailsEntity findByPwdAndUserEmail(String pwd,String userEmail);", "UserAccount getUserAccountById(long id);", "UserEntity findByEmail(String email);", "Company findCompanyByEmailAndPassword(String email, String password);", "@Test\n public void createAndRetrieveUser() {\n new User(\"[email protected]\", \"secret\", \"Bob\").save();\n\n // Retrieve the user with bob username\n User bob = User.find(\"byEmail\", \"[email protected]\").first();\n\n // Test \n assertNotNull(bob);\n assertEquals(\"Bob\", bob.username);\n }", "UserDTO findUserByEmail(String email);", "public User getUserByEmail(String email);", "public User getUserByEmail(String email);", "public User readByEmail(String email) throws DaoException;", "@Query(\"SELECT id FROM Users t WHERE t.email =:email AND t.password =:password\")\n @Transactional(readOnly = true)\n Integer viewUser(@Param(\"email\") String email, @Param(\"password\") String password);", "public List<Account> findByUserDetails(UserDetails userDetails);", "User findByUsername(String username, String password) throws Exception;", "@Repository\npublic interface AccountRepo extends JpaRepository<Account, Long> {\n Account findByEmail(String email);\n\n Account findByUsername(String username);\n\n}", "public User getUser(String emailId);", "User findByCredential(Credential credential);", "public User findByEmail(String email){\n return userRepository.findByEmail(email);\n }", "UserDTO findUserByUseridAndPassword ( String userid , String password);", "User getUserByEmail(String email);", "@Repository\npublic interface AccountRepository extends CrudRepository<Account, Long> {\n Account findByUsernameAndPassword(String username, String password);\n Account findByUsername(String username);\n}", "public User findById(Long id){\n return userRepository.findOne(id);\n }", "User findUserById(int id);", "public interface UserRepository extends CrudRepository<User,Integer> {\n\n User findByAccount(String account);\n}", "Account findByUsername(String username);", "public User findUserByEmail(final String email);", "User findUserById(Long id) throws Exception;", "Optional<User> findOneByEmail(String email);", "@Override\n public User getUserByMailAndPassword(String mail, String password) { String hql = \"SELECT u FROM User u WHERE u.f_mail=:mail and u.f_password=:password\";\n// Query query = getSession().createQuery(hql)\n// .setParameter(\"mail\", mail)\n// .setParameter(\"password\", password);\n// return (User) query.uniqueResult();\n//\n Criteria criteria = getSession().createCriteria(User.class)\n .add(Restrictions.eq(\"mail\", mail))\n .add(Restrictions.eq(\"password\", password));\n if (criteria.list().size() > 0) {\n return (User) criteria.uniqueResult();\n } else {\n return null;\n }\n }", "public User findUserById(int id);", "public User retrieveUserByEmail(String email) throws ApplicationException;", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "@Override\r\n\tpublic AccountDTO getAccount(String email) {\n\t\treturn accountDao.getAccount(email);\r\n\t}", "@Test\n\tpublic void testFindUserById() throws Exception {\n\t\tSqlSession sqlSession = factory.openSession();\n\t\tUser user = sqlSession.selectOne(\"com.wistron.meal.user.findUserById\",3);\n\t\tSystem.out.println(user);\n\t\tsqlSession.close();\n\t\t\n\t}", "public User get(String emailID);", "@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);", "public Owner getUserByEmailAndPassword(String email, String password) {\r\n Owner user = null;\r\n\r\n try {\r\n\r\n String query = \"select * from Owner where email =? and password=?\";\r\n PreparedStatement pstmt = con.prepareStatement(query);\r\n pstmt.setString(1, email);\r\n pstmt.setString(2, password);\r\n\r\n ResultSet set = pstmt.executeQuery();\r\n\r\n if (set.next()) {\r\n user = new Owner();\r\n\r\n// data from db\r\n String name = set.getString(\"name\");\r\n// set to user object\r\n user.setName(name);\r\n\r\n user.setId(set.getInt(\"id\"));\r\n user.setEmail(set.getString(\"email\"));\r\n user.setPassword(set.getString(\"password\"));\r\n \r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return user;\r\n }", "ServiceUserEntity getUserByEmail(String email);", "public interface UserRepository extends JpaRepository<User , Long>{\n\n User findByEmail(final String email);\n}", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "AccountModel findById(String accountNumber) throws AccountException;", "User getUserByLoginAndPassword(String login, String password) throws DaoException;", "public User getUser(String userName, String password);", "@GetMapping(\"/{id}\")\n public Account account(@PathVariable(\"id\") Long id){\n return accountRepository.findOne(id);\n }", "public Admin getAdminByEmailAndPassword(String email, String password){\r\n \r\n Admin admin=null;\r\n \r\n try {\r\n \r\n String query=\"from Admin where adminEmail =:e and adminPassword =:p\"; \r\n \r\n Session session=this.factory.openSession();\r\n Query q=session.createQuery(query);\r\n q.setParameter(\"e\", email);\r\n q.setParameter(\"p\", password);\r\n admin=(Admin)q.uniqueResult();\r\n session.close();\r\n \r\n } catch (HibernateException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n \r\n \r\n \r\n return admin;\r\n \r\n \r\n }", "@Test\n public void testFindUserById() {\n System.out.println(\"findUserById\");\n long userId = testUsers.get(0).getId();\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n User expResult = testUsers.get(0);\n User result = instance.findUserById(userId);\n assertEquals(expResult.getEmail(), result.getEmail());\n }", "Account getAccount();", "@Query(\"select u from User u where u.email = :email\")\n User getUserByEmail(@Param(\"email\") String email);", "public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }", "@Test\n public void selectById(){\n User user=iUserDao.selectById(\"158271202\");\n System.out.println(user.toString());\n }", "User findOneByMail(String mail);", "@PostMapping(\"/addAcc\")\n public userAccount setUserAccount(@RequestBody userAccount account) {\n// System.out.println(\"Email:\"+account.getEmail());\n// System.out.println(\"username:\"+account.getUsername());\n// System.out.println(\"pass:\"+account.getPassword());\n return this.accountRepo.save(account);\n// return null;\n }", "@Repository\npublic interface UserRepository extends JpaRepository<User,Long>{\n public User findByAccountId(String accountId);\n}", "User findUserByName(String name);", "public String getUserEmail(String nick) throws DAOException;", "User getUserByEmail(final String email);", "Account getAccount(int id);", "public User findById(Long id);", "public AppUser findByEmail(String email);", "public UsersModel getUserById(String userEmail);", "public interface AccountRepo extends JpaRepository<Account,Integer> {\n\n List<Account>findAccountByUser(User user);\n}", "Optional<Account> findById(Long id);", "public interface UserRepository extends JpaRepository<User, String> {\n\n User findByEmail(String email);\n\n}", "public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }", "public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }", "@Repository\npublic interface UserRepository extends BaseRepository<User,Long> {\n\n User findByAccount(String account);\n}", "public interface UserActionRepository extends CrudRepository<UserEntity, Long> {\r\n List<UserEntity> findByEmailAndPassword(String username, String password);\r\n}", "User findById(long id);", "User getUserById(int id);", "public User retrieveUserById(EntityManager entityManager,Integer accountId) {\n User user = entityManager.find(User.class, accountId);\n return user;\n }", "User getUser();", "User getUser();", "User findById(Long id);", "@Repository\npublic interface UserRepository extends CrudRepository<User, Long> {\n User findByEmail(String email);\n}", "@Test\n void findCustomerByName() {\n String expectedPassword = \"1\";\n String actualPassword = customerRepository.findCustomerByName(\"test1\").getPassword();\n assertEquals(expectedPassword,actualPassword);\n }", "public UserDTO login(String mail,String password){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlLogin);\r\n preSta.setString(1, mail);\r\n preSta.setString(2, password);\r\n ResultSet rs = preSta.executeQuery();\r\n if(rs.next()){\r\n UserDTO user = new UserDTO();\r\n user.setEmail(rs.getString(\"Email\"));\r\n user.setPassword(rs.getString(\"Pass\"));\r\n user.setRole(rs.getInt(\"RoleId\"));\r\n user.setUserId(rs.getInt(\"UserId\"));\r\n return user;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n error =\"thong tin dang nhap sai\";\r\n return null;\r\n }", "User findUserByLogin(String login);", "public interface UserDao extends JpaRepository<UserEntity,String> {\n\n default UserEntity findByAccount(String account)throws Exception{\n UserEntity exp=new UserEntity();\n exp.setAccount(account);\n return this.findOne(Example.of(exp)).orElse(null);\n }\n}", "@Override\n\tpublic User logIn(String email,String password){\n\t\tUser user = userRepository.logIn(email, password);\n\t\tif(user==null)\n\t\t\tthrow new BookException(HttpStatus.UNAUTHORIZED,\"Invalid email and password\");\n\t\treturn user;\n\t}", "User find(long id);", "@Transactional\r\n\t\t\t@Override\r\n\t\t\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\r\n\t\t\t\tco.simplon.users.User account = service.findByEmail(email);\r\n\t\t\t\tif(account != null) {\r\n\t\t\t\t\treturn new User2(account.getEmail(), account.getPassword(), true, true, true, true,\r\n\t\t\t\t\t\t\tgetAuthorities(account.getRole()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new UsernameNotFoundException (\"Impossible de trouver le compte :\"+ email +\".\");\n\t\t\t\t}\r\n\t\t\t}", "@Transactional(readOnly = true)\npublic interface AccountRepository extends JpaRepository<Account, Long> {\n\n Optional<Account> findByEmail(String email);\n}" ]
[ "0.7333157", "0.72940886", "0.7258748", "0.71405584", "0.71036375", "0.70376426", "0.7033778", "0.7033778", "0.7033778", "0.7030427", "0.7030427", "0.7030427", "0.7030427", "0.7030427", "0.7030427", "0.6972465", "0.6930718", "0.69301975", "0.68890494", "0.68890494", "0.687075", "0.68594635", "0.68563545", "0.6853666", "0.68367803", "0.6833203", "0.6808023", "0.6808023", "0.6805921", "0.68006855", "0.6784489", "0.67797226", "0.67704946", "0.6742481", "0.673267", "0.6729571", "0.67240113", "0.6721576", "0.67194235", "0.67147183", "0.67036736", "0.67019117", "0.6696345", "0.6667417", "0.6658123", "0.66451615", "0.6643245", "0.6642929", "0.6639082", "0.66334623", "0.66311973", "0.6630911", "0.66306716", "0.66298443", "0.66272336", "0.66178316", "0.6600699", "0.6598511", "0.6593842", "0.6586685", "0.6581374", "0.6572569", "0.6569209", "0.6560108", "0.65541345", "0.65411437", "0.65268576", "0.6519503", "0.64927155", "0.64923704", "0.6486565", "0.64673513", "0.646502", "0.64615965", "0.64591354", "0.6456063", "0.64488024", "0.6445625", "0.6438693", "0.64385885", "0.6437936", "0.6437768", "0.6437768", "0.6425944", "0.6418086", "0.64172006", "0.6415019", "0.64039654", "0.6390293", "0.6390293", "0.6389803", "0.6385442", "0.63839245", "0.63808143", "0.63689506", "0.63667417", "0.63540703", "0.634583", "0.63438624", "0.63401043" ]
0.66701704
43
get tele no by user
@PostMapping(path = "userTele/") public ResponseEntity<passModificationComfirmation> getTeleByuser(@RequestBody userAccount account){ String userTele = accountDetailsRepo.getTelefromUsername(account.getUsername()); if (!userTele.isEmpty()){ passModificationComfirmation comfirmationOK = new passModificationComfirmation(userTele); return ResponseEntity.ok().body(comfirmationOK); }else { passModificationComfirmation confirmationDenied = new passModificationComfirmation("Denied"); return ResponseEntity.ok().body(confirmationDenied); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTelNum() throws Exception \n\t{\n\t\tString tel=\"\";\n\t\ttry(Connection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/usersdb?useTimezone=true&serverTimezone=UTC\", \"root\", \"123\");\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"SELECT telephone_number FROM usersdb.telephone_numbers WHERE clients_username = ?;\"))\n\t\t{\n\t\t\tpreparedStatement.setString(1,username);\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(result.next()) \n\t\t\t{\n\t\t\t\ttel = result.getString(\"telephone_number\");\n\t\t\t\ttelnum = result.getString(\"telephone_number\");\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn tel;\n\t}", "BigInteger getTelefone();", "public String getUserno() {\r\n return userno;\r\n }", "java.lang.String getTelefon();", "public String getTelNo()\r\n\t{\r\n\t\treturn this.telNo;\r\n\t}", "public String getTelNo() {\n return telNo;\n }", "public String getTelNo() {\n return telNo;\n }", "public Integer getTel() {\n return tel;\n }", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public String getUsernumber() {\n return usernumber;\n }", "public java.lang.String getNumeroTelefono() {\n\t\treturn _telefonoSolicitudProducto.getNumeroTelefono();\n\t}", "public String getTelefonnummer() {\n return telefonnummer;\n }", "public int getPhoneNuber() {\r\n return phoneNuber;\r\n }", "public static int getNumberLoggedUser() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_LOGGED_USER_NUMBER;\n\t\t\trp.parameters = new Object[] {};\n\t\t\tReceiveContent rpp = sendReceive(rp);\n\t\t\tint logged = (int) rpp.parameters[0];\n\t\t\treturn logged;\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn 0;\n\t}", "public long getTelefono() {\r\n return telefono;\r\n }", "public String getUserTel() {\n return userTel;\n }", "public String getUserTel() {\n return userTel;\n }", "java.lang.String getUserPhone();", "public String getTelefone() {\n\t\treturn telefone;\n\t}", "public Long getHome_phone();", "public String getTel() {\r\n return tel;\r\n }", "public String getTelefone() {\n return telefone;\n }", "public static long getNumeroTentativiLogin(String email) {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.parameters = new Object[] { email };\n\t\trp.type = RequestType.GET_LOGIN_ATTEMPTS_NUMBER;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tlong getNumeroTentativiLogin = (long) rpp.parameters[0];\n\t\treturn getNumeroTentativiLogin;\n\t}", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "public java.lang.String getTEL_NUMBER()\n {\n \n return __TEL_NUMBER;\n }", "public java.lang.String getTelePhone() {\r\n return telePhone;\r\n }", "public String getAccountNo();", "public String getUserNum() {\n return userNum;\n }", "public String getUserNum() {\n return userNum;\n }", "public String getUserNum() {\n return userNum;\n }", "public String getUserNum() {\n return userNum;\n }", "public static String getAccountNumber(String user){\n return \"select u_accountnum from users where u_name = '\" + user + \"'\";\n }", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "int getUnapprovedUserNumber();", "private int getNumero() {\n\t\treturn numero;\n\t}", "public String getTelefono() {\r\n\t\treturn telefono;\r\n\t}", "public String getUsrnm() throws Exception\n\t{\n\t\tString usrnm=\"null\";\n\t\ttry(Connection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/usersdb?useTimezone=true&serverTimezone=UTC\", \"root\", \"123\");\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"SELECT clients_username FROM usersdb.telephone_numbers;\"))\n\t\t{\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(result.next()) \n\t\t\t{\n\t\t\t\tif(username.equals(result.getString(\"clients_username\"))) \n\t\t\t\t{\n\t\t\t\t\tusrnm = result.getString(\"clients_username\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn usrnm;\n\t}", "public String getUserTelephone() {\n return userTelephone;\n }", "int getPhone();", "int getClientMsgNo();", "public Long getMobile_phone();", "public int getUserNumber() throws AdminPersistenceException {\n return getCount(\"ST_User\", \"id\", \"accessLevel <> ?\", \"R\");\n }", "public java.lang.String getTelefon() {\n java.lang.Object ref = telefon_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n telefon_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "java.lang.String getAccountNumber();", "public java.lang.String getNum_ant() throws java.rmi.RemoteException;", "public String getNumUserid() {\n return numUserid;\n }", "public java.lang.String getTelefon() {\n java.lang.Object ref = telefon_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n telefon_ = s;\n return s;\n }\n }", "public static int provider(int userId, int numTelecoms) {\n\t\treturn userId % numTelecoms;\n\t}", "public synchronized String getTelephoneNumber()\r\n {\r\n return telephoneNumber;\r\n }", "public String getTelefonoTI() {\n return this.telefonoTI;\n }", "@Override\r\n\tpublic int getSuperNumber(String username) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tint ret = 0;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetSuperNumber);\r\n\t\t\tps.setString(1, username);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tret = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String getMailNo() {\n return mailNo;\n }", "int getNumberOfRegsUser(long idUser);", "public String getCustIdNbr()\n\t{\n\t\treturn mCustIdNbr;\t\n\t}", "public java.lang.Long getNumTelefonoProductor() {\n\t\treturn numTelefonoProductor;\n\t}", "public int getNumero() {\n return numero;\n }", "public java.lang.String getTel() {\r\n return localTel;\r\n }", "protected void getRecipientNumber(TargetForm aForm, HttpServletRequest req) {\n\t\tTargetDao targetDao = (TargetDao) getBean(\"TargetDao\");\n\t\tTarget target = (Target) getBean(\"Target\");\n\t\tRecipientDao recipientDao = (RecipientDao) getBean(\"RecipientDao\");\n\t\t\n\t\ttarget = targetDao.getTarget(aForm.getTargetID(), aForm.getCompanyID(req));\n\t\tint numOfRecipients = recipientDao.sumOfRecipients(aForm.getCompanyID(req), target.getTargetSQL());\n\t\t\n\t\taForm.setNumOfRecipients(numOfRecipients);\n\t\t\n\t}", "public void getNumberOnBlacklist() {\n\t\t\n\t\tString[] projection = new String[] {\n\t\t\t\tContactsContract.Contacts.DISPLAY_NAME,\n\t\t\t\tContactsContract.Data.SEND_TO_VOICEMAIL,\n\t\t\t\tContactsContract.Data._ID\n\t\t};\n\t\tString where = ContactsContract.Contacts.SEND_TO_VOICEMAIL;\n\t\tString sortOrder = ContactsContract.Contacts.DISPLAY_NAME + \" ASC\";\n\t\tContentResolver cr = getContentResolver();\n\t\tCursor c = cr.query(ContactsContract.Contacts.CONTENT_URI, projection, where, null, sortOrder);\n\t\t\n\t\tnumberOnBlacklist = c.getCount();\n\t}", "public int getNumero() { return this.numero; }", "public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }", "public void tocarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" está tocando!\");\n notificarTodos();\n }", "public int getAccountNo()\r\n\t{\r\n\t\t\r\n\t\treturn accountNo;\r\n\t\t\r\n\t}", "@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }", "int getNumberPaymentReceipt();", "@Override\n\tpublic String getUserID(String mobile) throws Exception {\n\t\treturn epuserMapper.getUserID(mobile);\n\t}", "public void setTelefono(long value) {\r\n this.telefono = value;\r\n }", "private String getPrimaryNumber(long _id) {\n String primaryNumber = null;\n try {\n Cursor cursor = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = \"+ _id, // We need to add more selection for phone type\n null,\n null);\n if(cursor != null) {\n while(cursor.moveToNext()){\n switch(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))){\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_OTHER :\n }\n if(primaryNumber != null)\n break;\n }\n }\n } catch (Exception e) {\n Log.i(\"test\", \"Exception \" + e.toString());\n } finally {\n if(cursor != null) {\n cursor.deactivate();\n cursor.close();\n }\n }\n return primaryNumber;\n }", "public String Phone() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phone);\r\n\t\t\t\tStr_phoneno = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_phoneno;\r\n\t\t\t\r\n\t\t}", "public String getMyPhoneNumber() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getLine1Number();\n }", "long getFrom();", "public java.lang.String getNossoNumero() {\n return nossoNumero;\n }", "public static int getNumberLoggedUserByCorso(long idCorso) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_LOGGED_NUMBER_BY_CORSO;\n\t\t\trp.parameters = new Object[] { idCorso };\n\t\t\tReceiveContent rpp = sendReceive(rp);\n\t\t\tint logged = (int) rpp.parameters[0];\n\t\t\treturn logged;\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn 0;\n\t}", "public String getNumber(String name){\r\n return theContacts.get(name).getNumber();\r\n }", "public String serchNum(User user) {\n String msg = null;\r\n List<String> idShow = new ArrayList<>();\r\n\r\n // データベースへ接続\r\n try (Connection con = getConnection()) {\r\n\r\n // SELECT文を準備\r\n String sql = \"SELECT * FROM USER ID\";\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n\r\n // 実行\r\n ResultSet answer = ps.executeQuery();\r\n\r\n //SQLで取得した全IDをリストに入れる\r\n while (answer.next()) {\r\n idShow.add(answer.getString(1));\r\n }\r\n\r\n //取得したリストと入力されたIDを比較\r\n if (idShow.contains(user.getId())) {\r\n\r\n //同じIDがあればエラーメッセージを返す\r\n msg = \"error!\";\r\n }\r\n\r\n } catch (SQLException e) {\r\n\r\n //失敗した時の処理\r\n e.printStackTrace();\r\n return null;\r\n }\r\n\r\n //結果を返す\r\n return msg;\r\n\r\n }", "public String getReceivedSerialNumber() ;", "int obtenerNumeroMovimiento();", "@Override\n\t@Field(offset=41, length=9, paddingChar='0', align=Align.RIGHT)\n\tpublic String getNossoNumero() {\n\t\treturn super.getNossoNumero();\n\t}", "public String getNumeroId() {\r\n return NumeroId;\r\n }", "public int getPatron_num()\n\t{\n\t\treturn cust_num;\n\t}", "public java.lang.String getTelphone () {\r\n\t\treturn telphone;\r\n\t}", "String getPhone(int type);", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}", "public long getPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// getter method initialized\t\t\t\t \r\n Scanner scanner = new Scanner(System.in);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// Initialize the scanner to get input from User\r\n System.out.print(\"Enter Phone Number : \");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // This will print the argument at the end of the line\r\n phoneNumber = scanner.nextLong();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Read long input from the User\r\n String inputPhoneNumber = Long.toString(phoneNumber);\t\t\t\t\t\t\t\t\t\t // convert Long to string.\r\n Pattern pattern = Pattern.compile(\"\\\\d{10}\");\t\t\t\t\t\t\t\t\t\t\t // The Pattern class represents a compiled regular expression.\r\n Matcher matcher = pattern.matcher(inputPhoneNumber );\t\t\t\t\t\t\t\t\t\t\t\t\t // The resulting Pattern object is used to obtain a Matcher instance.\r\n if (matcher.matches());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // if loop ..to check input from the User\r\n else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// else loop started\r\n System.out.println(\"Invalid Phone Number - Please enter the Phone number again\");}\t\t \t// This will print the argument at the end of the line\t\r\n return phoneNumber;}", "public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }", "public static int provider(int userId, int numTelecoms) {\n\t\t//return userId % numTelecoms; // Old method\n\t\tint lastDigits = userId % 100;\n\t\tfor (int i = 0; i < numTelecoms; i++) {\n\t\t\tif (lastDigits < TELECOM_PERCENT_CUTOFFS[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn numTelecoms - 1;\n\t}", "public int getNumber(String comm){\n try{\n return comando.get(comm);\n } catch(Exception e){\n return -1;\n }\n }", "@Override\r\n\tpublic int getEnterNo() {\n\t\treturn session.selectOne(\"enter.getEnterNo\");\r\n\t}", "public int get_ultimo_idUsuario() throws RemoteException {\n int idu=0;\n try {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n String s, p=\"\";\n String texto[]=new String[11];\n while((s = entrada.readLine()) != null) p=s;\n\n if(p!=null && p.compareTo(\"\")!=0) {\n texto=p.split(\" \");\n if(texto[0].compareTo(\"\")!=0)\n idu=Integer.parseInt(texto[0]);\n else\n idu=0;\n }\n\n entrada.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n }\n return idu;\n }", "public String getTelphone() {\n return telphone;\n }" ]
[ "0.6746222", "0.6630824", "0.65662646", "0.65292895", "0.637986", "0.637396", "0.63038784", "0.62632585", "0.62304264", "0.6218372", "0.61751866", "0.6152361", "0.6142216", "0.61191314", "0.6115544", "0.61034507", "0.61034507", "0.5950122", "0.5940069", "0.5935085", "0.59298825", "0.5883726", "0.5857806", "0.5850608", "0.5850608", "0.5850608", "0.5850608", "0.5850608", "0.5850608", "0.5850608", "0.5850608", "0.5850608", "0.5844473", "0.5786316", "0.57768977", "0.57554835", "0.5743271", "0.5743271", "0.5743271", "0.5743271", "0.57415783", "0.5714856", "0.56899875", "0.5688529", "0.56860304", "0.56696177", "0.56682146", "0.56656146", "0.56649107", "0.56633407", "0.566223", "0.5641594", "0.56364554", "0.56271005", "0.5608012", "0.5604118", "0.56008697", "0.5583895", "0.55786985", "0.5567525", "0.5562769", "0.55503964", "0.55471706", "0.55353755", "0.5515312", "0.5498795", "0.54912794", "0.54908234", "0.54897404", "0.5485337", "0.5475205", "0.5468435", "0.54656005", "0.5463939", "0.54626185", "0.5459279", "0.54559666", "0.5448931", "0.5431284", "0.54298913", "0.5424753", "0.54229724", "0.5421042", "0.5420395", "0.54198396", "0.54180294", "0.5417835", "0.54165006", "0.5409765", "0.5408073", "0.5407765", "0.54056865", "0.54056865", "0.54056865", "0.54053396", "0.5397138", "0.53837585", "0.5374328", "0.5365287", "0.53579205", "0.53555995" ]
0.0
-1
set account username and pass
@PostMapping("/addAcc") public userAccount setUserAccount(@RequestBody userAccount account) { // System.out.println("Email:"+account.getEmail()); // System.out.println("username:"+account.getUsername()); // System.out.println("pass:"+account.getPassword()); return this.accountRepo.save(account); // return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);", "public void setCredentials( String username_, String password_ ) {\n\t\tif (username_ != null) {\n\t\t\tusername = username_;\n\t\t} else {\n\t\t\tusername = \"Encinitas\";\n\t\t}\n\t\tif (password_ != null) {\n\t\t\tpassword = password_;\n\t\t} else {\n\t\t\tpassword = \"Carlsbad\";\n\t\t}\n\t\tlog( \"username \" + username, Log.Level.Information );\n\t\tlog( \"password \" + password, Log.Level.Information );\n\t}", "public void setPassword(String pass);", "private void setUserCredentials() {\n ((EditText) findViewById(R.id.username)).setText(\"harish\");\n ((EditText) findViewById(R.id.password)).setText(\"11111111\");\n PayPalHereSDK.setServerName(\"stage2pph10\");\n }", "void setUsername(String username);", "void setUserUsername(String username);", "public void setNewUser(String username, String password)\r\n {\r\n configureClient(username, password);\r\n }", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);", "public void setAccountData(final String username, final String password) {\n mUsername = username;\n mPassword = password;\n }", "private static void setCredentials(String nick, String passwd, String channel, String currency) {\r\n IRC.nick = nick.toLowerCase();\r\n IRC.passwd = passwd;\r\n \r\n if (channel.startsWith(\"#\")) {\r\n IRC.channel = channel;\r\n IRC.admin = capName(channel.substring(1));\r\n }\r\n else {\r\n IRC.channel = \"#\" + channel;\r\n IRC.admin = capName(channel);\r\n }\r\n IRC.currency = currency;\r\n }", "private void setCredentials() {\n Properties credentials = new Properties();\n\n try {\n credentials.load(new FileInputStream(\"res/credentials.properties\"));\n } catch (IOException e) {\n __logger.error(\"Couldn't find credentials.properties, not setting credentials\", e);\n return;\n }\n\n this.username = credentials.getProperty(\"username\");\n this.password = credentials.getProperty(\"password\");\n this.smtpHost = credentials.getProperty(\"smtphost\");\n this.imapHost = credentials.getProperty(\"imaphost\");\n\n if (password == null || password.equals(\"\")) {\n password = this.getPasswordFromUser();\n }\n\n __logger.info(\"Set credentials\");\n }", "public void setUsername(String username) {this.username = username;}", "public void setUsername(String username) {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"username\", username);\n editor.commit(); \t\n }", "public void setLogin(String login) {\n Logger.getGlobal().log(Level.INFO, \"Account: \" +login +\" creating\");\r\n this.login = login;\r\n }", "public void setUserName(String username) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putString(\"USERNAME\", username);\n\t\teditor.commit();\n\t}", "public void addAccount(String user, String password);", "public void setUsername(String username)\r\n/* 16: */ {\r\n/* 17:34 */ this.username = username;\r\n/* 18: */ }", "protected static void setUsername(String username) {\n Program.username = username;\n }", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "public void setUsername(String u)\n\t{\n\t\tusername = u;\n\t}", "public void setPassword(String pw)\n {\n this.password = pw;\n }", "public void set_pass(String password)\n {\n pass=password;\n }", "public void updatePassword(String account, String password);", "public void propagateCredentials( User user, String password );", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "public void setAccountPassword(String value) {\n this.accountPassword = value;\n }", "private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }", "public void setUsername(String aUsername) {\n username = aUsername;\n }", "public void setUsername(String username) {\n this.username = username;\n saveProperties();\n }", "protected void changeUser(String username) throws Exception {\n if(username == null) {\n username = TestConfig.getUsername();\n }\n configuration.setUserName(username);\n client = createDefaultClient();\n }", "public static void setUsername(String username)\n {\n username_ = username;\n }", "private void setLogin(String username) {\n\t\tif(username == null) {\n\t\t\treturn;\n\t\t}\n\t\tloginTextBox.sendKeys(username);\n\t}", "public void setUsername(String un)\r\n\t{\r\n\t\tusername = un;\r\n\t}", "public void addUserCredentials(String login, String password) throws SQLException;", "public User doAuthentication(String account, String password);", "private void login(String username,String password){\n\n }", "private void set(String sLogin, String sFirstName, String sLastName, \r\n\t\t\tString sPassword, String sEmail, String sRole, String sLocale, \r\n\t\t\tString sAuthMethod, boolean bActiveFlag)\r\n\t{\r\n\t\tthis.sLogin = sLogin;\r\n\t\tthis.sFirstName = sFirstName;\r\n\t\tthis.sLastName = sLastName;\r\n\t\tthis.sPassword = sPassword;\r\n\t\tthis.sEmail = sEmail;\r\n\t\tthis.sRole = sRole;\r\n\t\tthis.sLocale = sLocale;\r\n\t\tthis.sAuthMethod = sAuthMethod;\r\n\t\tthis.bActiveFlag = bActiveFlag;\t\t\r\n\t}", "public void setCurrentUserAccount(String currentUserAccount);", "void setPassword(String ps) {\n this.password = ps;\n }", "public void setUsername(String un)\n {\n this.username = un;\n }", "public void setupUser( String uid, String password ) throws NamingException, GeneralSecurityException {\r\n\t\ttolvenUser = login(uid, password);\r\n\t}", "public void setCredentials(String n, String t){\n\n name = n;\n token = t;\n\n //save the name and token in an external txt file.\n credentials.put(name, token);\n try {\n credentials.exportNode(new FileOutputStream(\"tokens.txt\"));\n }catch (IOException | BackingStoreException e1){\n System.out.println(e1);\n }\n }", "private void register(String username,String password){\n\n }", "void login(String user, String password);", "public void setPassword(java.lang.String newPassword);", "public final void setUsername(final String value) {\n username = value;\n }", "public void setUsername(String username) {\n \tthis.username = username;\n }", "private void authenticate(String user, String pass) {\n }", "public void setUsername(String username) {\n this.username = username;\n this.email = username;\n this.needToSave = Boolean.TRUE;\n }", "void setUserPasswordHash(String passwordHash);", "public void setUsername(String username)\n {\n _username = username;\n }", "@Override\n public void setExisting(String login, String pasword) {\n loginEdit.setText(login);\n passwordEdit.setText(pasword);\n }", "public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"[email protected]\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}", "public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }", "@Override\n\t\t\tpublic void submit(String user, String pass) {\n\t\t\t\tsetUsername(user);\n\t\t\t\tsetPassword(pass);\n\t\t\t\tlogin();\n\t\t\t}", "Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }", "protected void setAccountName(final String account) {\n this.account = account;\n }", "public void loginAsTom() {\n textFieldUsername.withTimeoutOf(2000, MILLIS).type(\"tomsmith\");\n textFieldPassword.type(\"SuperSecretPassword!\");\n buttonLogin.click();\n }", "public void setUsername(String username)\n {\n this.username = username;\n }", "public void setDatabaseUser(String sDatabaseUser) throws IOException;", "public void saveAuthentication(String username) {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(AUTH, true);\n editor.putString(USERNAME, username);\n editor.apply();\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public UserPass(String username, String password) {\n\t\tsuper();\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\trole = \"user\";\n\t}", "public void setPassword(String password)\n {\n _password = password;\n }", "private void setAccount(SessionData sessionData, Account account) {\n \ttry {\n\t sessionData.set(\"account\", account);\n \t} catch (Exception e) {\n \t throw new RuntimeException(e.toString());\n \t}\n }", "public void setPassword(String paramPasswd) {\n\tstrPasswd = paramPasswd;\n }", "public void credentials(Object cred) {\n this.cred = cred;\n }", "void addUserpan(String userid,String username,String userpwd);", "public void setUserName(String text) {\n txtUserName().setText(text);\n }", "private void insertCredentials(String email, String password){\n botStyle.type(this.userName, email);\n botStyle.type(this.password, password);\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "private void loginAccount() {\n\t\taccountManager.loginAccount(etEmail.getText().toString(), etPassword.getText().toString());\n\n\t}", "private void setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) {\n\t\t// Set the authentication\n\t\tauthComponent.setCurrentUser(userName);\n\n\t\t// Set up the user information\n\t\tUserTransaction tx = transactionService.getUserTransaction();\n\t\tNodeRef homeSpaceRef = null;\n\t\tUser user;\n\t\ttry {\n\t\t\ttx.begin();\n\t\t\tuser = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));\n\t\t\thomeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);\n\t\t\tif(homeSpaceRef == null) {\n\t\t\t\tlogger.warn(\"Home Folder is null for user '\"+userName+\"', using company_home.\");\n\t\t\t\thomeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());\n\t\t\t}\n\t\t\tuser.setHomeSpaceId(homeSpaceRef.getId());\n\t\t\ttx.commit();\n\t\t} catch (Throwable ex) {\n\t\t\tlogger.error(ex);\n\n\t\t\ttry {\n\t\t\t\ttx.rollback();\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tlogger.error(\"Failed to rollback transaction\", ex2);\n\t\t\t}\n\n\t\t\tif (ex instanceof RuntimeException) {\n\t\t\t\tthrow (RuntimeException) ex;\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Failed to set authenticated user\", ex);\n\t\t\t}\n\t\t}\n\n\t\t// Store the user\n\t\thttpSess.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);\n\t\thttpSess.setAttribute(LoginBean.LOGIN_EXTERNAL_AUTH, Boolean.TRUE);\n\n\t\t// Set the current locale from the Accept-Lanaguage header if available\n\t\tLocale userLocale = parseAcceptLanguageHeader(req, m_languages);\n\n\t\tif (userLocale != null) {\n\t\t\thttpSess.setAttribute(LOCALE, userLocale);\n\t\t\thttpSess.removeAttribute(MESSAGE_BUNDLE);\n\t\t}\n\n\t\t// Set the locale using the session\n\t\tI18NUtil.setLocale(Application.getLanguage(httpSess));\n\n\t}", "public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}", "User(String username, String pwd) {\n\t\tthis(username);\n\t\tthis.pwd = pwd;\n\t}", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "public static void setUser(String user) {\n Account.user = user;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "Account(String username, String email) {\n this.username = username;\n this.email = email;\n }", "public URIBuilder setUserInfo(final String username, final String password) {\n return setUserInfo(username + ':' + password);\n }", "public LoginPage writeUsername(string usr) {\n driver.findElement(By.id(\"username\")).sendKeys(usr);\n return this;\n }", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "public void setPass(String pass)\r\n\t{\r\n\t\tpassword = pass;\r\n\t}", "public void setUsername(final String aUsername) {\n try {\n username = URLEncoder.encode(aUsername, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n username = aUsername;\n }\n }", "public void setLogin(String strLogin)\n {\n \tstringLogin = strLogin;\n }", "public void setUsername(String username) {\n this.username = username;\r\n }", "public void setUsername(final String username){\n mUsername = username;\n }", "public void setPassword(java.lang.String param) {\n localPasswordTracker = true;\n\n this.localPassword = param;\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(java.lang.String param) {\n localUsernameTracker = true;\n\n this.localUsername = param;\n }", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "public void setCredentialsForCurrentThread(String username, String password) {\n\t\tthis.threadBoundCredentials.set(new String[] {username, password});\n\t}", "private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}", "public void setUsername(String username) {\n\tthis.username = username;\n}", "@Ignore(\"Test is not done yet\")\n @Test\n public void testChangingUsernameToExisting() {\n final UserRequest request = new UserRequest();\n // We're currently logged in as Austria, so we're trying to change the\n // username to Germany.\n request.setNewUsername(\"[email protected]\");\n final Response response = administration.controlUserAccount(token, request);\n assertThat(response.getError(), is(IWSErrors.FATAL));\n }" ]
[ "0.7562231", "0.7479822", "0.7036074", "0.69906557", "0.69255817", "0.6847329", "0.67479616", "0.6699671", "0.6699671", "0.6699671", "0.6624252", "0.65984267", "0.6593868", "0.6567312", "0.65636736", "0.6556321", "0.64719766", "0.64346266", "0.6426203", "0.64258856", "0.6379826", "0.6361731", "0.6352502", "0.6349616", "0.6342181", "0.63357157", "0.6327399", "0.6287021", "0.6277147", "0.62733585", "0.6269324", "0.6262428", "0.625608", "0.6251317", "0.6248636", "0.6247318", "0.6237608", "0.6210066", "0.6209315", "0.6196773", "0.619306", "0.61887395", "0.61778706", "0.6177771", "0.61660445", "0.6164546", "0.6159617", "0.6146056", "0.61409754", "0.6140404", "0.6108812", "0.609222", "0.6087132", "0.6082745", "0.6081496", "0.60718095", "0.60698307", "0.6059322", "0.60476923", "0.6044175", "0.6042937", "0.6038064", "0.60342", "0.60338354", "0.60338354", "0.60325783", "0.60247713", "0.60163397", "0.6011814", "0.6009121", "0.60003066", "0.59926087", "0.5990105", "0.59889895", "0.5987533", "0.5987337", "0.5986495", "0.59864587", "0.59826386", "0.59815353", "0.5970505", "0.5968837", "0.59668666", "0.5965274", "0.5964553", "0.59600836", "0.59537613", "0.59522504", "0.59520954", "0.5951175", "0.5947336", "0.59470415", "0.59470415", "0.59470415", "0.59465015", "0.5941695", "0.5934553", "0.59298944", "0.59280986", "0.5909824", "0.5905225" ]
0.0
-1
System.out.println("Username"+ user); System.out.println("pass"+ account.getPassword());
@PutMapping("/updatePass/{username}") public ResponseEntity<passModified> setUserPass(@RequestParam("username") String user, @RequestBody userAccount account) { accountRepo.updatePassword(user,account.getPassword()); passModified modified = new passModified("Changed"); return ResponseEntity.ok().body(modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUserPassword();", "public String getPassword();", "public String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "public String getPassword() { \n return this.password; \n }", "public String getPassword(){\n return this.password;\n }", "private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}", "public String getPassword()\n {\n return _password;\n }", "private void login(String username,String password){\n\n }", "public java.lang.String getPassword();", "public String getPassword() {return password;}", "public String getPassword(){\n return password;\n\t}", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "public String getAccountPassword() {\n return accountPassword;\n }", "String password();", "public String getAccountPassword() {\n return accountPassword;\n }", "public String getPassword(){\n \treturn password;\n }", "public String getPassword()\n {\n return this.password;\n }", "private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }", "public String getAccount() {\n\t\treturn getUsername() + \":\" + getPassword() + \"@\" + getUsername();\n\t}", "static String retrievePassword(String username) {\r\n User lostUser = accounts.get(username);\r\n return lostUser.getPassword();\r\n }", "void login(String user, String password);", "public int getPassword(){\n return password;\r\n }", "public String get_password()\r\n\t{\r\n\t\treturn this.password;\r\n\t}", "void retrievePassWord(User user);", "public String getPassword()\r\n {\r\n return password;\r\n }", "private void register(String username,String password){\n\n }", "public String getPassword()\n {\n return _password;\n }", "public String signin() {\n \t//System.out.print(share);\n \tSystem.out.println(username+\"&&\"+password);\n String sqlForsignin = \"select password from User where username=?\";\n Matcher matcher = pattern.matcher(sqlForsignin);\n String sql1 = matcher.replaceFirst(\"'\"+username+\"'\");//要到数据库中查询的语句\n select();\n DBConnection connect = new DBConnection();\n List<String> result = connect.select(sql1);//查询结果\n if (result.size() == 0) return \"Fail1\";\n \n if (result.get(0).equals(password)){\n \tsession.setAttribute( \"username\", username);\n \treturn \"Success\";\n }\n else return \"Fail\";\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}", "public String getPassword() {\n\treturn password;\n}", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getAccountPassword() {\n return accountPassword;\n }", "@Test\n public void getPassword() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getPassword(), pass);\n }", "public String getReceptionist_password(){ return receptionist_password;}", "public String getPassword()\r\n {\r\n return password;\r\n }", "private void userInformation()\n {\n name = eName.getText().toString();\n userName = eUserName.getText().toString();\n email = eEmail.getText().toString();\n password = ePassword.getText().toString();\n password = encryptionAlgo.encryptPass(password);//initialize new encrypt password\n address = eAddress.getText().toString();\n favouriteWord = eFavourite.getText().toString();\n }", "public String getPassword(){\n\t\treturn this.password;\n\t}", "public void setPassword(String pass);", "@Override\r\n public String toString(){\r\n String out = \"Login - \";\r\n out += login;\r\n out += \" Password - \";\r\n out += Encryptor.decrypt(password,login);\r\n return out;\r\n }", "public String getPassword() {\r\n return this.password;\r\n }", "@Override\npublic String getPassword() {\n\treturn senha;\n}", "public java.lang.String getSpPassword(){\r\n return localSpPassword;\r\n }", "public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }", "public String getPassword() {\n\treturn strPasswd;\n }", "public String getUserPassword() {\r\n return userPassword;\r\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "private void getUserNamePwd() {\n\n try {\n // get Application Connection ID\n LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();\n userName = lgCtx.getBackendUser();\n pwd = lgCtx.getBackendPassword();\n appConnID = LogonCore.getInstance().getLogonContext()\n .getConnId();\n } catch (LogonCoreException e) {\n LogManager.writeLogError(Constants.device_reg_failed_txt, e);\n }\n }", "public String login() throws Exception {\n System.out.println(user);\n return \"toIndex\" ;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn this.id + \">>>>>>\" + this.name+\">>>>>>>\"+this.password;\r\n\t}", "public Integer logIn(String u_name, String u_pw){\n //find entry with u_name = this.u_name\n //probably not so safe\n //getting user with index 0 because getUserFromUsername returns List\n User user = userDao.getUserFromUsername(u_name).get(0);\n //print at console\n LOGGER.info(\"User: \" + user);\n //returns integer 1 if user.get_pw equals to this.pw or 0 if not\n if (user.getU_Pw().equals(u_pw)){\n return user.getU_Id();\n }else{\n return 0;\n }\n }", "public String getPassword(){\n return mPassword;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public void login() {\n System.out.println(\"a\");\r\n System.out.println(\"b\");\r\n System.out.println(\"a\");\r\n System.out.println(\"a\");\r\n }", "java.lang.String getCred();", "public String getPassword() {\n return instance.getPassword();\n }", "public String getPassword() {\n return instance.getPassword();\n }", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getUserPwd();\n\t}", "@Override\r\n\tpublic String execute() throws Exception {\n\t\tSystem.out.println(username + \"---\" + password + \"---\" + address);\r\n\t\t\r\n\t\tActionContext context = ServletActionContext.getContext();\r\n\t\tMap<String, Parameter> map = context.getParameters();\r\n\t\t\r\n\t\tSystem.out.println(\"username=\" + map.get(\"username\"));\r\n\t\t\r\n\t\treturn NONE;\r\n\t}", "public User doAuthentication(String account, String password);", "public void login() throws AccountException {\n System.out.println(\"----------------- Login -----------------\");\n System.out.print(\"Account: \");\n String acc = this.checkEmpty(\"Account\"); // Call method to check input of acc\n System.out.print(\"Password: \");\n String pass = this.checkEmpty(\"Password\"); // Call method to check input of pass\n\n // Check status of login\n boolean isLogin = this.login(acc, pass);\n\n if (isLogin) {\n // Show change password if user login success\n System.out.println(\"------------ Wellcome -----------\");\n System.out.print(\"Hi \" + acc + \", do you want change password now? Y/N: \");\n boolean isContinune = true;\n\n while (isContinune) {\n // Get y or n from user\n String op = scanner.nextLine();\n switch (op.toUpperCase()) {\n case \"Y\": // If y to check password\n this.changPass(acc); // Call method to change password\n isContinune = false; // End loop\n break;\n case \"N\": // Don't change password\n System.out.println(\"Don't change!\");\n isContinune = false; // End loop\n break;\n default: // Print error if not choice y or n\n System.out.println(\"You must choose 'Y' or 'N'!\");\n System.out.print(\"Try again: \"); // Retype\n break;\n }\n }\n } else {\n // Print out error if account or password incorrect\n System.out.println(\"Your account or password incorrect!\");\n }\n }", "public String getPassword() {\n return this.password1;\n }", "public User getUser(String userName, String password);", "public String getPassword() {\n return password;\r\n }", "public void addAccount(String user, String password);", "@Test\n public void testGetPassword() {\n System.out.println(\"getPassword\");\n LoginRegister instance = new LoginRegister();\n String expResult = \"inse1inse\";\n String result = instance.getPassword();\n assertEquals(expResult, result);\n }", "protected void login() {\n\t\t\r\n\t}", "@When(\"user enter the username and password\")\n\tpublic void user_enter_the_username_and_password() {\n\t\tSystem.out.println(\"user enter the username and password\");\n\t\tdriver.findElement(By.id(\"txtUsername\")).sendKeys(\"Admin\");\n\t\tdriver.findElement(By.id(\"txtPassword\")).sendKeys(\"admin123\");\n\t \n\t}", "public static void main(String[] args) {\n\n String username = \"Gulzhaina\";\n String password = \"12345\";\n Scanner input = new Scanner(System.in);\n String username2 = input.nextLine();\n\n\n if(username2.equals(username)){\n System.out.println(\"Please enter your password: \");\n String password2 =input.nextLine();\n if(password2.equals(password)){\n System.out.println(\"Login successful\");\n } else{\n System.out.println(\"Wrong password\");\n }\n }\n else {\n System.out.println(\"invalid username\");\n }\n\n }", "public void set_pass(String password)\n {\n pass=password;\n }", "String getPass();", "public String getPassword()\n \t{\n \t\treturn password;\n \t}", "Login() { \n }", "@Override\n public String getPassword() {\n return password;\n }", "String getUserPassword(String user) {\r\n return userInfo.get(user);\r\n }", "private char[] getPass()\n {\n return password.getPassword();\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }" ]
[ "0.7379435", "0.69965124", "0.69965124", "0.69841933", "0.69841933", "0.69841933", "0.69841933", "0.69841933", "0.69841933", "0.69841933", "0.69841933", "0.69841933", "0.6925863", "0.6892382", "0.68567544", "0.68457663", "0.682954", "0.68285406", "0.67699033", "0.67279404", "0.67212534", "0.67212534", "0.67212534", "0.67212534", "0.67212534", "0.67212534", "0.67212534", "0.67191154", "0.66781014", "0.6623887", "0.6596317", "0.65868694", "0.65792567", "0.6576148", "0.6565884", "0.656246", "0.65563625", "0.6535059", "0.6533953", "0.65335286", "0.6524092", "0.6509688", "0.65041846", "0.6500014", "0.6475013", "0.6444691", "0.6444691", "0.64439094", "0.6440924", "0.64377964", "0.6437351", "0.643229", "0.64298946", "0.64056146", "0.6404566", "0.6403303", "0.6389446", "0.6381279", "0.63773733", "0.6369425", "0.6365678", "0.63653374", "0.63585305", "0.63585305", "0.63453704", "0.63303065", "0.6324611", "0.63206154", "0.6316907", "0.63161206", "0.63161206", "0.63161206", "0.63161206", "0.63161206", "0.63122296", "0.6303686", "0.6296274", "0.6296274", "0.629068", "0.62810653", "0.6269553", "0.62674844", "0.62629855", "0.62597066", "0.6257634", "0.6256695", "0.6256085", "0.62529695", "0.6251917", "0.62473947", "0.6239548", "0.6237932", "0.62358004", "0.62232465", "0.6223065", "0.6216193", "0.6213309", "0.6211841", "0.620992", "0.6204318", "0.6204318" ]
0.0
-1
Creates new form PnAlunos
public PnAlunos() { initComponents(); listarAlunos(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public CrearPedidos() {\n initComponents();\n }", "@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }", "Compuesta createCompuesta();", "@RequestMapping(value=\"/formpaciente\")\r\n\tpublic String crearPaciente(Map<String, Object> model) {\t\t\r\n\t\t\r\n\t\tPaciente paciente = new Paciente();\r\n\t\tmodel.put(\"paciente\", paciente);\r\n\t\tmodel.put(\"obrasociales\",obraSocialService.findAll());\r\n\t\t//model.put(\"obrasPlanesForm\", new ObrasPlanesForm());\r\n\t\t//model.put(\"planes\", planService.findAll());\r\n\t\tmodel.put(\"titulo\", \"Formulario de Alta de Paciente\");\r\n\t\t\r\n\t\treturn \"formpaciente\";\r\n\t}", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "@PostMapping(\"/predavanjePredava\")\n public Predavanje_Predavac createPredavanje_Predavac(@Valid @RequestBody Predavanje_Predavac pp) {\n return predavanje_PredavacDAO.save(pp);\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMessage());\n return \"redirect:/error\";\n }\n }", "@RequestMapping(value = \"/create\", method = RequestMethod.POST)\n public ModelAndView create(@RequestParam(\"horasalida\") Date horasalida,@RequestParam(\"horallegada\") Date horallegada,@RequestParam(\"aeropuerto_idaeropuerto\") Long aeropuerto_idaeropuerto,\n \t\t@RequestParam(\"aeropuerto_idaeropuerto2\") Long aeropuerto_idaeropuerto2,@RequestParam(\"avion_idavion\") Long avion_idavion) {\n Vuelo post=new Vuelo();\n post.setHorallegada(horallegada);\n post.setHorasalida(horasalida);\n\t\t\n post.setAeropuerto_idaeropuerto(aeropuerto_idaeropuerto);\n post.setAeropuerto_idaeropuerto2(aeropuerto_idaeropuerto2);\n post.setAvion_idavion(avion_idavion);\n repository.save(post);\n return new ModelAndView(\"redirect:/vuelos\");\n }", "ProjetoRN createProjetoRN();", "public TelaCadastrarProduto() {\n initComponents();\n entidade = new Produto();\n setRepositorio(RepositorioBuilder.getProdutoRepositorio());\n grupo.add(jRadioButton1);\n grupo.add(jRadioButton2);\n }", "Negacion createNegacion();", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "Documento createDocumento();", "public void crearNodos()\n\t{\n\t\tfor(List<String> renglon: listaDeDatos)\n\t\t{\n\t\t\tPersona persona = new Persona(Integer.parseInt(renglon.get(1)), Integer.parseInt(renglon.get(2))); //crea la persona\n\t\t\t\n\t\t\tNodo nodo = new Nodo(Integer.parseInt(renglon.get(0)), 0, 0, false); //crea el nodo con id en posicion 1\n\t\t\t\n\t\t\tnodo.agregarPersona(persona);\n\t\t\tlistaNodos.add(nodo);\n\t\t}\n\t\t\n\t}", "Operacion createOperacion();", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "OperacionColeccion createOperacionColeccion();", "public Perfil create(Perfil perfil);", "@POST\n\t@Consumes({MediaType.APPLICATION_FORM_URLENCODED, MediaType.APPLICATION_JSON} )\n\t@Produces(MediaType.TEXT_HTML)\n\tpublic void createPunto(Punto punto,\n\t\t\t@Context HttpServletResponse servletResponse) throws IOException {\n\t\tpunto.setId(AutoIncremental.getAutoIncremental());\n\t\tpuntoService.agregarPunto(punto);\n\t\tservletResponse.sendRedirect(\"./rutas/\");\n\t}", "protected void add(HttpServletRequest request) throws ClassNotFoundException, SQLException{\n if(!request.getParameter(\"nome\").equals(\"\")){\n //Adiciona pessoa\n PessoaDAO dao = new PessoaDAO(); \n //String acao = request.getParameter(\"add\");\n int id = 0;\n for(Pessoa t:dao.findAll()){\n id =t.getId();\n }\n id++; \n Pessoa p = new Pessoa(new Integer((String)request.getParameter(\"id\")),request.getParameter(\"nome\"),request.getParameter(\"telefone\"),request.getParameter(\"email\"));\n dao.create(p);\n }\n }", "public abstract Anuncio creaAnuncioTematico();", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public CrearProductos() {\n initComponents();\n }", "public frm_tutor_subida_prueba() {\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public FormInserir() {\n initComponents();\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }", "public CrearGrupos() throws SQLException {\n initComponents();\n setTitle(\"Crear Grupos\");\n setSize(643, 450);\n setLocationRelativeTo(this);\n cargarModelo();\n }", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "@RequestMapping(method = RequestMethod.POST, value = {\"\",\"/\"})\r\n\tpublic ResponseEntity<FormularioDTO> add(@RequestBody @Valid Formulario formulario) throws AuthenticationException {\r\n\t\tformulario.setInstituicao(new Instituicao(authService.getDados().getInstituicaoId()));\r\n\t\treturn new ResponseEntity<>(formularioService.create(formulario), HttpStatus.CREATED);\r\n\t}", "public void postularse() {\n\t\t\n\t\ttry {\t\t\t\n\n\t\t\tPostulante postulante= new Postulante();\n\t\t\tpostulante.setLegajo(Integer.valueOf(this.txtLegajo.getText()));\n\t\t\tpostulante.setFamiliaresACargo(Integer.valueOf(this.txtFamiliaresACargo.getText()));\n\t\t\tpostulante.setNombre(txtNombre.getText());\n\t\t\tpostulante.setApellido(txtApellido.getText());\n\t\t\t//postulante.setFechaDeNacimiento(this.txtFechaDeNaciminto.getText());\n\t\t\tpostulante.setCarrera(this.cmbCarrera.getSelectedItem().toString());\n\t\t\tpostulante.setNacionalidad(this.txtNacionalidad.getText());\n\t\t\tpostulante.setLocalidad(this.txtLocalidad.getText());\n\t\t\tpostulante.setProvincia(this.txtProvincia.getText());\n\t\t\t//postulante.setSituacionSocial(this.txtSituacionSocial.getText());\n\t\t\tpostulante.setDomicilio(this.txtDomicilio.getText());\n\t\t\tpostulante.setCodigoPostal(this.txtCodigoPostal.getText());\n\t\t\tpostulante.setEmail(this.txtEmail.getText());\n\t\t\tpostulante.setTelefono(Long.valueOf(this.txtTelefono.getText()));\n\t\t\t\n\t\t\t\n\t\t\tint ingresos=0, miembrosEconomicamenteActivos = 0;\n\t\t\tfor(Familiar familiar: familiares) {\n\t\t\t\tingresos+=familiar.getIngresos();\n\t\t\t\tif(ingresos > 0) {\n\t\t\t\t\tmiembrosEconomicamenteActivos++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpostulante.setCantidadDeFamiliares(familiares.size());\n\t\t\tdouble promedio = Math.random() * (61) + 30 ; \n\t\t\tpostulante.setPromedio((int) promedio);\n\t\t\t\n\t\t\t\n\t\t\tint pIngresos, pActLaboral = 0, pVivienda = 0, pSalud = 0, pDependencia, pPromedio, pRendimiento, pDesarrollo;\n\t\t\t\n\t\t\t//Puntaje Ingresos\n\t\t\tint canastaBasicaPostulante = familiares.size() * canastaBasicaPromedio; \n\t\t\tif(ingresos <= canastaBasicaPostulante) {\n\t\t\t\tpIngresos = 30;\n\t\t\t}\n\t\t\telse if(ingresos >= (2*canastaBasicaPostulante)) {\n\t\t\t\tpIngresos = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpIngresos = (int) (30 - 0.15 * (familiares.size() - ingresos));\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Condicion Actividad Laboral\n\t\t\t\n\t\t\t\n\t\t\tint puntajeMiembros = 0;\n\t\t\t\n\t\t\tfor (Familiar familiar: familiares) {\n\t\t\t\t\tif(familiar.getIngresos() == 0) {\n\t\t\t\t\t\tpuntajeMiembros = puntajeMiembros + 5;\n\t\t\t\t\t}\n\t\t\t\t\telse if(familiar.getIngresos() < salarioMinimo) {\n\t\t\t\t\t\tpuntajeMiembros = puntajeMiembros + 3;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(miembrosEconomicamenteActivos>0) {\n\t\t\tpActLaboral = puntajeMiembros/miembrosEconomicamenteActivos;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Vivienda - Extrae de cmbVivienda: 0 sin deudas - 1 con deudas - 2 sin propiedad\n\t\t\tint condicionVivienda = this.cmbVivienda.getSelectedIndex();\n\t\t\tswitch (condicionVivienda) {\n\t\t\tcase 0:\n\t\t\t\tpVivienda = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpVivienda = 3;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpVivienda = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Salud - Extrae de cmbSalud: 0 tiene obra - 1 cobertura parcial - 2 no tiene\n\t\t\tint condicionSalud = this.cmbSalud.getSelectedIndex();\n\t\t\tswitch (condicionSalud) {\n\t\t\tcase 0:\n\t\t\t\tpSalud = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpSalud = 3;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpSalud = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Dependencia\n\t\t\tif (familiares.size() - miembrosEconomicamenteActivos == 0) {\n\t\t\t\tpDependencia = 0;\n\t\t\t}\n\t\t\telse if(familiares.size() - miembrosEconomicamenteActivos > 2) {\n\t\t\t\tpDependencia = 5;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpDependencia = 3;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Rendimiento académico\n\t\t\tint materiasAprobadas = (int) (Math.random() * (11));\n\t\t\tif(materiasAprobadas == 0) {\n\t\t\t\tpRendimiento = 4;\n\t\t\t\tpPromedio = 14;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint materiasRegularizadas = (int) (Math.random() * (41 - materiasAprobadas));\n\t\t\t\tpRendimiento = materiasAprobadas/materiasRegularizadas * 10;\n\t\t\t//Puntaje Promedio: Se recuperaria del sysacad\n\t\t\t\tpPromedio = (int) (promedio/10 * 3.5);\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Plan Desarrollo: Evaluado por comisión local\n\t\t\tpDesarrollo = (int) (Math.random() * 5 + 1);\n\n\n\t\t\tpuntaje = pIngresos + pActLaboral + pVivienda + pSalud + pDependencia + pPromedio + pRendimiento + pDesarrollo;\n\t\t\tpostulante.setMatAprobadas(materiasAprobadas);\n\t\t\t\n\t\t\ttry{ \n\t\t\t\tcontroller.postular(postulante,puntaje); \n\t\t\t\tJOptionPane.showMessageDialog(null, \"Se postuló al alumno \"+postulante.getNombre()+\" \"+postulante.getApellido()+\".\", \"Postulación exitosa.\", JOptionPane.OK_OPTION);\n\t\t\t\tlimpiarCampos();\n\t\t\t} \n\t\t\tcatch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No se pudo postular el alumno\", \"Error\", JOptionPane.OK_OPTION);\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"Datos incorrectos\", \"Error\", JOptionPane.OK_OPTION);\n\t\t}\n\t\t\n\t}", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "void crearNuevaPersona(Persona persona);", "public boolean createPalvelupiste(Palvelupiste palvelupiste);", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "@Override\n\tpublic Oglas createNewOglas(NewOglasForm oglasForm) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\n\t\tOglas oglas = new Oglas();\n\t\tSystem.out.println(oglas.getId());\n\t\toglas.setNaziv(oglasForm.getNaziv());\n\t\toglas.setOpis(oglasForm.getOpis());\n\t\ttry {\n\t\t\toglas.setDatum(formatter.parse(oglasForm.getDatum()));\n\t\t\tSystem.out.println(oglas.getDatum());\n System.out.println(formatter.format(oglas.getDatum()));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn repository.save(oglas);\n\t}", "@FXML\n\tpublic void buttonCreateProductType(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtProductTypeName.getText();\n\t\tif (!name.equals(empty)) {\n\t\t\tProductType obj = new ProductType(txtProductTypeName.getText());\n\t\t\ttry {\n\t\t\t\tboolean found = restaurant.addProductType(obj, empleadoUsername); // Se añade a la lista de tipos de\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// producto DEL RESTAURANTE\n\t\t\t\tif (found == false) {\n\t\t\t\t\ttypeOptions.add(name);// Se añade a la lista de tipos de producto para ser mostrada en los combobox\n\t\t\t\t}\n\t\t\t\ttxtProductTypeName.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El tipo de producto a crear debe tener un nombre \");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\n\t\t}\n\t}", "public CrearQuedadaVista() {\n }", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "public void crear(Tarea t) {\n t.saveIt();\n }", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "@PutMapping(\"/anuncios/crear/{idAutor}\")\n public void createAnuncio(@PathVariable Long idAutor, @RequestBody Anuncio nuevoAnuncio) throws DataConsistencyException {\n anuncioService.crearAnuncio(idAutor, nuevoAnuncio);\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public VistaCrearPedidoAbonado() {\n initComponents();\n errorLabel.setVisible(false);\n controlador = new CtrlVistaCrearPedidoAbonado(this);\n }", "@PostMapping(\"/creaPerfil\")\n public void creaPerfil(@RequestBody PerfilDto request){\n\n log.info(\"Creando Perfil: {}\",request);\n\n Perfil perfil = new Perfil();\n BeanUtils.copyProperties(request,perfil);\n\n perfilService.savePefil(perfil);\n\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "Motivo create(Motivo motivo);", "public void create(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"INSERT INTO PERSONNE_1 (ID, Nom ,Prenom)\" + \"VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1,ID);\n\t\t\tps.setString(2,pers.getNom());\n\t\t\tps.setString(3,pers.getPrenom());\n\t\t\tps.executeUpdate();\n\t\t\tID++;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Postoj() {}", "private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}", "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "public Principal() {\n initComponents();\n Desabilitar();\n ChoicePro.add(\"\");\n ChoicePro.add(\"Guerrero\");\n ChoicePro.add(\"Mago\");\n ChoicePro.add(\"Arquero\");\n Llenar();\n\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "@Override\n\tpublic void crearPoblacion() {\n\t\tif(this.terminales == null || this.funciones == null) {\n\t\t\tSystem.out.println(\"Error. Los terminales y las funciones tienen que estar inicializados\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tpoblacion = new ArrayList<>();\n\t\tfor(int i = 0; i < this.numIndividuos; i++) {\n\t\t\tIndividuo ind = new Individuo();\n\t\t\tind.crearIndividuoAleatorio(this.profundidad, this.terminales, this.funciones);\n\t\t\tthis.poblacion.add(ind);\n\t\t}\n\t}", "public AsignarNuevoUso() throws NamingException {\r\n\t\t\r\n\t\tJFrame frmNuevoPropietario = new JFrame();\r\n\t\tfrmNuevoPropietario.setFont(new Font(\"Dialog\", Font.BOLD, 16));\r\n\t\tfrmNuevoPropietario.setTitle(\"Asignar Zona\");\r\n\r\n\t\tfrmNuevoPropietario.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmNuevoPropietario.setBounds(100, 100, 650, 400);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tfrmNuevoPropietario.setContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tJComboBox<Zona> comboBox = new JComboBox<Zona>();\r\n\t\t\r\n\t\tcomboBox.setSelectedItem(null);\r\n\t\tcomboBox.setBounds(310, 61, 167, 22);\r\n\t\tcontentPane.add(comboBox);\r\n\t\tfrmNuevoPropietario.setSize(549, 473);\r\n\t\tfrmNuevoPropietario.setVisible(true);\r\n\t\tZonasBeanRemote ZonasBean = (ZonasBeanRemote) InitialContext\r\n\t\t\t\t.doLookup(\"PROYECTO/ZonasBean!com.servicios.ZonasBeanRemote\");\r\n\t\t\r\n\t\tList<Zona> listaZonas = ZonasBean.obtenerTodos();\r\n\r\n\t\tfor (Zona zona : listaZonas) {\r\n\t\t\tcomboBox.addItem((Zona) zona);\r\n\t\t}\r\n\t\t\r\n\r\n\t\tJLabel LblPropietario = new JLabel(\"Seleccionar Zona\");\r\n\t\tLblPropietario.setBounds(136, 65, 137, 14);\r\n\t\tcontentPane.add(LblPropietario);\r\n\r\n\t\tJButton btnAceptar = new JButton(\"Asignar\");\r\n\t\tbtnAceptar.setBounds(136, 390, 89, 23);\r\n\t\tcontentPane.add(btnAceptar);\r\n\r\n\t\tJButton btnCancelar = new JButton(\"Cancelar\");\r\n\t\tbtnCancelar.setBounds(378, 390, 89, 23);\r\n\t\tcontentPane.add(btnCancelar);\r\n\t\tcomboBox.setSelectedItem(null);\r\n\t\t\r\n\t\tJComboBox<TipoUso> comboBoxTipo_Uso = new JComboBox<TipoUso>();\r\n\t\tcomboBoxTipo_Uso.setBounds(310, 169, 167, 22);\r\n\t\tcontentPane.add(comboBoxTipo_Uso);\r\n\t\tTipo_UsosBeanRemote tipo_UsosBean = (Tipo_UsosBeanRemote)\r\n\t\t\t\tInitialContext.doLookup(\"PROYECTO/Tipo_UsosBean!com.servicios.Tipo_UsosBeanRemote\");\r\n\t\t\r\n\t\t\r\n\t\tList<TipoUso> listaTipo_Uso = tipo_UsosBean.obtenerTipo_Uso();\r\n\r\n\t\tfor (TipoUso tipo_Uso : listaTipo_Uso) {\r\n\t\t\tcomboBoxTipo_Uso.addItem((TipoUso) tipo_Uso);\r\n\t\t}\r\n\t\t\r\n\t\tJLabel lblSeleccionarPotrero = new JLabel(\"Seleccionar Uso\");\r\n\t\tlblSeleccionarPotrero.setBounds(136, 172, 139, 16);\r\n\t\tcontentPane.add(lblSeleccionarPotrero);\r\n\t\t\r\n\t\tJLabel lblArea = new JLabel(\"Area:\");\r\n\t\tlblArea.setBounds(218, 92, 56, 16);\r\n\t\tcontentPane.add(lblArea);\r\n\t\t\r\n\t\tJLabel lblPotrero = new JLabel(\"Potrero:\");\r\n\t\tlblPotrero.setBounds(217, 114, 56, 16);\r\n\t\tcontentPane.add(lblPotrero);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Propietario:\");\r\n\t\tlblNewLabel.setBounds(218, 140, 89, 16);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel area = new JLabel(\"\");\r\n\t\tarea.setBounds(310, 92, 56, 16);\r\n\t\tcontentPane.add(area);\r\n\t\t\r\n\t\tJLabel potrero = new JLabel(\"\");\r\n\t\tpotrero.setBounds(310, 114, 56, 16);\r\n\t\tcontentPane.add(potrero);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setBounds(310, 140, 56, 16);\r\n\t\tcontentPane.add(label);\r\n\t\t\r\n\t\tJLabel propietario = new JLabel(\"\");\r\n\t\tpropietario.setBounds(310, 143, 56, 16);\r\n\t\tcontentPane.add(propietario);\r\n\t\t\r\n\t\tcomboBox.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\r\n\t\t\t\tZona zona = (Zona) arg0.getItem();\r\n\t\t\t\tarea.setText(zona.getAreaZona().toString());\r\n\t\t\t\tpotrero.setText(zona.getPotrero().getNomPotrero());\r\n\t\t\t\tpropietario.setText(zona.getPotrero().getPredio().getPropietario().getNomPropietario());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnCancelar.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tfrmNuevoPropietario.dispose();\r\n\t\t\t\tnew PantallaInicio();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnAceptar.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {Zona_UsosBeanRemote Zona_UsosBean = (Zona_UsosBeanRemote) InitialContext\r\n\t\t\t\t\t\t.doLookup(\"PROYECTO/Zona_UsosBean!com.servicios.Zona_UsosBeanRemote\");\r\n\r\n\t\t\t\t\tZona zona = (Zona) comboBox.getSelectedItem();\r\n\t\t\t\t\tTipoUso tipo_Uso = (TipoUso) comboBoxTipo_Uso.getSelectedItem();\r\n\t\t\t\t\tZona_UsosBean.altaZona_Uso(zona, tipo_Uso, fechaLocal);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Se ha asignado la zona Correctamente\", \"Notificacion\",\r\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No se pudo asignar Zona Correctamente\", \"Notificacion\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\r\n\t}", "private void crearNave(String accion) {\n\t\tthis.naveCreada=true;\n\t\tpausa = false;\n\t\t\n\t\tString [] info = accion.split(\"#\");\n\t\tString [] xA = info[3].split(\"=\");\n\t\tString [] yA = info[4].split(\"=\");\n\t\tString [] vxA = info[5].split(\"=\");\n\t\tString [] vyA = info[6].split(\"=\");\n\t\tString [] anA = info[7].split(\"=\");\n\t\t\n\t\tdouble x = Double.valueOf(xA[1]);\n\t\tdouble y = Double.valueOf(yA[1]);\n\t\tdouble velocidadx = Double.valueOf(vxA[1]);\n\t\tdouble velocidady = Double.valueOf(vyA[1]);\n\t\tdouble an = Double.valueOf(anA[1]);\n\t\t\n\t\tthis.nave = new Nave (x, y, an, 0.2, 0.98, 0.05, 20, this);\n\t\tnave.setVelocidadX(velocidadx);\n\t\tnave.setVelocidadY(velocidady);\n\t}", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "@Override\n public boolean createApprisialForm(ApprisialFormBean apprisial) {\n apprisial.setGendate(C_Util_Date.generateDate());\n return in_apprisialformdao.createApprisialForm(apprisial);\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "public PlanoSaude create(long plano_id);", "public abstract Anuncio creaAnuncioGeneral();", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public PantallaPrincipal() {\n initComponents();\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "@PostMapping(\"/persona\")\n public Persona createPersona(@Valid @RequestBody Persona persona) {\n return personaRepository.save(persona);\n }", "@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }", "public Partie creerNouvellePartie(String nom) {\r\n Partie p = new Partie();\r\n p.setNom(nom);\r\n daocrud.save(p);\r\n return p;\r\n }", "public void createAngajat(int id, String nume, String prenume, float salariu, int idPetShop) {\n\t\tif (petShopOperations.checkPetShop(idPetShop) == false)\n\t\t\tSystem.out.println(\"PetShop not found.\");\n\t\tif (angajatOperations.checkAngajat(id) == true)\n\t\t\tSystem.out.println(\"Angajat existent.\");\n\t\tAngajat angajatToAdd = new Angajat(id, nume, prenume, salariu, idPetShop);\n\t\tList<Angajat> angajati = angajatOperations.getAllAngajati();\n\t\tSystem.out.println(\"After adding...\");\n\t\tangajatOperations.addAngajat(angajatToAdd);\n\t\tangajatOperations.printListOfAngajati(angajati);\n\n\t}", "public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }", "public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad.setVehicle();\n ad.setDescription();\n ad.setPics();\n ad.setMain_pic();\n }", "public Participacao createParticipacao(Participacao model) {\n return participacaoRepository.save(model);\n}", "public ViajeroEntity create (ViajeroEntity viajeroEntity){\n LOGGER.log(Level.INFO, \"Creando un review nuevo\");\n em.persist(viajeroEntity);\n return viajeroEntity;\n }", "@FXML\n private void boton_nuevoPuesto(ActionEvent event) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getClassLoader().getResource(\"Views/Puestos/puestos_nuevo.fxml\"));\n Parent root = fxmlLoader.load(); \n Puestos_nuevoController puestosNuevo = fxmlLoader.getController();\n\n \n puestosNuevo.setIdArea(idArea);\n puestosNuevo.setNombreArea(nombreArea);\n \n Scene scene = new Scene(root);\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n stage.setScene(scene);\n stage.show();\n }", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\n\tpublic String saveEntity(@Valid ENTITY tipoConsumo, BindingResult result, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\ttry{\n\t\n\t\t\tif (result.hasErrors()) {\n\t\t\t\treturn viewBaseLocation + \"/form\";\n\t\t\t}\n\t\n\t\t\tabm.guardar(tipoConsumo);\n\t\n\t\t\tif(idEstadia != null){\n\t\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t\t}\n\t\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten se realiz&oacute correctamente.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten no pudo realizarse.\");\n\t\t}\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn \"redirect:list\";\n\t}", "Compleja createCompleja();" ]
[ "0.68981373", "0.68383366", "0.6612949", "0.6450261", "0.6254968", "0.62367356", "0.6165745", "0.6158837", "0.6151886", "0.6140154", "0.6125923", "0.6119287", "0.6083067", "0.6077509", "0.60669667", "0.60483336", "0.60446537", "0.6020956", "0.6012961", "0.60113174", "0.6003925", "0.600115", "0.59941345", "0.59721804", "0.5898125", "0.5881615", "0.5868619", "0.58584636", "0.58504057", "0.58462304", "0.5838746", "0.5833339", "0.5831404", "0.58289605", "0.5822397", "0.5817212", "0.5809938", "0.5801542", "0.5790751", "0.5772314", "0.57687926", "0.5738158", "0.57346505", "0.5711083", "0.5707505", "0.57032347", "0.57016265", "0.57010067", "0.56971806", "0.5696037", "0.56870514", "0.5681499", "0.56814545", "0.5678224", "0.5674249", "0.5672079", "0.56663996", "0.5664499", "0.5663819", "0.5663476", "0.5654733", "0.5640682", "0.5639184", "0.56346434", "0.5631882", "0.5626154", "0.561739", "0.5616706", "0.5616563", "0.56031305", "0.55951685", "0.55937904", "0.559209", "0.55914724", "0.558168", "0.5580981", "0.55781364", "0.5574704", "0.556983", "0.5569654", "0.55682486", "0.556768", "0.5567177", "0.5564265", "0.55600333", "0.5541047", "0.5534237", "0.55341285", "0.5530595", "0.5526343", "0.5519761", "0.5512897", "0.5511334", "0.55071867", "0.5505685", "0.55054927", "0.550419", "0.5498356", "0.5479132", "0.54749423" ]
0.6462255
3
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jSeparator1 = new javax.swing.JSeparator(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); txNome = new javax.swing.JTextField(); btBuscarLivro = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); tbAluno = new javax.swing.JTable(); setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 28)); // NOI18N jLabel1.setText("Alunos"); jLabel2.setText("Buscar Aluno"); btBuscarLivro.setText("Buscar"); btBuscarLivro.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btBuscarLivroActionPerformed(evt); } }); tbAluno.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null}, {null, null, null, null, null, null}, {null, null, null, null, null, null}, {null, null, null, null, null, null} }, new String [] { "Nome", "Curso", "Fase", "Ano", "Matrícula", "Livros Emprestados/Mês" } )); jScrollPane1.setViewportView(tbAluno); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(23, 23, 23) .addComponent(jLabel1) .addGap(368, 368, 368)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(txNome, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btBuscarLivro, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel2) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addGap(16, 16, 16)) .addComponent(jSeparator1)) .addContainerGap()))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txNome, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btBuscarLivro, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) .addGap(26, 26, 26)) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public Soru1() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "public sinavlar2() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7320782", "0.72918797", "0.72918797", "0.72918797", "0.728645", "0.72498447", "0.7214492", "0.720934", "0.7197145", "0.71912014", "0.71852076", "0.7160113", "0.71487373", "0.70943654", "0.70820624", "0.7058153", "0.69883204", "0.6978216", "0.69558746", "0.6955715", "0.69455403", "0.6944223", "0.6936588", "0.6933016", "0.6929512", "0.6925853", "0.6925524", "0.6912182", "0.6912122", "0.6895022", "0.6894088", "0.68921435", "0.68919635", "0.6889464", "0.6884104", "0.6883508", "0.6882322", "0.6879773", "0.6876671", "0.68755716", "0.6872437", "0.6860746", "0.68575454", "0.6857284", "0.68563104", "0.6854648", "0.68544936", "0.68532896", "0.68532896", "0.68444484", "0.68380433", "0.6837678", "0.68299913", "0.6828643", "0.6828147", "0.6825278", "0.6823024", "0.68182456", "0.68178964", "0.681216", "0.6809752", "0.6809671", "0.6809534", "0.6808423", "0.6803337", "0.6794699", "0.67944574", "0.6793996", "0.6792107", "0.67904186", "0.67898226", "0.67888504", "0.6782858", "0.67673683", "0.67670184", "0.6765726", "0.6757476", "0.67573047", "0.6753978", "0.6752576", "0.674217", "0.67403704", "0.6738196", "0.67374873", "0.67351323", "0.6728453", "0.67277855", "0.6722282", "0.6716617", "0.67165154", "0.67154175", "0.6709239", "0.67077744", "0.6703873", "0.67028135", "0.6702373", "0.6700207", "0.67000616", "0.6695769", "0.6691885", "0.6690232" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904536", "0.78052336", "0.7766536", "0.7727363", "0.76318616", "0.7621916", "0.7584545", "0.7530609", "0.74878335", "0.74571276", "0.74571276", "0.7438656", "0.7422694", "0.7403604", "0.73918706", "0.7387049", "0.7379379", "0.73706305", "0.7362634", "0.7356091", "0.7345742", "0.7341655", "0.7330208", "0.73284286", "0.7325726", "0.7319205", "0.731691", "0.73137385", "0.7304247", "0.7304247", "0.73017776", "0.7298307", "0.72933966", "0.7286999", "0.7283511", "0.72811604", "0.72787315", "0.7259994", "0.7259994", "0.7259994", "0.72595567", "0.72595537", "0.72501904", "0.7224887", "0.7219672", "0.7217532", "0.72043973", "0.72010916", "0.7199519", "0.71928704", "0.71855384", "0.7177209", "0.71689284", "0.7167426", "0.715412", "0.71537405", "0.7135554", "0.7134872", "0.7134872", "0.7129713", "0.7129041", "0.71240187", "0.7123551", "0.7123167", "0.71221936", "0.71173894", "0.71173894", "0.71173894", "0.71173894", "0.71170884", "0.7116871", "0.7116271", "0.7114722", "0.7112311", "0.7109584", "0.7108896", "0.7105745", "0.70993924", "0.70979136", "0.7095834", "0.70936936", "0.70936936", "0.70863414", "0.7083095", "0.7081166", "0.70801973", "0.7073687", "0.7068324", "0.7061727", "0.7060408", "0.7060199", "0.7051346", "0.70376796", "0.70376796", "0.7035851", "0.70354784", "0.70354784", "0.7032029", "0.70307976", "0.70294225", "0.70193213" ]
0.0
-1
NOTE: This will (intentionally) not run as written so that folks copypasting have to think about how to initialize their Random instance. Initialization of the Random instance is outside the main scope of the question, but some decent options are to have a field that is initialized once and then reused as needed or to use ThreadLocalRandom (if using at least Java 1.7).
public static int randInt(int min, int max) { Random rand = new Random(); // nextInt is normally exclusive of the top value, // so add 1 to make it inclusive int randomNum = rand.nextInt((max - min) + 1) + min; return randomNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public synchronized Random getRandom() {\n\n if (_random == null) {\n synchronized (this) {\n if (_random == null) {\n // Calculate the new random number generator seed\n long seed = System.currentTimeMillis();\n long t1 = seed;\n char entropy[] = getEntropy().toCharArray();\n for (int i = 0; i < entropy.length; i++) {\n long update = ((byte) entropy[i]) << ((i % 8) * 8);\n seed ^= update;\n }\n try {\n // Construct and seed a new random number generator\n Class clazz = Class.forName(_randomClass);\n _random = (Random) clazz.newInstance();\n _random.setSeed(seed);\n } catch (Exception e) {\n // Can't instantiate random class, fall back to the simple case\n logger.error(\"Can't use random class : \" + _randomClass + \", fall back to the simple case.\", e);\n _random = new java.util.Random();\n _random.setSeed(seed);\n }\n // Log a debug msg if this is taking too long ...\n long t2 = System.currentTimeMillis();\n if ((t2 - t1) > 100)\n logger.debug(\"Delay getting Random with class : \" + _randomClass + \" [getRandom()] \" + (t2 - t1) + \" ms.\");\n }\n }\n }\n\n return (_random);\n\n }", "protected Random get_rand_value()\n {\n return rand;\n }", "public static void randomInit(int r) { }", "public RNGRandomImpl() {\n\t\tsetRand(new Random());\n\t}", "public static int randomNext() { return 0; }", "private void assuerNN_random() {\n //Check, if the variable is null..\n if (this.random == null) {\n //..and now create it.\n this.random = new Random(10);\n }\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "private Random getRandom()\n\t{\n\t\tif (this.random == null)\n\t\t{\n\t\t\t// Calculate the new random number generator seed\n\t\t\tlong seed = System.currentTimeMillis();\n\t\t\tlong t1 = seed;\n\t\t\tchar entropy[] = getEntropy().toCharArray();\n\t\t\tfor (int i = 0; i < entropy.length; i++)\n\t\t\t{\n\t\t\t\tlong update = ((byte) entropy[i]) << ((i % 8) * 8);\n\t\t\t\tseed ^= update;\n\t\t\t}\n\t\t\tthis.random = new java.util.Random();\n\t\t\tthis.random.setSeed(seed);\n\t\t}\n\n\t\treturn (this.random);\n\n\t}", "public RandomIA() {\n\t\trandom = new Random();\n\t}", "public void setRandom(Random r) {\n this.r = r;\n }", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public Random getRandomNumberGenerator() { return randomNumberGenerator; }", "public Random getRandom() {\n\t\treturn (rand);\n\t}", "private void random() {\n\n\t}", "private RandomData() {\n initFields();\n }", "protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "public static double random() {\r\n return uniform();\r\n }", "protected Random rng() {\r\n\t\tif (entity == null || entity.world == null) {\r\n\t\t\treturn rand;\r\n\t\t}\r\n\t\treturn entity.world.rand;\r\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public Element setToRandom() {\n this.value = Math.abs(ThreadSecureRandom.get().nextLong()) % field.order;\n\n return mod();\n }", "public static double rand() {\n return (new Random()).nextDouble();\n }", "public XorShiftRandom(final Random random) {\n\t\t\n\t\ttry {\n\t\t\tif(getSeed != null)\n\t\t\t\tsetSeed(((AtomicLong)XorShiftRandom.getSeed.get(random)).get());\n\t\t} catch(Throwable t) {\n\t\t\t;\n\t\t} finally {\n\t\t\tif(getSeed() == 0)\n\t\t\t\tsetSeed(System.nanoTime());\n\t\t}\n\t}", "public Rng() {\n\t\tr = new Random();\n\t}", "public Random getRandomGenerator() {\n return randomGenerator;\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "private SecureRandom getSecureRandom() {\n if (secureRandom == null)\r\n try {\r\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\r\n } catch (NoSuchAlgorithmException ex) {\r\n throw new RuntimeException(\"Could not obtain a SecureRandom instance\", ex);\r\n }\r\n return secureRandom;\r\n }", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "protected void initializeExecutionRandomness() {\r\n\r\n\t}", "public static int randomGet() { return 0; }", "public static int getRandom() \n\t{\n\t\treturn rGenerator.nextInt();\n\t}", "public long getSeed()\n {\n return randomSeed;\n }", "Randomizer getRandomizer();", "public XorShiftRandom() {\n\t\tthis(System.nanoTime());\n\t}", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "public interface Random {\n /**\n * @return positive random value below q\n */\n BigInteger nextRandom(BigInteger q);\n }", "public static ExtendedRandom getRandomGenerator()\n {\n lastGeneratorUsed = ( lastGeneratorUsed + 1 ) % instances.length;\n return instances[lastGeneratorUsed];\n }", "public GSRandom() {\r\n\t\t\r\n\t}", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "private static SecureRandomAndPad createSecureRandom() {\n byte[] seed;\n File devRandom = new File(\"/dev/urandom\");\n if (devRandom.exists()) {\n RandomSeed rs = new RandomSeed(\"/dev/urandom\", \"/dev/urandom\");\n seed = rs.getBytesBlocking(20);\n } else {\n seed = RandomSeed.getSystemStateHash();\n }\n return new SecureRandomAndPad(new SecureRandom(seed));\n }", "private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }", "public double getRandom(){\n\t\treturn random.nextDouble();\n\t}", "PermutationGenerator(Random random) {\n\t\tm_random = random;\n\t}", "SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }", "private int randomHelper() {\n\t\tRandom rand = new Random();\n\t\tint randomNum = rand.nextInt((10000 - 1) + 1) + 1;\n\t\treturn randomNum;\n\t}", "public static double random()\n {\n return _prng2.nextDouble();\n }", "private RandomLocationGen() {}", "public void setRNG(long seed);", "public NameGenerator() {\n this.rand = new Random();\n }", "public interface IRandomCore \n{\n /**\n * Set the seed of this random number generator, establishing a basis\n * for the sequence of values to be generated. Note that if two\n * IRandomCore instance of the same type receive the same seed, they\n * will generate identical sequences.\n *\n * @param seed the seed value\n */\n void setSeed(long seed);\n\n /**\n * Generate the next pseudo-random number of the sequence and to\n * return its low 'bits' bits, leaving all higher bits zero. \n * 'bits' must be in the range 1..32.\n *\n * @param bits the number of random bits, 1..32.\n * @return the next pseudorandom value from this random number generator's sequence.\n */\n int nextBits(int bits);\n}", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "public void SetRandom(boolean random);", "public void init() throws ServletException {\n modTime = System.currentTimeMillis()/1000*1000;\r\n for(int i=0; i<numbers.length; i++) {\r\n numbers[i] = randomNum();\r\n }\r\n }", "public RandomizedCollection() {\n map=new HashMap();\n li=new ArrayList();\n rand=new Random();\n }", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "public static int randomFastInt() {\n return ThreadLocalRandom.current().nextInt();\n }", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "public XorShiftRandom(final XorShiftRandom random) {\n\t\tthis(random.getSeed());\n\t}", "static public Long randomval() {\n Random rand = new Random();\n Long val = rand.nextLong() % p;\n return val;\n }", "public GridSimRandom(long seed, double lessFactorIO, double moreFactorIO,\n double lessFactorExec, double moreFactorExec)\n {\n random_.setSeed(seed);\n lessFactorIO_ = lessFactorIO;\n moreFactorIO_ = moreFactorIO;\n lessFactorExec_ = lessFactorExec;\n moreFactorExec_ = moreFactorExec;\n }", "RandomizedRarestFirstSelector(Random random) {\n this.random = random;\n }", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "static final int fast_rand()\n\t{\n\t\tRz = 36969 * (Rz & 65535) + (Rz >>> 16);// ((Rz >>> 16) & 65535);\n\t\tRw = 18000 * (Rw & 65535) + (Rw >>> 16);// ((Rw >>> 16) & 65535);\n\t\treturn (Rz << 16) + Rw;\n\t}", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public static int generateRandomNumber()\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt();\n\t}", "@Override\n\t\tTruerandomness newInstance() {\n\t\t\treturn null;\n\t\t}", "public int randomInt() {\n\t\t\t\t // NOTE: Usually this should be a field rather than a method\n\t\t\t\t // variable so that it is not re-seeded every call.\n\t\t\t\t Random rand = new Random();\n\t\t\t\t // nextInt is normally exclusive of the top value,\n\t\t\t\t // so add 1 to make it inclusive\n\t\t\t\t int randomNum = rand.nextInt();\n\t\t\t\t return randomNum;\n\t\t\t\t}", "public Randomizer()\r\n {\r\n }", "private synchronized static SecureRandom getSecureRandom()\n throws NoSuchAlgorithmException {\n if (secureRandom == null) {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n }\n return secureRandom;\n }", "@Test\n\tpublic void myRandomTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\n\t\tstart();\n\t\tint n = gui.myRandom(1, 1);\n\t\tassertTrue(n == 1);\n\n\t\tn = gui.myRandom(2, 2);\n\t\tassertTrue(n == 2);\n\n\t\tn = gui.myRandom(0, 0);\n\t\tassertTrue(n == 0);\n\t\t\n\t\tn = gui.myRandom(4, 4);\n\t\tassertTrue(n == 4);\n\n\t\tn = gui.myRandom(1000, 1001);\n\t\tassertTrue(n == 1000 || n == 1001);\n\t\t\n\t\t}\n\t}", "public void setRandom(boolean random){\n this.random = random;\n }", "public Random getAIRandom() {\n return freeColServer.getServerRandom();\n }", "public interface RandomSeed {\n\n\t/**\n\t * @return Uma semente randomica entre 0 e 1 inclusive.\n\t */\n\tpublic double getSeed();\n}", "@Override\n\tpublic void setToRandomValue(RandomGenerator a_numberGenerator) {\n\n\t}", "public static RandomNumberGenerator getInstance() {\n if (instance == null) {\n instance = new RandomNumberGenerator();\n }\n return instance;\n }", "public static int getRandomNumber(){\n int random = 0; // set variable to 0\r\n random = (int)(Math.random()*10) + 1; //generate random number between 1 and 10\r\n return random; //return random number\r\n }", "public RandomizedSet() {\r\n rehash(16, null);\r\n random = new Random();\r\n }", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public static double uniform() {\r\n return random.nextDouble();\r\n }", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "private Date randomDate() {\n int minDay = (int) LocalDate.of(2012, 1, 1).toEpochDay();\n int maxDay = (int) LocalDate.now().toEpochDay();\n int randomDay = minDay + intRandom(maxDay - minDay);\n LocalDate randomDate = LocalDate.ofEpochDay(randomDay);\n Date d = toDate(randomDate);\n return d;\n }", "protected static synchronized SecureRandom getRandom(String algo, String provider) throws Exception {\n // Given algo and provider, get SecureRandom instance\n if (random == null) {\n initializeRandom(algo, provider);\n }\n return random;\n }", "public abstract boolean isRandom();", "public abstract void randomize();", "public void setSecureRandom(SecureRandom rnd) {\n this.rnd = rnd;\n }", "public InternalExternalTour(long seed){\n\t\t\n\t\trandom = new MersenneTwister(seed);\n\t}", "public int generateRandom() {\n\t\tint random = (int)(Math.random()*((6-1)+1))+1;\n\t\treturn random;\n\t}", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "abstract Truerandomness newInstance();", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "public boolean isRandom(){\r\n\t\treturn isRandom;\r\n\t}", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "public static double uniform() {\n return random.nextDouble();\n }", "public void initialize(int strength, SecureRandom random) {\n mStrength = strength;\n mSecureRandom = random;\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "private void loadRandomState() {\n patternName = \"Random\";\n\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n\n generations = 0;\n }" ]
[ "0.7721465", "0.76324975", "0.7489444", "0.74800247", "0.74261093", "0.7288501", "0.72515255", "0.72016644", "0.71908575", "0.71207845", "0.71169925", "0.6981394", "0.6941824", "0.6897459", "0.6788762", "0.67847097", "0.6702028", "0.6692202", "0.6679088", "0.66762", "0.66319126", "0.65960217", "0.65632063", "0.6559355", "0.6548035", "0.65464014", "0.6529456", "0.64761925", "0.6452503", "0.64473015", "0.6442815", "0.642078", "0.64147437", "0.63908195", "0.6390212", "0.63670665", "0.6361229", "0.6356398", "0.6352224", "0.6331578", "0.63312775", "0.6310805", "0.63085276", "0.63033247", "0.6288156", "0.6265258", "0.62485355", "0.624802", "0.6247309", "0.6241959", "0.62305456", "0.6209561", "0.6202432", "0.6198046", "0.61879104", "0.6171555", "0.6140414", "0.6129922", "0.6129865", "0.6128379", "0.61282307", "0.6127856", "0.61275226", "0.6126748", "0.6122582", "0.6119639", "0.61016566", "0.60951763", "0.6091668", "0.60815334", "0.6080755", "0.60734904", "0.6069712", "0.60677034", "0.6065812", "0.60643214", "0.6061256", "0.60481507", "0.60462046", "0.6044934", "0.60347086", "0.60336775", "0.60321766", "0.60275424", "0.60264724", "0.60154474", "0.6011487", "0.5996294", "0.5995305", "0.5994263", "0.5993098", "0.5990643", "0.5988742", "0.5987923", "0.5987859", "0.59633434", "0.59533316", "0.59489554", "0.5943712", "0.5942117", "0.59412223" ]
0.0
-1
A utility function to create a new BST node
static Node newNode(int item) { Node temp = new Node(); temp.key = item; temp.left = temp.right = null; return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNode()\r\n\t{\r\n\t\tTreeNode first=new TreeNode(1);\r\n\t\tTreeNode second=new TreeNode(2);\r\n\t\tTreeNode third=new TreeNode(3);\r\n\t\tTreeNode fourth=new TreeNode(4);\r\n\t\tTreeNode fifth=new TreeNode(5);\r\n\t\tTreeNode sixth=new TreeNode(6);\r\n\t\tTreeNode seventh=new TreeNode(7);\r\n\t\tTreeNode eight=new TreeNode(8);\r\n\t\tTreeNode nine=new TreeNode(9);\r\n\t\troot=first;\r\n\t\tfirst.left=second;\r\n\t\tfirst.right=third;\r\n\t\tsecond.left=fourth;\r\n\t\tthird.left=fifth;\r\n\t\tthird.right=sixth;\r\n\t\tfifth.left=seventh;\r\n\t\tseventh.right=eight;\r\n\t\teight.left=nine;\r\n\t\t\r\n\t}", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "TNode createTNode();", "public void createBinaryTree()\r\n\t{\n\t\t\r\n\t\tNode node = new Node(1);\r\n\t\tnode.left = new Node(2);\r\n\t\tnode.right = new Node(3);\r\n\t\tnode.left.left = new Node(4);\r\n\t\tnode.left.right = new Node(5);\r\n\t\tnode.left.right.right = new Node(10);\r\n\t\tnode.left.left.left = new Node(8);\r\n\t\tnode.left.left.left.right = new Node(15);\r\n\t\tnode.left.left.left.right.left = new Node(17);\r\n\t\tnode.left.left.left.right.left.left = new Node(18);\r\n\t\tnode.left.left.left.right.right = new Node(16);\r\n\t\tnode.left.left.right = new Node(9);\r\n\t\tnode.right.left = new Node(6);\r\n\t\tnode.right.left.left = new Node(13);\r\n\t\tnode.right.left.left.left = new Node(14);\r\n\t\tnode.right.right = new Node(7);\r\n\t\tnode.right.right.right = new Node(11);\r\n\t\tnode.right.right.right.right = new Node(12);\r\n\t\troot = node;\r\n\t\t\r\n\t}", "public static Treenode createBinaryTree() {\n\t\tTreenode rootnode = new Treenode(40);\r\n\t\tTreenode r40 = new Treenode(50);\r\n\t\tTreenode l40 = new Treenode(20);\r\n\t\tTreenode r50 = new Treenode(60);\r\n\t\tTreenode l50 = new Treenode(45);\r\n\t\tTreenode r20 = new Treenode(30);\r\n\t\tTreenode l20 = new Treenode(10);\r\n\t\trootnode.right = r40;\r\n\t\trootnode.left = l40;\r\n\t\tr40.right=r50;\r\n\t\tr40.left = l50;\r\n\t\tl40.right=r20;\r\n\t\tl40.left=l20;\r\n\t\t r40.parent=rootnode; l40.parent= rootnode;\r\n\t\t r50.parent=r40;\r\n\t\tl50.parent=r40 ;\r\n\t\t r20.parent=l40;\r\n\t\t l20.parent=l40 ;\r\n\t\treturn rootnode;\r\n\t\t\r\n\t}", "void createBST(Node rootnode){ \n \n //Insert data into new bst, and then pass next nodes so they can be inserted. \n tree.insertNode(tree.ROOT, rootnode.data);\n \n if(rootnode.left != null){\n createBST(rootnode.left);\n }\n \n if(rootnode.right != null){\n createBST(rootnode.right);\n } \n }", "Node<X> make(Node<X> left, Node<X> right);", "void createNode(NodeKey key);", "static BTNode newNode(int k)\r\n{\r\n\tBTNode temp = new BTNode();\r\n temp.key = k;\r\n temp.left = temp.right = null;\r\n return temp;\r\n}", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "public BST() {\n\n }", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "public BST() {\n // DO NOT IMPLEMENT THIS CONSTRUCTOR!\n }", "public BST() {\n }", "static TreeNode newNode(int item) \n\t{ \n\t\tTreeNode temp = new TreeNode(); \n\t temp.key = item; \n\t temp.left = null; \n\t temp.right = null; \n\t return temp; \n\t}", "private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }", "private TreeNode createTree() {\n // Map<String, String> map = new HashMap<>();\n // map.put(\"dd\", \"qq\");\n // 叶子节点\n TreeNode G = new TreeNode(\"G\");\n TreeNode D = new TreeNode(\"D\");\n TreeNode E = new TreeNode(\"E\", G, null);\n TreeNode B = new TreeNode(\"B\", D, E);\n TreeNode H = new TreeNode(\"H\");\n TreeNode I = new TreeNode(\"I\");\n TreeNode F = new TreeNode(\"F\", H, I);\n TreeNode C = new TreeNode(\"C\", null, F);\n // 构造根节点\n TreeNode root = new TreeNode(\"A\", B, C);\n return root;\n }", "public static Node constructTree() {\n\n Node node2 = new Node(2, null, null);\n Node node8 = new Node(8, null, null);\n Node node12 = new Node(12, null, null);\n Node node17 = new Node(17, null, null);\n\n Node node6 = new Node(6, node2, node8);\n Node node15 = new Node(15, node12, node17);\n\n //Root Node\n Node node10 = new Node(10, node6, node15);\n\n return node10;\n }", "void createNode(String path);", "public BST(){\n\t\tthis.root = null;\n\t}", "private BTreeNode createNewRoot(BTreeNode rightChild) {\n BTreeNode newRoot = new BTreeNode(T_VAR);\n String key = getRoot().getKey(T_VAR - 1);\n newRoot.insert(key);\n newRoot.setChild(0, getRoot());\n newRoot.setChild(1, rightChild);\n newRoot.setLeaf(false);\n return newRoot;\n }", "static Node newNode(int key) \n{ \n\tNode node = new Node(); \n\tnode.left = node.right = null; \n\tnode.data = key; \n\treturn node; \n}", "void nodeCreate( long id );", "public Node insertByName(Node bstNode, String name, String sname, String no){\n\t\tif(bstNode == null){\n\t\t\tbstNode = new Node(name, sname, no);\n\t\t\tbstNode.setParent(parent);\n\t\t}\n\t\telse{\n\t\t\tparent = bstNode;\n\t\t\tif(name.compareTo(bstNode.getName())<0)\n\t\t\t\tbstNode.setLeft(insertByName(bstNode.getLeft(),name,sname,no));\t\t\n\t\t\t\n\t\t\telse\n\t\t\t\tbstNode.setRight(insertByName(bstNode.getRight(),name,sname,no));\n\t\t}\n\t\t\n\n\t\treturn bstNode;\n\t\t\n\t}", "public BST() {\r\n root = null;\r\n }", "public BST() {\n this.root = null;\n }", "public Node insertByNumber(Node bstNode, String name, String sname, String no){\n\t\tif(bstNode == null){\n\t\t\tbstNode = new Node(name, sname, no);\n\t\t\tbstNode.setParent(parent);\n\t\t}\n\t\telse{\n\t\t\tparent = bstNode;\n\t\t\tif(no.compareTo(bstNode.getNumber())<0)\n\t\t\t\tbstNode.setLeft(insertByNumber(bstNode.getLeft(),name,sname,no));\n\t\t\telse\n\t\t\t\tbstNode.setRight(insertByNumber(bstNode.getRight(),name,sname,no));\n\t\t}\n\t\treturn bstNode;\n\t\t\n\t}", "static Node BSTInsert(Node tmp,int key)\n {\n //if the tree is empty it will insert the new node as root\n \n if(tmp==null)\n {\n tmp=new Node(key);\n \n return tmp;\n }\n \n else\n \n rBSTInsert(tmp,key);\n \n \n return tmp;\n }", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "private BTNode insert(BTNode node, T data)\r\n {\r\n if (node == null)\r\n node = new BTNode(data);\r\n else\r\n {\r\n if (node.getLeft() == null)\r\n node.left = insert(node.left, data);\r\n else\r\n node.right = insert(node.right, data); \r\n }\r\n return node;\r\n }", "private static void treeInsert(String newItem) {\n if (root == null) {\n // The tree is empty. Set root to point to a new node containing\n // the new item. This becomes the only node in the tree.\n root = new TreeNode(newItem);\n return;\n }\n TreeNode runner; // Runs down the tree to find a place for newItem.\n runner = root; // Start at the root.\n while (true) {\n if (newItem.compareTo(runner.item) < 0) {\n // Since the new item is less than the item in runner,\n // it belongs in the left subtree of runner. If there\n // is an open space at runner.left, add a new node there.\n // Otherwise, advance runner down one level to the left.\n if (runner.left == null) {\n runner.left = new TreeNode(newItem);\n return; // New item has been added to the tree.\n } else\n runner = runner.left;\n } else {\n // Since the new item is greater than or equal to the item in\n // runner it belongs in the right subtree of runner. If there\n // is an open space at runner.right, add a new node there.\n // Otherwise, advance runner down one level to the right.\n if (runner.right == null) {\n runner.right = new TreeNode(newItem);\n return; // New item has been added to the tree.\n } else\n runner = runner.right;\n }\n } // end while\n }", "private static Node getTree()\r\n {\r\n Node node1 = new Node( 1 );\r\n Node node2 = new Node( 2 );\r\n Node node3 = new Node( 3 );\r\n Node node4 = new Node( 4 );\r\n Node node5 = new Node( 5 );\r\n Node node6 = new Node( 6 );\r\n Node node7 = new Node( 7 );\r\n\r\n node1.left = node2;\r\n node1.right = node3;\r\n\r\n node2.left = node4;\r\n node2.right = node5;\r\n\r\n node3.left = node6;\r\n node3.right = node7;\r\n return node1;\r\n }", "public Node createNode(int value) {\r\n\t\treturn new Node(value, null, null);\r\n\t}", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "private TreeNode createBBST(KeyValuePair[] sortedKVPArr) {\n\n if (sortedKVPArr == null || sortedKVPArr.length == 0) {\n return null;\n }\n\n int begin = 0;\n int end = sortedKVPArr.length;\n int mid = begin + (end - begin) / 2;\n\n KeyValuePair[] left = Arrays.copyOfRange(sortedKVPArr, begin, mid);\n KeyValuePair[] right = Arrays.copyOfRange(sortedKVPArr, mid + 1, end);\n\n TreeNode node = new TreeNode(sortedKVPArr[mid].getId(), sortedKVPArr[mid].getValue());\n\n if (left.length > 0)\n node.left = createBBST(left);\n if (right.length > 0)\n node.right = createBBST(right);\n\n this.root = node;\n\n return this.root;\n }", "private Node _insert(Node node, T value) {\n if (node == null) {\n node = new Node(null, null, value);\n }\n /**\n * If the value is less than the current node's value, choose left.\n */\n else if (value.compareTo(node.element) < 0) {\n node.left = _insert(node.left, value);\n }\n /**\n * If the value is greater than the current node's value, choose right.\n */\n else if (value.compareTo(node.element) > 0) {\n node.right = _insert(node.right, value);\n }\n /** \n * A new node is created, or\n * a node with this value already exists in the tree.\n * return this node\n * */\n return node;\n\n }", "protected TreeNode<T> createTreeNode(T value) {\n return new TreeNode<T>(this, value);\n }", "public Node insert(Key key, Value value) { \r\n // inserting into an empty tree results in a single value leaf node\r\n return new LeafNode(key,value);\r\n }", "public static TreeNode<Integer> createBST(int[] array) {\n return createBST(array, 0, array.length - 1);\n }", "private Node CreateTree() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tQueue<Node> q = new LinkedList<>();\n\t\tint item = sc.nextInt();\n\t\tNode nn = new Node();\n\t\tnn.val = item;\n\t\troot = nn;\n\t\tq.add(nn);\n\t\twhile (!q.isEmpty()) {\n\t\t\tNode rv = q.poll();\n\t\t\tint c1 = sc.nextInt();\n\t\t\tint c2 = sc.nextInt();\n\t\t\tif (c1 != -1) {\n\t\t\t\tNode node = new Node();\n\t\t\t\tnode.val = c1;\n\t\t\t\trv.left = node;\n\t\t\t\tq.add(node);\n\t\t\t}\n\t\t\tif (c2 != -1) {\n\t\t\t\tNode node = new Node();\n\t\t\t\tnode.val = c2;\n\t\t\t\trv.right = node;\n\t\t\t\tq.add(node);\n\t\t\t}\n\t\t}\n\n\t\treturn root;\n\n\t}", "private ITree.Node createNode(int i) {\n if (i < currentSize) {\n ITree.Node node = new ITree.Node(this.elements[i]);\n node.setLeftNode(createNode(this.leftChild(i)));\n node.setRightNode(createNode(this.rightChild(i)));\n\n return node;\n }\n return null;\n }", "public BST()\r\n\t{\r\n\t\troot = null;\r\n\t}", "public Node insertNode(K key, V value) {\n\t\tNode newNode = new Node(key, value);// first we need to create the new\n\t\t\t\t\t\t\t\t\t\t\t// node\n\t\tNode currentNode = this.getRoot();// then we move to the root ot the\n\t\t\t\t\t\t\t\t\t\t\t// tree that has called the method\n\t\tNode currentNodeParent = mSentinel;// the parent of the root is of\n\t\t\t\t\t\t\t\t\t\t\t// course sentinel\n\t\twhile (currentNode != mSentinel) {// and while the current node(starting\n\t\t\t\t\t\t\t\t\t\t\t// from the root) is not a sentinel\n\t\t\tcurrentNodeParent = currentNode;// then remember this node as a\n\t\t\t\t\t\t\t\t\t\t\t// parent\n\t\t\tif (key.compareTo(currentNode.getKey()) < 0) {// and appropriate its\n\t\t\t\tcurrentNode = currentNode.getLeftChild();// left\n\t\t\t} else {// or\n\t\t\t\tcurrentNode = currentNode.getrightChild();// right child as the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// next current node\n\t\t\t}\n\t\t}\n\t\t// we iterate through the described loop in order to get to the\n\t\t// appropriate place(in respect to the given key) where the new node\n\t\t// should be put\n\t\tnewNode.setParent(currentNodeParent);// we make the new node's parent\n\t\t\t\t\t\t\t\t\t\t\t\t// the last non empty node that\n\t\t\t\t\t\t\t\t\t\t\t\t// we've reached\n\t\tif (currentNodeParent == mSentinel) {\n\t\t\tmRoot = newNode;// if there is no such node then the tree is empty\n\t\t\t\t\t\t\t// and our node is actually going to be the root\n\t\t} else {\n\t\t\tif (key.compareTo(currentNodeParent.getKey()) < 0) {// otherwise we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// put our new\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node\n\t\t\t\tcurrentNodeParent.setLeftChild(newNode);// as a left\n\t\t\t} else { // or\n\t\t\t\tcurrentNodeParent.setrightChild(newNode);// right child of the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last node we've\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// reached\n\t\t\t}\n\t\t}\n\t\treturn newNode;\n\t}", "public void add(int value, String name){\n \n Node newNode = new Node(value, name); //Intialize new node \n \n if(root == null){ //If the root is null \n root = newNode; //Set newNode to the root \n }\n else{ \n Node myNode = root; //Create a second new node\n Node parent; //Crete a parent Node \n\n while (true) { //While true....\n \n parent = myNode;//Set parent node to myNode\n \n if (value < myNode.value) { //If the value is less than my node \n \n myNode = myNode.left; //Set myNode to left \n \n if (myNode == null) { //If the value of myNode is null \n \n parent.left = newNode; //Set the left parent node to newNode\n return; \n \n }\n }else {\n \n myNode = myNode.right; //Set myNode to the right Node\n \n if (myNode == null) {\n \n parent.right = newNode; //Set the right node to the newNode\n return;\n \n }\n\n }\n\n }\n \n }\n \n \n }", "public BST() {\n\t\troot = null;\n\t}", "static Node newNode(int key) {\n\t\tNode temp = new Node();\n\t\ttemp.key = key;\n\t\ttemp.left = temp.right = null;\n\t\treturn temp;\n\t}", "private static Node createNode(int value) {\n\t\treturn new Node(value);\n\t}", "public static TreeNode generateBinaryTree2() {\n // Nodes\n TreeNode root = new TreeNode(12);\n TreeNode rootLeft = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(3);\n TreeNode rootLeftLeftLeft = new TreeNode(1);\n TreeNode rootLeftLeftLeftLeft = new TreeNode(20);\n TreeNode rootRight = new TreeNode(5);\n // Edges\n root.left = rootLeft;\n rootLeft.left = rootLeftLeft;\n rootLeftLeft.left = rootLeftLeftLeft;\n rootLeftLeftLeft.left = rootLeftLeftLeftLeft;\n root.right = rootRight;\n\n // Return root\n return root;\n }", "static void insert(Node nd, int key)\n\t{\n\t\tif (nd == null) {\n\t\t\troot = new Node(key);\n\t\t\treturn;\n\t\t}\n\t\tQueue<Node> q = new LinkedList<Node>();\n\t\tq.add(nd);\n\n\t\t// Do level order traversal until we find an empty place\n\t\twhile (!q.isEmpty()) {\n\t\t\tnd = q.remove();\n\n\t\t\tif (nd.left == null) {\n\t\t\t\tnd.left = new Node(key);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tq.add(nd.left);\n\n\t\t\tif (nd.right == null) {\n\t\t\t\tnd.right = new Node(key);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tq.add(nd.right);\n\t\t}\n\t}", "private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }", "public void insertNode(int d){\n if(root == null){\n root = new TreeNode(d);\n }\n else{\n root.insert(d);\n }\n }", "public BTNode(int value){ \r\n node = value; \r\n leftleaf = null;\r\n rightleaf = null;\r\n }", "private void constructBSTree(Node<T> u, int n, String lr) {\n\t\tn++;\n\t\taddToPT(n, lr + \" \" + u.x.toString());\n\t\telements.add(u.x);\n\t\tif (u.left != nil)\n\t\t\tconstructBSTree(u.left, n, lr + \"L\");\n\t\tif (u.right != nil)\n\t\t\tconstructBSTree(u.right, n, lr + \"R\");\n\t}", "private void insert(RBNode<T> node) {\r\n RBNode<T> current = this.root;\r\n //need to save the information of parentNode\r\n //because need the parentNode to connect the new node to the tree\r\n RBNode<T> parentNode = null;\r\n\r\n //1. find the insert position\r\n while(current != null) {\r\n parentNode = current;//store the parent of current, because current is going to move\r\n int cmp = node.key.compareTo(current.key);\r\n if(cmp < 0)//if insert data is smaller than current data, then go into left subtree\r\n current = current.left;\r\n else//if insert data is bigger than or equal to current data, then go into right subtree\r\n current = current.right;\r\n }\r\n\r\n //find the position, let parentNode as the parent of newNode\r\n node.parent = parentNode;\r\n\r\n //2. connect newNode to parentNode\r\n if(parentNode != null) {\r\n int cmp = node.key.compareTo(parentNode.key);\r\n if(cmp < 0)\r\n parentNode.left = node;\r\n else\r\n parentNode.right = node;\r\n } else {\r\n //if parentNode is null, means tree was empty, let root = newNode\r\n this.root = node;\r\n }\r\n\r\n //3. fix the current tree to be a RBTree again\r\n insertFixUp(node);\r\n }", "public ThreadedTreeNode createThreadedBinaryTree()\n\t{\n\t\tThreadedTreeNode head=new ThreadedTreeNode();\n\t\tThreadedTreeNode a=new ThreadedTreeNode(80);\n\t\tThreadedTreeNode b=new ThreadedTreeNode(70);\n\t\tThreadedTreeNode c=new ThreadedTreeNode(90);\n\t\tThreadedTreeNode d=new ThreadedTreeNode(65);\n\t\tThreadedTreeNode e=new ThreadedTreeNode(75);\n\t\tThreadedTreeNode f=new ThreadedTreeNode(95);\n\t\tThreadedTreeNode g=new ThreadedTreeNode(85);\n\t\thead.left=a;\n\t\thead.right=head;\n\t\t\n\t\ta.left=b;\n\t\ta.right=c;\n\t\tb.left=d;\n\t\tb.right=e;\n\t\tc.left=g;\n\t\tc.right=f;\n\t\t//use empty links as threads\n\t\td.right=b;\n\t\td.rthread=1;\n\t\te.right=a;\n\t\te.rthread=1;\n\t\tg.right=c;\n\t\tg.rthread=1;\n\t\t\t\t\n\t\treturn head;\n\t\t\n\t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public static Node buildBNode(final String id) {\n\t\treturn NodeFactory.createAnon(AnonId.create(id));\n\t}", "public TreeNode(){ this(null, null, 0);}", "public void insertNode(T insertValue){\n if(root == null)\n root = new TreeNode<T>(insertValue);\n else\n root.insert(insertValue);\n }", "public BinarySearchTree() {}", "public static TreeNode buildTree() {\n\t\t\n\t\tTreeNode root = new TreeNode(1);\n\t\t\n\t\tTreeNode left = new TreeNode(2);\n\t\tleft.left = new TreeNode(4);\n\t\tleft.right = new TreeNode(5);\n\t\tleft.right.right = new TreeNode(8);\n\t\t\n\t\tTreeNode right = new TreeNode(3);\n\t\tright.left = new TreeNode(6);\n\t\tright.right = new TreeNode(7);\n\t\tright.right.left = new TreeNode(9);\n\t\t\n\t\troot.left = left;\n\t\troot.right = right;\n\t\t\n\t\treturn root;\n\t}", "public TreeNode insert(int value) {\n TreeNode newNode = new TreeNode(value);\n\n // CASE when Root Is NULL\n if (root == null) {\n this.root = newNode;\n } else {\n // CASE when Root is Not NULL\n TreeNode currentlyPointedNode = root;\n boolean keepWalking = true;\n\n while (keepWalking) {\n // CASE : Inserted Value BIGGER THAN Current Node's Value\n if (value >= currentlyPointedNode.value) {\n // CASE : current node's Right Child is NULL\n if (currentlyPointedNode.rightChild == null) {\n\n // If its null, just assigning the new node to the right place\n currentlyPointedNode.rightChild = newNode;\n keepWalking = false;\n\n } else {\n // CASE WHEN current node's Right Child is not null , we need to keep walking right\n currentlyPointedNode = currentlyPointedNode.rightChild;\n }\n } else {\n // CASE : Inserted Value SMALLER THAN Current Node's Value\n\n // CASE WHEN current node's LEFT Child is null\n if (currentlyPointedNode.leftChild == null) {\n\n // If its null, just assigning the new node to the right place\n currentlyPointedNode.leftChild = newNode;\n keepWalking = false;\n } else {\n // CASE WHEN current node's Right Child is not null , we need to keep walking right\n currentlyPointedNode = currentlyPointedNode.leftChild;\n }\n\n }\n }\n }\n\n return root;\n }", "public Node createNode(String p_name) {\n\t\tNode n = new Node(p_name, this);\n\t\taddNode(n);\n\t\treturn n;\n\t}", "public Node insertBST(Node node, Node add ){\n\t\tif(node==nil){\n\t\t\t//inserting the node at the correct position\n\t\t\treturn add;\n\t\t}\n\t\tif(add.id <node.id){\n\t\t\t//going to the left if the node to be inserted is smaller than the current node\n\t\t\tnode.left = insertBST(node.left,add);\n\t\t\t//pointing the node just inserted to its parent\n\t\t\tnode.left.parent = node;\n\t\t}else{\n\t\t\t//going right in case the node is equal or bigger\n\t\t\tnode.right = insertBST(node.right,add);\n\t\t\t//attaching the parent\n\t\t\tnode.right.parent = node;\n\t\t}\n\t\t\n\t\treturn node;\n\t}", "public NoArvore createBST(int start, int end) {\n\n if (start > end) {\n return null;\n }\n\n //Valor do meio do array que vai ser a raiz da arvore\n int mid = (start + end) / 2;\n NoArvore tree = new NoArvore(treeArray[mid]);\n\n //Constroi a sub avore esquerda\n tree.setEsquerda(createBST(start, mid - 1));\n\n //Constroi a sub arvore direita\n tree.setDireita(createBST(mid + 1, end));\n\n return tree;\n }", "public static TreeNode generateBinaryTree1() {\n // Nodes\n TreeNode root = new TreeNode(5);\n TreeNode rootLeft = new TreeNode(2);\n TreeNode rootRight = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(20);\n TreeNode rootLeftRight = new TreeNode(1);\n // Edges\n root.left = rootLeft;\n root.right = rootRight;\n rootLeft.left = rootLeftLeft;\n rootLeft.right = rootLeftRight;\n\n // Return root\n return root;\n }", "public BinaryTree(){}", "private Node insert(Node root, T element) {\n\t\tif (root == null)\n\t\t\troot = new Node(element);\n\t\t// left side\n\t\telse if (element.compareTo(root.element) < 0) {\n\t\t\troot.left = insert(root.left, element);\n\t\t\troot.left.parent = root;\n\t\t\t// right side\n\t\t} else if (element.compareTo(root.element) >= 0) {\n\t\t\troot.right = insert(root.right, element);\n\t\t\troot.right.parent = root;\n\t\t}\n\n\t\treturn root;\n\t}", "public BSTNode(K key) {\n this.key = key;\n this.left = null;\n this.right = null;\n this.height = 0;\n }", "private BinarySearchTree insert(BinarySearchTree currentNode, KeyedItem newItem){\r\n\t\t\r\n\t\t//create the object to return\r\n\t\tBinarySearchTree item = null;\r\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//If curretnNode is null, just add the item\r\n\t\t\tif(currentNode == null){\r\n\t\t\t\titem = new BinarySearchTree(newItem,null,null);\r\n\t\t\t\tcurrentNode = item;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//this > newItem\r\n\t\t\telse if( newItem.getKey().compareTo( currentNode.getRoot().getKey() ) < 0)\r\n\t\t\t{\r\n\t\t\t\tif (currentNode.getLeftChild() == null )\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentNode.attachLeftSubtree(new BinarySearchTree(newItem,null,null));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(currentNode.getLeftChild(), newItem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//this < newItem\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (currentNode.getRightChild() == null )\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentNode.attachRightSubtree(new BinarySearchTree(newItem,null,null));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(currentNode.getRightChild(), newItem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t//this exception will be thrown when we try to insert in a\r\n\t\t//blank tree. We wont be able to call getRoot() on a null\r\n\t\t//reference\r\n\t\t} catch (TreeException e) {\r\n\t\t\tcurrentNode.setRootItem(newItem);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\treturn item;\r\n\t}", "public static <E extends Comparable> TreeNode<E> insertNode(TreeNode<E> root, TreeNode<E> node) {\r\n TreeNode<E> newRoot = TreeNode.copy(root);\r\n \r\n TreeNode<E> parent = newRoot;\r\n \r\n while(true) {\r\n if(node.getValue().compareTo(parent.getValue()) < 0) {\r\n if(parent.getLeft() == null) {\r\n parent.setLeft(node);\r\n break;\r\n } else {\r\n parent.setLeft(TreeNode.copy(parent.getLeft()));\r\n parent = parent.getLeft();\r\n }\r\n } else {\r\n if(parent.getRight() == null) {\r\n parent.setRight(node);\r\n break;\r\n } else {\r\n parent.setRight(TreeNode.copy(parent.getRight()));\r\n parent = parent.getRight();\r\n }\r\n }\r\n }\r\n \r\n return newRoot; \r\n }", "public abstract GraphNode<N, E> createNode(N value);", "private TreeNode<K, V> put(TreeNode<K, V> node, K key, V value){\r\n \r\n // If the node is null, create a new node with the information\r\n // passed into the function\r\n if(node == null){\r\n return new TreeNode<>(key, value);\r\n }\r\n \r\n // Compare the keys recursively to find the correct spot to insert\r\n // the new node or if the key already exists\r\n if(node.getKey().compareTo(key) > 0){\r\n // If the current node has a value greater than our key, go left\r\n node.left = put(node.left, key, value);\r\n }\r\n else if(node.getKey().compareTo(key) < 0){\r\n // If the current node has a value less than our key, go right\r\n node.right = put(node.right, key, value);\r\n }\r\n else{\r\n // If the keys are equal, only update the value\r\n node.setValue(value);\r\n }\r\n \r\n // Return the updated or newly inserted node\r\n return node;\r\n }", "public BinaryTree(E item) {\n\t\troot = new TreeNode<E>(item);\n\t}", "public TreeNode build(LinkedList<String> l){\n String s = l.removeFirst();\n //Strings use equals() to compare value, \n //the \"==\" compares the adress that variable points to\n if(s.equals(\"null\")){\n return null;\n }\n else{\n //Integer.parseInt(String s) returns int, \n //Integer.valueOf(String s) returns Integer\n TreeNode node = new TreeNode(Integer.parseInt(s));\n node.left = build(l);\n node.right = build(l);\n return node;\n }\n }", "public static TreeNode insertIntoBST(TreeNode root, int val)\n{\n TreeNode droot = root;\n TreeNode par = find(droot, val, null);\n if(par==null)\n return par;\n if(par.val < val)\n par.right = new TreeNode(val);\n else\n par.left = new TreeNode(val);\n return root;\n}", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "TreeNode addChild(TreeNode node);", "protected TSTNode<E> getOrCreateNode(String key) throws NullPointerException, IllegalArgumentException {\n if(key == null) throw new NullPointerException(\"attempt to get or create node with null key\");\n if(key.length() == 0) throw new IllegalArgumentException(\"attempt to get or create node with key of zero length\");\n if(rootNode == null) rootNode = new TSTNode<E>(key.charAt(0), null);\n \n TSTNode<E> currentNode = rootNode;\n int charIndex = 0;\n while(true) {\n int charComp = compareCharsAlphabetically(key.charAt(charIndex), currentNode.splitchar);\n\n if (charComp == 0) {\n charIndex++;\n if(charIndex == key.length()) return currentNode;\n if(currentNode.relatives[TSTNode.EQKID] == null) currentNode.relatives[TSTNode.EQKID] = new TSTNode<E>(key.charAt(charIndex), currentNode);\n\t\tcurrentNode = currentNode.relatives[TSTNode.EQKID];\n } else if(charComp < 0) {\n if(currentNode.relatives[TSTNode.LOKID] == null) currentNode.relatives[TSTNode.LOKID] = new TSTNode<E>(key.charAt(charIndex), currentNode);\n currentNode = currentNode.relatives[TSTNode.LOKID];\n } else { \n // charComp must be greater than zero\n if(currentNode.relatives[TSTNode.HIKID] == null) currentNode.relatives[TSTNode.HIKID] = new TSTNode<E>(key.charAt(charIndex), currentNode);\n currentNode = currentNode.relatives[TSTNode.HIKID];\n }\n }\n }", "public BSTNode(E value) {\r\n\t\tthis.value = value;\r\n\t}", "public static TreeNode generateBinaryTree3() {\n // Nodes\n TreeNode root = new TreeNode(1);\n TreeNode rootLeft = new TreeNode(2);\n TreeNode rootLeftLeft = new TreeNode(3);\n TreeNode rootLeftLeftLeft = new TreeNode(4);\n TreeNode rootRight = new TreeNode(5);\n TreeNode rootRightRight = new TreeNode(6);\n TreeNode rootRightRightRight = new TreeNode(7);\n // Edges\n root.left = rootLeft;\n rootLeft.left = rootLeftLeft;\n rootLeftLeft.left = rootLeftLeftLeft;\n root.right = rootRight;\n rootRight.right = rootRightRight;\n rootRightRight.right = rootRightRightRight;\n\n // Return root\n return root;\n }", "private static Node buildSmallerTree() {\n\t\tNode root = createNode(10);\n\t\troot.leftChild = createNode(25);\n\t\troot.rightChild = createNode(25);\n\t\troot.leftChild.leftChild = createNode(13);\n\t\troot.rightChild.rightChild = createNode(7);\n\t\troot.leftChild.rightChild = createNode(27);\n\t\t\n\t\treturn root;\n\t}", "public Node insertBySName(Node bstNode, String name, String sname, String no){\n\t\tif(bstNode == null){\n\t\t\tbstNode = new Node(name, sname, no);\n\t\t\tbstNode.setParent(parent);\n\t\t}\n\t\telse{\n\t\t\tparent = bstNode;\n\t\t\tif(sname.compareTo(bstNode.getSurname())<0)\n\t\t\t\tbstNode.setLeft(insertBySName(bstNode.getLeft(),name,sname,no));\n\t\t\telse\n\t\t\t\tbstNode.setRight(insertBySName(bstNode.getRight(),name,sname,no));\n\t\t}\n\t\treturn bstNode;\n\t\t\n\t}", "public BSTree2(){\n root = null;\n }", "public static ASMTreeNode getOrCreateNode(DefaultTreeModel model, ClassNode classNode) {\n\t\tASMTreeNode root = (ASMTreeNode) model.getRoot();\n\t\tArrayList<String> dirPath = new ArrayList<String>(Arrays.asList(classNode.name.split(\"/\")));\n\t\tASMTreeNode genClass = generateTreePath(root, dirPath, classNode, model);\n\t\tif (genClass == null) {\n\t\t\tdirPath = new ArrayList<String>(Arrays.asList(classNode.name.split(\"/\")));\n\t\t\tgenClass = getTreePath(root, dirPath);\n\t\t}\n\t\treturn genClass;\n\t}", "public RBNode<T, E> createRBNode(T key, E value) {\r\n\t\tRBNode<T, E> tempRBNode = new RBNode<T, E>(key, value, 'r');\r\n\t\treturn tempRBNode;\r\n\t}", "static TreeNode insert(TreeNode node, int key) \n\t{ \n\t // if tree is empty return new node \n\t if (node == null) \n\t return newNode(key); \n\t \n\t // if key is less then or grater then \n\t // node value then recur down the tree \n\t if (key < node.key) \n\t node.left = insert(node.left, key); \n\t else if (key > node.key) \n\t node.right = insert(node.right, key); \n\t \n\t // return the (unchanged) node pointer \n\t return node; \n\t}", "public void testInsert01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\r\n\t\t// Growing the leaf\r\n\t\tbt.set(\"010\", 1);\r\n\t\tbt.set(\"020\", 2);\r\n\t\tbt.set(\"030\", 3);\r\n\t\tbt.set(\"040\", 4);\r\n\t\tassertEquals(bt.root.dump(), \"[010=1, 020=2, 030=3, 040=4]\");\r\n\r\n\t\t// Leaf split (middle) and new root created\r\n\t\tbt.set(\"025\", 5);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3, 040=4]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Leaf split (last) and new child added to root\r\n\t\tbt.set(\"050\", 6);\r\n\t\tbt.set(\"060\", 7);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3], [040=4, 050=6, 060=7]]\");\r\n\r\n\t\t// Growing the left of the right side of the tree\r\n\t\t// Leaf split (first) and new child added to root\r\n\t\tbt.set(\"035\", 8);\r\n\t\tbt.set(\"034\", 9);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[010=1, 020=2], [025=5, 030=3], [034=9, 035=8, 040=4], [050=6, 060=7]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Node split (last) and new root created\r\n\t\tbt.set(\"070\", 10);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[[010=1, 020=2], [025=5, 030=3]], [[034=9, 035=8, 040=4], [050=6, 060=7, 070=10]]]\");\r\n\r\n\t\t// Testing key update\r\n\t\tbt.set(\"010\", -1);\r\n\r\n\t\tassertEquals(bt.get(\"010\"), Integer.valueOf(-1));\r\n\t\tassertEquals(bt.get(\"020\"), Integer.valueOf(2));\r\n\t\tassertEquals(bt.get(\"030\"), Integer.valueOf(3));\r\n\t\tassertEquals(bt.get(\"040\"), Integer.valueOf(4));\r\n\t\tassertEquals(bt.get(\"025\"), Integer.valueOf(5));\r\n\t\tassertEquals(bt.get(\"050\"), Integer.valueOf(6));\r\n\t\tassertEquals(bt.get(\"060\"), Integer.valueOf(7));\r\n\t\tassertEquals(bt.get(\"035\"), Integer.valueOf(8));\r\n\t\tassertEquals(bt.get(\"034\"), Integer.valueOf(9));\r\n\t\tassertEquals(bt.get(\"070\"), Integer.valueOf(10));\r\n\t\tassertEquals(bt.get(\"xyz\"), null);\r\n\t}", "private BSTNode<T> insertHelper(BSTNode<T> node, T newData){\n\t\tif (node == null) {\n\t\t\tBSTNode<T> newNode = new BSTNode<T>(newData);\n\t\t\treturn newNode;\n\t\t} else if (newData.compareTo(node.getData()) < 0) {\n\t\t\tnode.setLeft(insertHelper(node.getLeft(), newData));\n\t\t} else {\n\t\t\tnode.setRight(insertHelper(node.getRight(), newData));\n\t\t}\n\t\treturn node;\n\t}", "public Node<E> createNode(E e, Position<E> parent){\n Node<E> p = (Node<E>) parent;\n return new Node<>(e, p);\n }", "private static Node insertNode(Node root, String[] arr) {\n\t\tFamilyTree f = new FamilyTree();\n\t\tif (root == null)\n\t\t\treturn root;\n\t\tif (root.data.trim().equalsIgnoreCase(arr[0].trim())) {\n\t\t\tif (root.left == null) {\n\t\t\t\troot.left = f.new Node(arr[1]);\n\t\t\t} else\n\t\t\t\troot.right = f.new Node(arr[1]);\n\t\t}\n\t\tinsertNode(root.left, arr);\n\t\tinsertNode(root.right, arr);\n\t\treturn root;\n\t}", "public TreeNode(T nodeData){\n data = nodeData;\n leftNode = rightNode = null;\n }", "private Node putHelper(Node n, K key, V value) {\n if (n == null) {\n n = new Node(key, value);\n } else if (key.compareTo(n.key) < 0) {\n n.leftChild = putHelper(n.leftChild, key, value);\n } else if (key.compareTo(n.key) > 0) {\n n.rightChild = putHelper(n.rightChild, key, value);\n }\n\n return n;\n }", "public Node(Word d) {\n data = d;\n left = null;\n right = null;\n }", "public static Node buildRandomTree() {\n\t\tNode root = createNode(15);\n\t\troot.leftChild = createNode(10);\n\t\troot.rightChild = createNode(4);\n\t\troot.leftChild.leftChild = createNode(25);\n\t\troot.leftChild.leftChild.rightChild = createNode(27);\n\t\troot.leftChild.leftChild.leftChild = createNode(13);\n\t\troot.leftChild.rightChild = createNode(25);\n\t\troot.leftChild.rightChild.rightChild = createNode(7);\n\t\t\n\t\treturn root;\n\t}", "public static TreeNode constructTreeNode(String testData) {\n\n if (testData == null || testData.equals(\"[]\")) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is null or empty\");\n return null;\n }\n\n if (testData.indexOf(\"[\") != 0 || testData.indexOf(\"]\") != testData.length()-1) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is invalid\");\n return null;\n }\n\n String data = testData.substring(1, testData.length()-1);\n String[] dataList = data.split(\",\");\n TreeNode[] nodeArray = new TreeNode[dataList.length];\n\n for (int i=0; i<dataList.length; i++) {\n if (!dataList[i].equals(\"null\")) {\n TreeNode node = new TreeNode(Integer.valueOf(dataList[i]));\n nodeArray[i] = node;\n }\n }\n\n // Construct binary tree\n // If the index of root = 0\n // The index of left of the node(index = m) is 2*m +1\n // If the index of root = 1\n // Then the index of left of the node(index = m) is 2*m -1\n\n for (int i=0; i<nodeArray.length; i++) {\n if (nodeArray[i] != null) {\n int indexOfLeft = i * 2 + 1;\n int indexOfRight = indexOfLeft + 1;\n\n if (indexOfLeft < nodeArray.length && nodeArray[indexOfLeft] != null) {\n nodeArray[i].left = nodeArray[indexOfLeft];\n }\n\n if (indexOfRight < nodeArray.length && nodeArray[indexOfRight] != null) {\n nodeArray[i].right = nodeArray[indexOfRight];\n }\n }\n }\n\n return nodeArray[0];\n }", "protected Node<T> insert(Node<T> node, Comparable<T> item)\r\n {\r\n // if current root has not been previously instantiated\r\n // instantiate a new Node with item added as the data\r\n if (node == null) {\r\n return new Node<T>(item); // when your node is null, insert at leaf\r\n }\r\n if (item.compareTo((T) node.data) < 0) {\r\n node.left = insert(node.left,item);\r\n }\r\n else {\r\n node.right = insert(node.right,item);\r\n }\r\n return node; // re-link the nodes\r\n }", "public Node<E> createNode(E e) {\n Node<E> nodeFromCache = getNodeFromCache();\n if (nodeFromCache == null) {\n return super.createNode(e);\n }\n nodeFromCache.setValue(e);\n return nodeFromCache;\n }", "private Node createNode(EventPair ep, Color c, Node parent) {\n Node node = new Node();\n node.ID = ep.ID;\n node.count = ep.count;\n node.color = c;\n node.left = createNullLeaf(node);\n node.right = createNullLeaf(node);\n node.parent = parent;\n return node;\n }" ]
[ "0.73112565", "0.70974", "0.70306057", "0.69228166", "0.69092876", "0.68762785", "0.67338467", "0.6607178", "0.66058", "0.6602263", "0.6595503", "0.65595806", "0.65486336", "0.65234697", "0.65085614", "0.6489009", "0.6480393", "0.6470412", "0.6435632", "0.642913", "0.63981974", "0.63888186", "0.63666093", "0.6356514", "0.6343254", "0.63384235", "0.6307435", "0.6304716", "0.6293758", "0.6272236", "0.6264645", "0.625196", "0.6224748", "0.6195774", "0.61941266", "0.61909854", "0.6186368", "0.6181712", "0.6170996", "0.61566246", "0.615191", "0.61483777", "0.6138258", "0.6137036", "0.61333704", "0.6130684", "0.61237377", "0.61120594", "0.61025697", "0.6101549", "0.60996675", "0.6088276", "0.608749", "0.6084823", "0.6077438", "0.6066996", "0.6065442", "0.6038194", "0.60345256", "0.6034181", "0.60210395", "0.601192", "0.60074335", "0.59967166", "0.5993918", "0.59921044", "0.59835684", "0.5973935", "0.5966826", "0.59593695", "0.59562844", "0.5955616", "0.59392715", "0.5930674", "0.5926028", "0.59176064", "0.5915239", "0.59113914", "0.59110385", "0.59052867", "0.59033775", "0.5895243", "0.5888644", "0.5878042", "0.58706695", "0.58671284", "0.5861116", "0.58537966", "0.58444154", "0.58422065", "0.5833469", "0.5829857", "0.58146435", "0.5807607", "0.5804361", "0.58000964", "0.57956797", "0.5777721", "0.5772205", "0.5771686" ]
0.6129005
46
A utility function to do inorder traversal of BST
static void inorder(Node root) { if (root != null) { inorder(root.left); System.out.print(root.key + " "); inorder(root.right); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inorder()\r\n {\r\n inorder(root);\r\n }", "public void inorder()\n {\n inorder(root);\n }", "public void inorder()\n {\n inorder(root);\n }", "private void inorder() {\n inorder(root);\n }", "private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}", "public static List<Node> inOrderTraversal(BinarySearchTree BST) {\n inorder = new LinkedList<Node>();\n inOrderTraversal(BST.getRoot());\n return inorder;\n }", "public void inorder()\n {\n inorderRec(root);\n }", "public void inorderTraverse(){\n\t\tinorderHelper(root);\n\t\tSystem.out.println();\n\t}", "public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void inOrderTraverseRecursive();", "private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}", "public ArrayList<K> inOrdorTraverseBST(){\n BSTNode<K> currentNode = this.rootNode;\n LinkedList<BSTNode<K>> nodeStack = new LinkedList<BSTNode<K>>();\n ArrayList<K> result = new ArrayList<K>();\n \n if (currentNode == null)\n return null;\n \n while (currentNode != null || nodeStack.size() > 0) {\n while (currentNode != null) {\n nodeStack.add(currentNode);\n currentNode = currentNode.getLeftChild();\n }\n currentNode = nodeStack.pollLast();\n result.add(currentNode.getId());\n currentNode = currentNode.getRightChild();\n }\n \n return result;\n }", "void inorderTraversal(Node node) {\n\t\tif (node != null) {\n\t\t\tinorderTraversal(node.left);\n\t\t\tSystem.out.print(node.data + \" \");\n\t\t\tinorderTraversal(node.right);\n\t\t}\n\t}", "public void inorderTraversal() {\n inorderThroughRoot(root);\n System.out.println();\n }", "private void inorderTraverse(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\tinorderTraverse(node.left); // walk trough left sub-tree\n\t\tthis.child.add(node);\n\t\tinorderTraverse(node.right); // walk trough right sub-tree\n\t}", "private void inorder(TreeNode<E> root) {\r\n\t\t\tif (root == null)\r\n\t\t\t\treturn;\r\n\t\t\tinorder(root.left);\r\n\t\t\tlist.add(root.element);\r\n\t\t\tinorder(root.right);\r\n\t\t}", "static void inorderTraversal(Node root) {\n if (root == null) {\n return;\n }\n inorderTraversal(root.left);\n System.out.print(root.data + \" \");\n inorderTraversal(root.right);\n }", "private void inorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n inorder(root.left);\n list.add(root.element);\n inorder(root.right);\n }", "public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }", "public static void inOrderTraverse(Node root) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tNode node = root;\n\t\twhile (node!=null || !stack.empty()) {\n if(node!=null){\n \t stack.push(node);\n \t node = node.lchild;\n }else{\n \t node = stack.pop();\n \t node.visit();\n \t node = node.rchild;\n }\n\t\t}\n\t}", "void inOrderTraversal(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tinOrderTraversal( node.left );\r\n\t\tSystem.out.print( node.value + \" \");\r\n\t\tinOrderTraversal( node.right );\r\n\t}", "public void inOrder(){\n inOrder(root);\n }", "public List < Integer > inorderTraversal(TreeNode root) {\n List < Integer > res = new ArrayList < > ();\n TreeNode curr = root;\n TreeNode pre;\n while (curr != null) {\n if (curr.left == null) {\n res.add(curr.val);\n curr = curr.right; // move to next right node\n } else { // has a left subtree\n pre = curr.left;\n while (pre.right != null) { // find rightmost\n pre = pre.right;\n }\n pre.right = curr; // put cur after the pre node\n TreeNode temp = curr; // store cur node\n curr = curr.left; // move cur to the top of the new tree\n temp.left = null; // original cur left be null, avoid infinite loops\n }\n }\n return res;\n }", "void inorder(Node root){\n if(root!=null){\n // checking if the tree is not empty\n inorder(root.left);\n System.out.print(root.data+\" \");\n inorder(root.right);\n }\n\n }", "private void inorderHelper(Node<E> root){\n\t\tif(root != null){\n\t\t\tinorderHelper(root.left);\n\t\t\tSystem.out.print(root.item.toString() + \" \");\n\t\t\tinorderHelper(root.right);\n\t\t}\n\t}", "public List<Integer> inorderTraversal2(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n TreeNode curr = root; // not necessary\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n while (true) {\n // inorder: left, root, right\n // add all left nodes into stack\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n } // curr == null\n // if stack is empty, then finished\n if (stack.isEmpty()) {\n break;\n }\n // all left nodes in stack\n // if right node empty, pop, else add right\n curr = stack.pop();\n // add left and root\n result.add(curr.val);\n // if right is null, then next round pop stack\n // else next round add right.left first ...\n curr = curr.right;\n }\n // stack is empty\n return result;\n }", "public void traverseInOrder() {\n\t System.out.println(\"============= BTREE NODES ===============\");\n\t\tinOrder(root);\n System.out.println(\"=========================================\");\n\t}", "public void inorderTraversal(Node root) {\r\n\t\tif(root != null) {\r\n\t\t\tinorderTraversal(root.leftChild);\r\n\t\t\tSystem.out.print(root.data + \" \");\r\n\t\t\tinorderTraversal(root.rightChild);\r\n\t\t}\r\n\t}", "void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }", "public void inOrder(Node myNode){\n \n if (myNode != null){ //If my node is not null, excute the following\n \n inOrder(myNode.left); //Recurse with left nodes\n System.out.println(myNode.name); //Print node name \n inOrder(myNode.right); //Recurse with right nodes\n \n }\n }", "static void inorderTraversal(Node tmp)\n {\n if(tmp!=null) {\n inorderTraversal(tmp.left);\n System.out.print(tmp.val+\" \");\n inorderTraversal(tmp.right);\n }\n \n \n \n }", "void inOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tinOrderTraversal(node.getLeftNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tinOrderTraversal(node.getRightNode());\n\t}", "private void inOrder(BSTNode node) {\r\n \r\n // if the node is NOT null, execute the if statement\r\n if (node != null) {\r\n \r\n // go to the left node\r\n inOrder(node.getLeft());\r\n \r\n // visit the node (increment the less than or equal counter)\r\n node.incrementLessThan();\r\n \r\n // go to the right node\r\n inOrder(node.getRight());\r\n }\r\n }", "public static void inorder(BSTNode root) {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tinorder(root.left);\n\t\t\tSystem.out.print(root.data + \" \");\n\t\t\tinorder(root.right);\n\t\t}\n\t}", "public void inOrder() {\r\n \r\n // call the private inOrder method with the root\r\n inOrder(root);\r\n }", "void inOrder(TreeNode node) \n { \n if (node == null) \n return; \n \n inOrder(node.left); \n System.out.print(node.val + \" \"); \n \n inOrder(node.right); \n }", "public void inOrderTraversal(TreeNode<T> root) {\n\t\tif (null == root) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tinOrderTraversal(root.getLeftChild());\n\t\t\tSystem.out.println(root);\n\t\t\tinOrderTraversal(root.getRightChild());\n\t\t}\n\t}", "public void inOrder() {\n inOrder(root);\n }", "public static void inorder(Node root){\n\n\t\tif(root != null){\n\t\t\tinorder(root.getLeft());\n\t\t\tSystem.out.println(root.toString());\n\t\t\tinorder(root.getRight());\n\t\t}\n\n\t}", "public void inOrderTraversal(Node node)\n\t{\n\t\tif(node!=null){\n\t\t\t\n\t\t\tinOrderTraversal(node.leftChild);\n\t\t\tarr.add(node.data);\n\t\t\tinOrderTraversal(node.rightChild);\n\t\t}\n\t}", "protected void inorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n inorder(root.left);\n System.out.print(root.element + \" \");\n inorder(root.right);\n }", "public void visitInorder(Visitor<T> visitor) { if (root != null) root.visitInorder(visitor); }", "public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n while (node != null || !stack.empty()) {\n // push left nodes into stack\n while (node != null) {\n stack.push(node);\n node = node.left;\n }\n node = stack.pop();\n result.add(node.val);\n // ! key step: invoke recursive call on node's right child\n node = node.right;\n }\n return result;\n }", "public void inorder(Node source) {\n inorderRec(source);\n }", "static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }", "void inorder(Node root) {\n\t\tboolean leftdone = false;\n\n\t\t// Start traversal from root\n\t\twhile (root != null) {\n\t\t\t// If left child is not traversed, find the\n\t\t\t// leftmost child\n\t\t\tif (!leftdone) {\n\t\t\t\twhile (root.left != null) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Print root's data\n\t\t\tSystem.out.print(root.data + \" \");\n\n\t\t\t// Mark left as done\n\t\t\tleftdone = true;\n\n\t\t\t// If right child exists\n\t\t\tif (root.right != null) {\n\t\t\t\tleftdone = false;\n\t\t\t\troot = root.right;\n\t\t\t}\n\n\t\t\t// If right child doesn't exist, move to parent\n\t\t\telse if (root.parent != null) {\n\t\t\t\t// If this node is right child of its parent,\n\t\t\t\t// visit parent's parent first\n\t\t\t\twhile (root.parent != null && root == root.parent.right)\n\t\t\t\t\troot = root.parent;\n\n\t\t\t\tif (root.parent == null)\n\t\t\t\t\tbreak;\n\t\t\t\troot = root.parent;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t}\n\t}", "private void recInOrderTraversal(BSTNode<T> node) {\n\t\tif (node != null) {\n\t\t\trecInOrderTraversal(node.getLeft());\n\t\t\ta.add(node.getData());\n\t\t\trecInOrderTraversal(node.getRight());\n\t\t}\n\t}", "private void inorderHelper(TreeNode<T> node){\n if(node == null)\n return;\n\n inorderHelper(node.leftNode);\n System.out.printf(\"%s \", node.data);\n inorderHelper(node.rightNode);\n }", "public static void main(String[] args) {\n\n\n TreeNode root = new TreeNode(1);\n TreeNode left1 = new TreeNode(2);\n TreeNode left2 = new TreeNode(3);\n TreeNode left3 = new TreeNode(4);\n TreeNode left4 = new TreeNode(5);\n TreeNode right1 = new TreeNode(6);\n TreeNode right2 = new TreeNode(7);\n TreeNode right3 = new TreeNode(8);\n TreeNode right4 = new TreeNode(9);\n TreeNode right5 = new TreeNode(10);\n root.left = left1;\n root.right = right1;\n left1.left = left2;\n left1.right = left3;\n left3.right = left4;\n right1.left = right2;\n right1.right = right3;\n right2.right = right4;\n right3.left = right5;\n //[3, 2, 4, 5, 1, 7, 9, 6, 10, 8]\n List<Integer> list = inorderTraversalN(root);\n System.err.println(list);\n }", "private static boolean inOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the current node, then finally the right child\n else {\n inOrderTraversal(current.getLeftChild());\n inorder.add(current);\n inOrderTraversal(current.getRightChild());\n }\n return true;\n }", "protected void inorder(TreeNode<E> root) {\r\n\t\tif (root == null)\r\n\t\t\treturn;\r\n\t\tinorder(root.left);\r\n\t\tSystem.out.print(root.element + \" \");\r\n\t\tinorder(root.right);\r\n\t}", "public static <T> void inorderIterative(TreeNode<T> root)\n {\n // create an empty stack\n Stack<TreeNode> stack = new Stack();\n\n // start from root node (set current node to root node)\n TreeNode curr = root;\n\n // if current node is null and stack is also empty, we're done\n while (!stack.empty() || curr != null)\n {\n // if current node is not null, push it to the stack (defer it)\n // and move to its left child\n if (curr != null)\n {\n stack.push(curr);\n curr = curr.left;\n }\n else\n {\n // else if current node is null, we pop an element from stack,\n // print it and finally set current node to its right child\n curr = stack.pop();\n System.out.print(curr.value + \" \");\n\n curr = curr.right;\n }\n }\n }", "public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}", "public static void main(String[] args) {\n\t\tTreeNode root = new TreeNode(1);\n\t\troot.right = new TreeNode(2);\n\t\t//root.left.left = new TreeNode(3);\n\t\t//root.left.right = new TreeNode(3);\n\t\troot.right.left = new TreeNode(3);\n\t\t//root.right.right = new TreeNode(3);\n\t\t\n\t\tSystem.out.println(inorderTraversal(root));\n\t}", "public void inOrderTravel(Node node) {\n\t\tif(node != null) {\r\n\t\t\tinOrderTravel(node.leftChild);\r\n\t\t\tSystem.out.println(node);\r\n\t\t\tinOrderTravel(node.rightChild);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "public List<Integer> inorderTraversalRecursive(TreeNode root) {\n if(root == null){\n return rst;\n }\n inorderTraversalRecursive(root.left);\n rst.add(root.val);\n inorderTraversalRecursive(root.right);\n return rst;\n }", "public static void main(String[] args) {\n\t\ttn=new TreeNode(null,null,null,1);\n\t\tTreeNode tleft=new TreeNode(tn,null,null,2);\n\t\tTreeNode tright=new TreeNode(tn,null,null,3);\n\t\ttn.left=tleft;\n\t\ttn.right=tright;\n\t\t\n\t\tTreeNode tleft1=new TreeNode(tleft,null,null,4);\n\t\tTreeNode tright1=new TreeNode(tleft,null,null,5);\n\t\ttleft.left=tleft1;\n\t\ttleft.right=tright1;\n\t\t\n\t\tTreeNode tleft2=new TreeNode(tright,null,null,6);\n\t\tTreeNode tright2=new TreeNode(tright,null,null,7);\n\t\ttright.left=tleft2;\n\t\ttright.right=tright2;\n\t\t\n\t\tTreeNode tleft3=new TreeNode(tleft1,null,null,8);\n\t\tTreeNode tright3=new TreeNode(tleft1,null,null,9);\n\t\ttleft1.left=tleft3;\n\t\ttleft1.right=tright3;\n\t\t\n\t\tTreeNode tleft4=new TreeNode(tright1,null,null,10);\n\t\tTreeNode tright4=new TreeNode(tright1,null,null,11);\n\t\ttright1.left=tleft4;\n\t\ttright1.right=tright4;\n\t\t\n\t\tSystem.out.println(inorderTraversal2(tn));\n\t}", "public void inorderTraversal() \n { \n inorderTraversal(header.rightChild); \n }", "static void inorder(TreeNode root, List<Integer> output) {\n if (root == null) {\n return;\n }\n inorder(root.left, output);\n output.add(root.val);\n inorder(root.right, output);\n }", "public void inOrderTraverseTree(Node focusNode) {\n if(focusNode != null) { // recursively traverse left child nodes first than right\n inOrderTraverseTree(focusNode.leftChild);\n\n System.out.println(focusNode); // print recursively inorder node (or return!)\n\n inOrderTraverseTree(focusNode.rightChild);\n\n }\n }", "private void inOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.inOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n\n\n if (right != null) {\n right.inOrderTraversal(sb);\n }\n }", "public void inOrder(){\n inOrder(root);\n System.out.println();\n }", "public Iterator<T> inorderIterator() { return new InorderIterator(root); }", "public void inOrderDepthFirstTraversal(NodeVisitor action){\n\t\tif(this.getElement()==null)\n\t\t\treturn;\n\t\t\n\t\tthis.left.inOrderDepthFirstTraversal(action);\n\t\taction.visit(this.getElement());\n\t\tthis.right.inOrderDepthFirstTraversal(action);\n\t}", "public static void inorder(TreapNode root)\n {\n if (root != null)\n {\n inorder(root.left);\n System.out.println(\"key: \" + root.key + \" priority: \" + root.priority);\n if (root.left != null){\n System.out.println(\"left child: \" + root.left.key);\n }\n if (root.right != null){\n System.out.println(\"right child: \" + root.right.key);\n }\n inorder(root.right);\n }\n }", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "private List<Node<T>> nodeInOrder (Node<T> curr, List<Node<T>> list) {\n if (curr == null) {\n return list;\n }\n nodeInOrder(curr.left, list);\n list.add(curr);\n nodeInOrder(curr.right, list);\n return list;\n }", "public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }", "public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }", "public static void main(String[] args){\n Node root = null;\n BinarySearchTree bst = new BinarySearchTree();\n root = bst.insert(root, 15);\n root = bst.insert(root, 10);\n root = bst.insert(root, 20);\n root = bst.insert(root, 25);\n root = bst.insert(root, 8);\n root = bst.insert(root, 12);\n // System.out.println(\"search result: \" + bst.is_exists(root, 12));\n // System.out.println(\"min value: \" + bst.findMinValue(root));\n // System.out.println(\"max value: \" + bst.findMaxValue(root));\n // System.out.println(\"level order traversal: \");\n // bst.levelOrderTraversal(root);\n // System.out.println(\"preorder traversal : \");\n // bst.preorderTraversal(root);\n // System.out.println(\"inorder traversal : \");\n // bst.inorderTraversal(root);\n // System.out.println(\"postorder traversal : \");\n // bst.postorderTraversal(root);\n // System.out.println(bst.isBinarySearchTree(root));\n // root = bst.deleteNode(root, 10);\n // bst.inorderTraversal(root); // result should be: 8 12 15 20 25\n System.out.println(bst.inorderSuccessor(root, 8)); // result should be: 10\n System.out.println(bst.inorderSuccessor(root, 15)); // result should be: 20\n System.out.println(bst.inorderSuccessor(root, 20)); // result should be: 25\n System.out.println(bst.inorderSuccessor(root, 25)); // result should be: null\n }", "public static void main(String[] args) {\n Node root = new Node(50);\n root.left =new Node(30);\n root.left.left =new Node(10);\n root.left.right =new Node(40);\n root.left.left.right =new Node(20);\n root.right =new Node(80);\n root.right.right =new Node(90); \n root.right.left =new Node(70);\n root.right.left.left=new Node(60);\n traversal(root);\n display(root);\n System.out.println();\n inorder(root);\n System.out.println();\n }", "void traverse2() {\n BTNode node = root, prev = null, next;\n while (node != null) {\n if (prev == node.parent) {\n if (node.left != null) {\n next = node.left;\n }\n else if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else if (prev == node.left) {\n if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else {\n next = node.parent;\n }\n prev = node;\n node = next;\n }\n }", "private void inOrder(BSTNode<K,V> node, List<Entry<K,V>> list) throws NullPointerException {\n\t\tif (root == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tif (root != null) {\n\t\t\t\n\t\t\tif (node.left != null) {\n\t\t\t\tinOrder(node.left, list);\n\t\t\t}\n\t\t\t\n\t\t\tlist.add(new Entry<K,V>(node.key, node.value));\n\t\t\t\n\t\t\tif (node.right != null) {\n\t\t\t\tinOrder(node.right, list);\t\n\t\t\t}\n\t\t\t}\n\t}", "public void preorder()\r\n {\r\n preorder(root);\r\n }", "void traverseInOrder(Node node){\n if (node != null) {\n traversePreOrder(node.left); // fokus left sampai dihabiskan, lalu right (berbasis sub-tree)\n System.out.println(\" \" + node.data);\n traversePreOrder(node.right);\n }\n }", "public static List<Node> preOrderTraversal(BinarySearchTree BST) {\n preorder = new LinkedList<Node>();\n preOrderTraversal(BST.getRoot());\n return preorder;\n }", "public void inOrder() {\r\n\t\tSystem.out.print(\"IN: \");\r\n\t\tinOrder(root);\r\n\t\tSystem.out.println();\r\n\t}", "private void treeInOrderTraversal(Node currNode) {\n int numChildren = getNumChildren();\n\n // Returns if currNode is null.\n if (currNode == null) return;\n\n // Adds this Node to the stack.\n queueStackAddAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores left subtree.\n for (int i = 0; i < numChildren / 2; ++i)\n treeInOrderTraversal(currNode.children[i]);\n\n // Highlights the current Node.\n queueNodeSelectAnimation(currNode, \"Current Node \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores right subtree.\n for (int i = numChildren / 2; i < numChildren; ++i)\n treeInOrderTraversal(currNode.children[i]);\n\n // Removes this Node from the stack.\n queueListPopAnimation(\"Finished exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }", "private void levelOrderTraversal() {\n\t\tif(root==null) {\n\t\t\tSystem.out.println(\"\\nBinary node is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tQueue<OO8BinaryTreeNode> queue = new LinkedList<OO8BinaryTreeNode>();\n\t\tqueue.add(root);\n\t\tOO8BinaryTreeNode currentNode = null;\n\t\twhile(!queue.isEmpty()) {\n\t\t\tcurrentNode=queue.remove();\n\t\t\tSystem.out.print(currentNode.getValue() + \" \");\n\t\t\tif(currentNode.getLeftNode()!=null)\n\t\t\t\tqueue.add(currentNode.getLeftNode());\n\t\t\tif(currentNode.getRightNode()!=null)\n\t\t\t\tqueue.add(currentNode.getRightNode());\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void visitInorder(Visitor<T> visitor) {\n if (left != null) left.visitInorder(visitor);\n visitor.visit(value);\n if (right != null) right.visitInorder(visitor);\n }", "private void inorder_traversal(Node n, int depth) {\n if (n != null) {\n inorder_traversal(n.left, depth + 1); //add 1 to depth (y coordinate) \n n.xpos = totalNodes++; //x coord is node number in inorder traversal\n n.ypos = depth; // mark y coord as depth\n inorder_traversal(n.right, depth + 1);\n }\n }", "public void preOrder(BinarySearchTreeNode<T> node)\r\n {\r\n if(node==null)\r\n {\r\n return;\r\n }\r\n System.out.println(node.getElement());\r\n preOrder(node.getLeft());\r\n preOrder(node.getRight());\r\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\troot=new Node10(5);\r\n\t\troot.left=new Node10(6);\r\n\t\troot.left.left=new Node10(3);\r\n\t\troot.right=new Node10(2);\r\n\t\t\r\n\t\tInorder(root);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Node root = new Node(1);\n\n Node left = new Node(2);\n left.left = new Node(4);\n left.right = new Node(3);\n\n Node right = new Node(5);\n right.left = new Node(6);\n right.right = new Node(7);\n\n root.left = left;\n root.right = right;\n\n Traversal traversal = new Traversal();\n traversal.preOrder(root);\n System.out.println();\n traversal.postOrder(root);\n System.out.println();\n traversal.inOrder(root);\n System.out.println();\n traversal.levelOrder(root);\n //System.out.println(checkBST(root));\n }", "private E[] getInOrderLeftSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "@Override\n public boolean checkForBinarySearchTree() {\n if (this.rootNode == null)\n return true;\n \n ArrayList<K> inorderTraverse = inOrdorTraverseBST();\n for (int i=1; i<inorderTraverse.size(); i++) {\n if(inorderTraverse.get(i-1).compareTo(inorderTraverse.get(i)) == 1)\n return false;\n }\n \n return true;\n }", "public static void inOrder(TreeNode node) {\n\t\tif(node == null) return;\n\t\t\t\n\t\tinOrder(node.left);\n\t\tSystem.out.print(node.value + \" \");\n\t\tinOrder(node.right);\t\n\t}", "public static void inOrder(Node root) {\n if (root == null)\n return;\n inOrder(root.left);\n System.out.print(root.data + \" \");\n inOrder(root.right);\n\n }", "private void inOrder(Node<T> node){\n if(node != null){\n inOrder(node.left);\n System.out.print(node.data + \" ,\");\n inOrder(node.right);\n }\n }", "private void inOrder(Node x) {\n if (x == null) {\n return;\n }\n inOrder(x.left);\n System.out.println(x.key);\n inOrder(x.right);\n }", "public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n inorderRec(root, result);\n return result;\n }", "public void inOrder(Node root) {\n if(root!=null) {\n inOrder(root.left);\n System.out.print(root.data + \" \");\n inOrder(root.right);\n }\n }", "public void InOrder() {\n\t\tInOrder(root);\n\t}", "public void preorderTraverse(){\n\t\tpreorderHelper(root);\n\t\tSystem.out.println();\n\t}", "void preOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tpreOrderTraversal(node.getLeftNode());\n\t\tpreOrderTraversal(node.getRightNode());\n\t}", "private List<T> inOrder(Node<T> curr, List<T> list) { //Time Complexity: O(n)\n if (curr == null) {\n return list;\n }\n inOrder(curr.left, list);\n list.add(curr.data);\n inOrder(curr.right, list);\n return list;\n }", "private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}", "private void traverseInOrder(BinaryNode<AnyType> curr) {\n\t\tif (curr.left != null) {\n\t\t\ttraverseInOrder(curr.left);\n\t\t}\n\t\tSystem.out.println(curr.element);\n\n\t\t// checking for duplicates\n\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraverseInOrder(curr.right);\n\t\t}\n\t}", "private static BinaryTreeNode<String> reconstructPreorderSubtree(\n List<String> inOrder,boolean left) {\n String subtreeKey=null;\n if(left && leftsubtreeldx>0) {\n subtreeKey = inOrder.get(leftsubtreeldx);\n --leftsubtreeldx;\n }\n if(!left && rightsubtreeldx<inOrder.size()){\n subtreeKey = inOrder.get(rightsubtreeldx);\n rightsubtreeldx++;\n }\n if (subtreeKey == null) {\n return null;\n }\n\n BinaryTreeNode<String> leftSubtree = reconstructPreorderSubtree(inOrder,true);\n BinaryTreeNode<String> rightSubtree = reconstructPreorderSubtree(inOrder,false);\n BinaryTreeNode bn=new BinaryTreeNode(subtreeKey, leftSubtree, rightSubtree);\n return bn;\n }" ]
[ "0.78557944", "0.76716846", "0.76716846", "0.760627", "0.756379", "0.74606323", "0.74202836", "0.7370048", "0.7351069", "0.7310717", "0.7266621", "0.7228449", "0.72112036", "0.72037566", "0.71787786", "0.7166969", "0.71584356", "0.7150216", "0.71344554", "0.7092105", "0.70795673", "0.70546263", "0.70230556", "0.7016907", "0.70076734", "0.6988584", "0.69839907", "0.6976727", "0.6956555", "0.69431835", "0.6924984", "0.6904883", "0.69026506", "0.68920964", "0.68874955", "0.6884239", "0.68771243", "0.68759185", "0.6867767", "0.684815", "0.6838423", "0.68224883", "0.6807483", "0.6795734", "0.6786745", "0.67727345", "0.6770985", "0.6768713", "0.67659354", "0.67505234", "0.67428315", "0.67059267", "0.6678398", "0.667352", "0.66013587", "0.65996027", "0.65857446", "0.6558453", "0.6546115", "0.65460706", "0.65309584", "0.65260524", "0.6525614", "0.6515114", "0.65048313", "0.65007657", "0.6486344", "0.6483797", "0.6482267", "0.6482267", "0.6464343", "0.6463812", "0.6458721", "0.6455145", "0.64419544", "0.6439258", "0.6437471", "0.6415483", "0.6410065", "0.64067245", "0.640414", "0.63925344", "0.6384515", "0.6371274", "0.6356151", "0.6355531", "0.63529944", "0.63490903", "0.6340598", "0.6319401", "0.63150305", "0.63128835", "0.63105273", "0.6294956", "0.6278889", "0.6275246", "0.6256929", "0.6243561", "0.6233978", "0.62253654" ]
0.6796293
43
A utility function to insert a new node with given key in BST
static Node insert(Node node, int key) { // If the tree is empty, return a new node if (node == null) return newNode(key); // Otherwise, recur down the tree if (key < node.key) node.left = insert(node.left, key); else node.right = insert(node.right, key); // Return the (unchanged) node pointer return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null){\n\t\t\tif (currentNode.getKey() == key){\n\t\t\t\tSystem.out.println(\"This value already exists in the tree!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\t// once we reached the bottom of the tree, we insert the new node.\n\t\t// to do that we need to know the leaf node which is stored in the BSTNode parent\n\t\t// by comparing with its value, we know which side to insert the new node.\n\t\tif (key < parent.getKey()){\n\t\t\tparent.setLeft(new BSTNode(key, null, null));\n\t\t}else{\n\t\t\tparent.setRight(new BSTNode(key, null, null));\n\t\t}\n\t\tsize++;\n\t}", "static TreeNode insert(TreeNode node, int key) \n\t{ \n\t // if tree is empty return new node \n\t if (node == null) \n\t return newNode(key); \n\t \n\t // if key is less then or grater then \n\t // node value then recur down the tree \n\t if (key < node.key) \n\t node.left = insert(node.left, key); \n\t else if (key > node.key) \n\t node.right = insert(node.right, key); \n\t \n\t // return the (unchanged) node pointer \n\t return node; \n\t}", "public void insert(int key){\n\t\tif(this.root == null){\n\t\t\tNode r = new Node(key);\n\t\t\tthis.root = r;\t\n\t\t}else{\n\t\t\t//if not recursively insert the node\n\t\t\trecInsert(this.root, key);\n\t\t}\n\t\treturn;\n\t}", "public Node insert(Node node, int key) {\n\t\tif (node == null)\n\t\t\treturn new Node(key);\n\n\t\t/* Otherwise, recur down the tree */\n\t\tif (key < node.data) {\n\t\t\tnode.left = insert(node.left, key);\n\t\t\tnode.left.parent = node;\n\t\t} else if (key > node.data) {\n\t\t\tnode.right = insert(node.right, key);\n\t\t\tnode.right.parent = node;\n\t\t}\n\n\t\t/* return the (unchanged) node pointer */\n\t\treturn node;\n\t}", "@Override\n public void insert(K key) {\n try {\n this.rootNode = insertNode(this.rootNode, key);\n } catch (DuplicateKeyException e) {\n System.out.println(e.getMessage());\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }", "static void insert(Node nd, int key)\n\t{\n\t\tif (nd == null) {\n\t\t\troot = new Node(key);\n\t\t\treturn;\n\t\t}\n\t\tQueue<Node> q = new LinkedList<Node>();\n\t\tq.add(nd);\n\n\t\t// Do level order traversal until we find an empty place\n\t\twhile (!q.isEmpty()) {\n\t\t\tnd = q.remove();\n\n\t\t\tif (nd.left == null) {\n\t\t\t\tnd.left = new Node(key);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tq.add(nd.left);\n\n\t\t\tif (nd.right == null) {\n\t\t\t\tnd.right = new Node(key);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tq.add(nd.right);\n\t\t}\n\t}", "public void insert(int key) {\n // Implement insert() using the non-recursive version\n // This function should call findClosestLeaf()\n\n if(root!=null){ // มี node ใน tree\n Node n = findClosestLeaf(key); //หา Leaf n ที่ใกล้ค่าที่ใส่มากที่สุด โดย call findClosestLeaf()\n\n\n if(n.key!= key){ // ค่าที่จะใส่ต้องไม่มีใน tree\n if(key > n.key){ // ค่าที่จะใส่มากกว่า Leaf n ให้ใส่เป็นลูฏของ Leaf ด้านขวา\n n.right = new Node(key);\n n.right.parent = n;\n }\n\n else { // ค่าที่จะใส่น้อยกว่า Leaf n ให้ใส่เป็นลูฏของ Leaf ด้านซ้าย\n n.left = new Node(key);\n n.left.parent = n;\n }\n }\n else\n {\n return;\n }\n\n }else{ // ไม่มี node ใน tree ดังนั้นค่าที่ใส่เข้ามาจะกลายเป็ฯ root\n root = new Node(key);\n }\n }", "public void insert(T key) {\r\n RBNode<T> node = new RBNode<>(key, RED, null, null, null);\r\n if(node != null)\r\n insert(node);\r\n }", "public void insert(int key)\n\t{\n\t\tTreeHeapNode newNode = new TreeHeapNode();\n\t\tnewNode.setKey(key);\n\t\tif(numNodes == 0) root = newNode;\n\t\telse\n\t\t{\n\t\t\t//find place to put newNode\n\t\t\tTreeHeapNode current = root;\n\t\t\tint n = numNodes+1;\n\t\t\tint k;\n\t\t\tint[] path = new int[n];\n\t\t\tint j = 0;\n\t\t\twhile(n >= 1)\n\t\t\t{\n\t\t\t\tpath[j] = n % 2;\n\t\t\t\tn /= 2;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t//find parent of new child\n\t\t\tfor(k = j-2; k > 0; k--)\n\t\t\t{\n\t\t\t\tif(path[k] == 1)\n\t\t\t\t\tcurrent = current.rightChild;\n\t\t\t\telse\n\t\t\t\t\tcurrent = current.leftChild;\n\t\t\t}\n\t\t\t//find which child new node should go into\n\t\t\t\n\t\t\tif(current.leftChild != null)\n\t\t\t{\n\t\t\t\tcurrent.rightChild = newNode;\n\t\t\t\tnewNode.isLeftChild = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcurrent.leftChild = newNode;\n\t\t\t\tnewNode.isLeftChild = true;\n\t\t\t}\n\t\t\tnewNode.parent = current;\n\t\t\t\n\t\t\ttrickleUp(newNode);\n\t\t}\n\t\tnumNodes++;\n\t}", "public void InsertNode(int key){\n boolean isRightChild = false;\n boolean isDuplicate = false;\n if(root == null){\n root = new Node(key);\n return;\n }\n Node temp = root;\n while(true){\n if(temp.value == key){\n isDuplicate = true ;\n break;\n }\n if(temp.value > key){\n if(temp.left == null){\n break;\n }\n temp = temp.left ;\n }\n if(temp.value < key){\n if(temp.right == null){\n isRightChild = true;\n break;\n }\n temp = temp.right ;\n }\n }\n if( !isDuplicate && isRightChild)\n temp.right = new Node(key);\n else if(!isDuplicate && !isRightChild)\n temp.left = new Node(key);\n else\n temp.count = temp.count + 1;\n }", "public void insert(Integer key){\r\n\t\tint start=this.root;\r\n\t\tint currentPos=avail;\r\n\t\tint temp=-1;\r\n\t\twhile(increaseCompares() && start!=-1) {\r\n\t\t\ttemp=start;\r\n\t\t\tcompares++;\r\n\t\t\tif(increaseCompares() && key<getKey(start)) {\r\n\t\t\t\tstart=getLeft(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstart=getRight(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Tree is empty. New Node is now root of tree\r\n\t\tif(increaseCompares() && temp==-1) {\r\n\t\t\tsetRoot(0);\r\n\t\t\tcompares++;\r\n\t\t\tsetKey(avail, key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\t//Compare values and place newNode either left or right of previous Node\r\n\t\telse if(increaseCompares() && key<getKey(temp)) {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetLeft(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetRight(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t}", "public void insert(int key)\n {\n root = insertRec(root,key);\n }", "@Override\n\tpublic BSTNode insert(int key, Object value) throws OperationNotPermitted {\n\n\t\tBSTNode p = searchByKey(key);\n\t\tBSTNode n;\n\n\t\tif (p == null) {\n\t\t\t// tree is empty, create new root\n\n\t\t\tn = createNode(key, value);\n\t\t\t_root = n;\n\t\t} else if (p.key == key) {\n\t\t\t// key exists, update payload\n\n\t\t\tn = p;\n\t\t\tn.value = value;\n\t\t} else {\n\t\t\t// key does not exist\n\n\t\t\tn = createNode(key, value);\n\t\t\tn.parent = p;\n\n\t\t\tif (p != null) {\n\t\t\t\tif (key < p.key) {\n\t\t\t\t\tp.left = n;\n\t\t\t\t} else {\n\t\t\t\t\tp.right = n;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tupdateSubtreeSizePath(n.parent);\n\t\t}\n\n\t\treturn n;\n\t}", "public void insert(TKey key, TValue data) {\n Node n = new Node(key, data, true); // nodes start red\n // normal BST insert; n will be placed into its initial position.\n // returns false if an existing node was updated (no rebalancing needed)\n boolean insertedNew = bstInsert(n, mRoot); \n if (!insertedNew) return;\n // check cases 1-5 for balance violations.\n checkBalance(n);\n }", "public static void insert(TreeNode root, int key) {\n\t\tcounter++;\r\n\r\n\t\t// key less than the value of root.\r\n\t\tif (key < root.item) {\r\n\t\t\tif (root.left == null) {\r\n\t\t\t\tTreeNode node = new TreeNode(null, key, null);\r\n\t\t\t\troot.left = node;\r\n\t\t\t} else {\r\n\t\t\t\tinsert(root.left, key);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (root.right == null) {\r\n\t\t\t\tTreeNode node = new TreeNode(null, key, null);\r\n\t\t\t\troot.right = node;\r\n\t\t\t} else {\r\n\t\t\t\tinsert(root.right, key);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}", "private TreeNode<K, V> put(TreeNode<K, V> node, K key, V value){\r\n \r\n // If the node is null, create a new node with the information\r\n // passed into the function\r\n if(node == null){\r\n return new TreeNode<>(key, value);\r\n }\r\n \r\n // Compare the keys recursively to find the correct spot to insert\r\n // the new node or if the key already exists\r\n if(node.getKey().compareTo(key) > 0){\r\n // If the current node has a value greater than our key, go left\r\n node.left = put(node.left, key, value);\r\n }\r\n else if(node.getKey().compareTo(key) < 0){\r\n // If the current node has a value less than our key, go right\r\n node.right = put(node.right, key, value);\r\n }\r\n else{\r\n // If the keys are equal, only update the value\r\n node.setValue(value);\r\n }\r\n \r\n // Return the updated or newly inserted node\r\n return node;\r\n }", "public TreeNode insert(TreeNode root, int key) {\n if (root == null) {\n root = new TreeNode(key);\n return root;\n }\n TreeNode cur = root, par = root;\n while (cur != null) {\n par = cur;\n if (cur.key == key) {\n return root;\n }\n if (key < cur.key) {\n cur = cur.left;\n } else {\n cur = cur.right;\n }\n }\n // this is when cur is null (out of the while)\n if (key < par.key) {\n par.left = new TreeNode(key);\n } else {\n par.right = new TreeNode(key);\n }\n \n return root;\n }", "public Node insert(Node node, int key) {\n\n //first we insert the key the same way as BST\n if (node == null)\n return (new Node(key));\n\n if (key < node.key)\n node.left = insert(node.left, key);\n else if (key > node.key){\n node.right = insert(node.right, key);\n }\n else\n return node;\n\n //updating the height of ancestor node\n node.height = 1 + max(height(node.left), height(node.right));\n\n //checking if the ancestor got imbalanced\n int balance = balance(node);\n\n // in case it's imbalanced we considar these 4 cases:\n if (balance > 1 && key < node.left.key)\n return rotateright(node);\n\n if (balance < -1 && key > node.right.key)\n return rotateleft(node);\n\n if (balance > 1 && key > node.left.key) {\n node.left = rotateleft(node.left);\n return rotateright(node);\n }\n\n if (balance < -1 && key < node.right.key) {\n node.right = rotateright(node.right);\n return rotateleft(node);\n }\n\n //returning the node\n return node;\n }", "void insert(K key, V value) {\r\n // binary search\r\n int correct_place = Collections.binarySearch(keys, key);\r\n int indexing;\r\n if (correct_place >= 0) {\r\n indexing = correct_place;\r\n } else {\r\n indexing = -correct_place - 1;\r\n }\r\n\r\n if (correct_place >= 0) {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n } else {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n }\r\n\r\n // to check if the node is overloaded then split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n }", "public HPTNode<K, V> insert(List<K> key) {\n check(key);\n init();\n int size = key.size();\n HPTNode<K, V> current = root;\n for (int i = 0; i < size; i++) {\n HPTNode<K, V> result = find(current, i, key.get(i), true);\n current.maxDepth = Math.max(current.maxDepth, size - i);\n current = result;\n }\n return current;\n }", "public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }", "public Node insert(int key, Node node) {\n\n\t\tif (node == null)\n\t\t\treturn getNewNode(key);\n\t\telse\n\t\t\tnode.next = insert(key, node.next);\n\n\t\treturn node;\n\t}", "public void insert(double key, Double value){\n\tif(search(key)!=null){\r\n\t\tLeaf Leaf = (Leaf)Search(root, key);\r\n\t\t\r\n\t\tfor(int i=0; i<Leaf.keyvalues.size(); i++) {\r\n\t\t\tif(key==Leaf.getKeyValue(i).getKey()) {\r\n\t\t\t\t\tLeaf.getKeyValue(i).values.add(value);\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tLeaf newleaf = new Leaf(key, value);\r\n\t\r\n\tPair<Double,Node> entry=new Pair<Double, Node>(key,newleaf);\r\n\r\n\tif(root == null ) {\r\n\t\troot = entry.getValue();\r\n\t}\r\n\t\r\n\r\n\tPair<Double, Node> newChildEntry = getChildEntry(root, entry, null);\r\n\t\r\n\tif(newChildEntry == null) {\r\n\t\treturn;\r\n\t} else {\r\n\t\tIntrnlNode newRoot = new IntrnlNode(newChildEntry.getKey(), root, newChildEntry.getValue());\r\n\t\troot = newRoot;\r\n\t\treturn;\r\n\t}\r\n}", "public TrieNode insert(Character key) {\n if (children.containsKey(key)) {\n return null;\n }\n\n TrieNode next = new TrieNode();\n next.key = key;\n children.put(key, next);\n\n return next;\n }", "public void insert(long key,BookObj book)\r\n\t{\r\n\t\t//go through node to insert\r\n\t\troot = insert(root,key,book);\r\n\t}", "public void insert(T key, U data){\n\t\t\n\t\tAVLNode<T, U> parent = null;\n\t\tAVLNode<T, U> node = this.root;\n\t\tAVLNode<T, U> newNode = new AVLNode<T, U>(key, data);\n\t\t\n\t\tthis.amountOfNodes++;\n\t\t\n\t\twhile(node != null){\n\t\t\tparent = node;\n\t\t\tif(newNode.getKey().compareTo(node.getKey()) < 0){\n\t\t\t\tnode = node.getLeft();\n\t\t\t}else{\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t}\n\t\t\n\t\tnewNode.setParent(parent);\n\t\t\n\t\tif(parent == null){ //It is the first element of the tree.\n\t\t\tthis.root = newNode;\n\t\t}else if(newNode.getKey().compareTo(parent.getKey()) < 0){\n\t\t\tparent.setLeft(newNode);\n\t\t}else{\n\t\t\tparent.setRight(newNode);\n\t\t}\n\t\tcomputeHeights(newNode);\n\t\tthis.balanceTree(parent);\n\t}", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }", "public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }" ]
[ "0.8243042", "0.8145469", "0.8047781", "0.79602426", "0.7956363", "0.7954034", "0.78246295", "0.7723745", "0.76931053", "0.7688253", "0.76563805", "0.7648608", "0.76455986", "0.7603818", "0.7601509", "0.7562444", "0.7526361", "0.7520497", "0.75100136", "0.7435141", "0.74349064", "0.7427743", "0.73981583", "0.7376437", "0.737275", "0.737194", "0.73667806", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352159", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157", "0.7352157" ]
0.8068873
2
Given a binary search tree and a key, this function deletes the key and returns the new root
static Node deleteNode(Node root, int k) { // Base case if (root == null) return root; // Recursive calls for ancestors of // node to be deleted if (root.key > k) { root.left = deleteNode(root.left, k); return root; } else if (root.key < k) { root.right = deleteNode(root.right, k); return root; } // We reach here when root is the node // to be deleted. // If one of the children is empty if (root.left == null) { Node temp = root.right; return temp; } else if (root.right == null) { Node temp = root.left; return temp; } // If both children exist else { Node succParent = root; // Find successor Node succ = root.right; while (succ.left != null) { succParent = succ; succ = succ.left; } // Delete successor. Since successor // is always left child of its parent // we can safely make successor's right // right child as left of its parent. // If there is no succ, then assign // succ->right to succParent->right if (succParent != root) succParent.left = succ.right; else succParent.right = succ.right; // Copy Successor Data to root root.key = succ.key; return root; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BinarySearchTree deleteTree(BinarySearchTree tree, Comparable key){\r\n\t\t\r\n\t\t//If it is a leaf\r\n\t\tif(tree.getLeftChild() == null && tree.getRightChild() == null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//Tree has only 1 leaf\r\n\t\telse if( (tree.getLeftChild() == null && tree.getRightChild() != null) ||\r\n\t\t\t\t (tree.getLeftChild() != null && tree.getRightChild() == null)){\r\n\t\t\t\r\n\t\t\t//Make a new tree out of the leaf and make it the new root\r\n\t\t\tif(tree.getLeftChild() != null){\r\n\t\t\t\treturn tree.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn tree.getRightChild();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Has two leaves. This case is slightly more complicated\r\n\t\telse{\r\n\t\t\t//get the leftmost item in the right child subtree. This becomes the \r\n\t\t\t//new root. This allows the BinarySearchTree to stay a valid \r\n\t\t\t//BinarySearchTree\r\n\t\t\tKeyedItem replacementItem = findLeftMost(tree.getRightChild());\r\n\t\t\t\r\n\t\t\t//Delete the tree with that item so it can be moved to the new root\r\n\t\t\tBinarySearchTree replacementTree = deleteLeftMost(tree.getRightChild());\r\n\t\t\t\r\n\t\t\t//change the root to the new item\r\n\t\t\ttree.setRootItem(replacementItem);\r\n\t\t\t\r\n\t\t\t//Set the new roots right tree to the replacement tree\r\n\t\t\ttree.attachRightSubtree(replacementTree);\r\n\t\t\treturn tree;\r\n\t\t}\r\n\t}", "public void delete(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null && currentNode.getKey() != key){\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\tif (currentNode == null){\n\t\t\tSystem.out.println(\"No such key is found in the tree\");\n\t\t\treturn;\n\t\t}\n\t\tif (currentNode.getLeft() == null && currentNode.getRight() == null){\n\t\t\t//Leaf Node\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(null);\n\t\t\t}else{\n\t\t\t\tparent.setLeft(null);\n\t\t\t}\n\t\t}else if (currentNode.getLeft() == null){\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(currentNode.getRight());\n\t\t\t}else{\n\t\t\t\tparent.setLeft(currentNode.getRight());\n\t\t\t}\n\t\t}else if(currentNode.getRight() == null){\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(currentNode.getLeft());\n\t\t\t}else{\n\t\t\t\tparent.setLeft(currentNode.getLeft());\n\t\t\t}\n\t\t}else{\n\t\t\t// this is case where this node has two children\n\t\t\tBSTNode node = currentNode.getLeft();\n\t\t\tBSTNode parentTemp = currentNode;\n\t\t\twhile (node.getRight() != null){\n\t\t\t\tparentTemp = node;\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t\t// switch the value with the target node we are deleting.\n\t\t\tcurrentNode.setKey(node.getKey());\n\t\t\t// remove this node but don't forget about its left tree\n\t\t\tparentTemp.setRight(node.getLeft());\n\t\t}\n\t}", "public void delete(K key)\r\n\t{\r\n\t\tif(search(key) == null) \r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root == null) \r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tBSTNode<E,K> node = root;\r\n\t\tBSTNode<E,K> child = null;\r\n\t\tBSTNode<E,K> parent1 = null;\r\n\t\tBSTNode<E,K> parent2 = null;;\r\n\t\tboolean Left = true;\r\n\t\tboolean Left2 = false;\r\n\t\tboolean found = false;\r\n\t\t\r\n\t\twhile(!found)\r\n\t\t{\r\n\t\t\tif(node.getKey().compareTo(key) == 0)\r\n\t\t\t{\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t\telse if(key.compareTo(node.getKey())<=-1)\r\n\t\t\t{\r\n\t\t\t\tif(node.getLeft() != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tparent1 = node;\r\n\t\t\t\t\tnode = node.getLeft();\r\n\t\t\t\t\tLeft = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(key.compareTo(node.getKey()) >= 1)\r\n\t\t\t{\r\n\t\t\t\tif(node.getRight() != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tparent1 = node;\r\n\t\t\t\t\tnode = node.getRight();\r\n\t\t\t\t\tLeft = false;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(node.getLeft() != null && node.getRight() != null)\r\n\t\t{\r\n\t\t\tchild = node.getRight();\r\n\t\t\tparent2 = node;\r\n\t\t\twhile(child.getLeft() != null)\r\n\t\t\t{\r\n\t\t\t\tparent2 = child;\r\n\t\t\t\tchild = child.getLeft();\r\n\t\t\t\tLeft2 = true;\r\n\t\t\t}\r\n\t\t\tif(Left2)\r\n\t\t\t{\r\n\t\t\t\tparent2.setLeft(child.getLeft());\t\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tparent2.setRight(child.getLeft());\r\n\t\t\t}\r\n\t\t\tchild.setLeft(node.getLeft());\r\n\t\t\tchild.setRight(node.getRight());\r\n\t\t}\r\n\t\telse if(node.getLeft() == null && node.getRight() != null)\r\n\t\t{\r\n\t\t child = node.getRight();\r\n\t\t}\r\n\t\telse if(node.getLeft() != null && node.getRight() == null)\r\n\t\t{\r\n\t\t\tchild = node.getLeft();\r\n\t\t}\r\n\t\telse if(node.getLeft() == null && node.getRight() == null)\r\n\t\t{\r\n\t\t\tif(Left)\r\n\t\t\t{\r\n\t\t\t\tparent1.setLeft(null);\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tparent1.setRight(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root == node)\r\n\t\t{\r\n\t\t\troot = child;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(Left) \r\n\t\t{\r\n\t\t\tparent1.setLeft(child);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tparent1.setRight(child);\r\n\t\t}\r\n\t}", "public TreeNode deleteNode1(TreeNode root, int key) {\n if (root == null) {\n return root;\n }\n\n // delete current node if root is the target node\n if (root.val == key) {\n // replace root with root->right if root->left is null\n if (root.left == null) {\n return root.right;\n }\n\n // replace root with root->left if root->right is null\n if (root.right == null) {\n return root.left;\n }\n\n // replace root with its successor if root has two children\n TreeNode p = findSuccessor(root);\n root.val = p.val;\n root.right = deleteNode1(root.right, p.val);\n return root;\n }\n if (root.val < key) {\n // find target in right subtree if root->val < key\n root.right = deleteNode1(root.right, key);\n } else {\n // find target in left subtree if root->val > key\n root.left = deleteNode1(root.left, key);\n }\n return root;\n }", "public Node deleteNode(Node root, int key) {\n if (root == null)\n return root;\n\n /* Otherwise, recur down the tree */\n if (key < root.data)\n root.left = deleteNode(root.left, key);\n else if (key > root.data)\n root.right = deleteNode(root.right, key);\n\n // if key is same as root's\n // key, then This is the\n // node to be deleted\n else {\n // node with only one child or no child\n if (root.left == null)\n return root.right;\n else if (root.right == null)\n return root.left;\n\n // node with two children: Get the inorder\n // successor (smallest in the right subtree)\n root.data = minValue(root.right);\n\n // Delete the inorder successor\n root.right = deleteNode(root.right, root.data);\n }\n\n return root;\n }", "public void delete(int key) {\n\n\n // There should be 6 cases here\n // Non-root nodes should be forwarded to the static function\n if (root == null) System.out.println(\"Empty Tree!!!\"); // ไม่มี node ใน tree\n else {\n\n Node node = find(key);\n\n if (node == null) System.out.println(\"Key not found!!!\"); //ไม่เจอ node\n\n\n else if(node == root){ //ตัวที่ลบเป็น root\n if (root.left == null && root.right == null) { //ใน tree มีแค่ root ตัสเดียว ก็หายไปสิ จะรอไร\n root = null;\n }\n else if (root.left != null && root.right == null) { //่ root มีลูกฝั่งซ้าย เอาตัวลูกขึ้นมาแทน\n root.left.parent = null;\n root = root.left;\n }\n else { //่ root มีลูกฝั่งขวา เอาตัวลูกขึ้นมาแทน\n Node n = findMin(root.right);\n root.key = n.key;\n delete(n);\n }\n\n }\n\n\n else { //ตัวที่ลบไม่ใช่ root\n delete(node);\n }\n }\n }", "public void delete(Key key) {\n\troot = delete(root, key);\t\n}", "Node deleteNode(Node root, int key) {\n if (root == null) {\n return root;\n }\n\n // If the key to be deleted is smaller than the root's key,\n // then it lies in left subtree\n if (key < root.key) {\n root.left = deleteNode(root.left, key);\n }\n\n // If the key to be deleted is greater than the root's key,\n // then it lies in right subtree\n else if (key > root.key) {\n root.right = deleteNode(root.right, key);\n }\n\n // if key is same as root's key, then this is the node\n // to be deleted\n else {\n\n // node with only one child or no child\n if ((root.left == null) || (root.right == null)) {\n Node temp = null;\n if (temp == root.left) {\n temp = root.right;\n } else {\n temp = root.left;\n }\n\n // No child case\n if (temp == null) {\n temp = root;\n root = null;\n } else // One child case\n {\n root = temp; // Copy the contents of the non-empty child\n }\n } else {\n\n // node with two children: Get the inorder successor (smallest\n // in the right subtree)\n Node temp = minValueNode(root.right);\n\n // Copy the inorder successor's data to this node\n root.key = temp.key;\n\n // Delete the inorder successor\n root.right = deleteNode(root.right, temp.key);\n }\n }\n\n // If the tree had only one node then return\n if (root == null) {\n return root;\n }\n\n // STEP 2: UPDATE HEIGHT OF THE CURRENT NODE\n root.height = max(height(root.left), height(root.right)) + 1;\n // STEP 3: GET THE BALANCE FACTOR OF THIS NODE (to check whether\n // this node became unbalanced)\n int balance = getBalance(root);\n\n // If this node becomes unbalanced, then there are 4 cases\n // Left Left Case\n if (balance > 1 && getBalance(root.left) >= 0) {\n return rightRotate(root);\n }\n\n // Left Right Case\n if (balance > 1 && getBalance(root.left) < 0) {\n root.left = leftRotate(root.left);\n return rightRotate(root);\n }\n\n // Right Right Case\n if (balance < -1 && getBalance(root.right) <= 0) {\n return leftRotate(root);\n }\n\n // Right Left Case\n if (balance < -1 && getBalance(root.right) > 0) {\n root.right = rightRotate(root.right);\n return leftRotate(root);\n }\n\n return root;\n }", "public void delete(Key key)\n\t{\n\t\troot=delete(root,key);\n\t}", "public static TreapNode deleteNode(TreapNode root, int key)\n {\n // base case: the key is not found in the tree\n if (root == null) {\n return null;\n }\n\n // if the key is less than the root node, recur for the left subtree\n if (key < root.data) {\n root.left = deleteNode(root.left, key);\n }\n\n // if the key is more than the root node, recur for the right subtree\n else if (key > root.data) {\n root.right = deleteNode(root.right, key);\n }\n\n // if the key is found\n else {\n // Case 1: node to be deleted has no children (it is a leaf node)\n if (root.left == null && root.right == null)\n {\n // deallocate the memory and update root to null\n root = null;\n }\n\n // Case 2: node to be deleted has two children\n else if (root.left != null && root.right != null)\n {\n // if the left child has less priority than the right child\n if (root.left.priority < root.right.priority)\n {\n // call `rotateLeft()` on the root\n root = rotateLeft(root);\n\n // recursively delete the left child\n root.left = deleteNode(root.left, key);\n }\n else {\n // call `rotateRight()` on the root\n root = rotateRight(root);\n\n // recursively delete the right child\n root.right = deleteNode(root.right, key);\n }\n }\n\n // Case 3: node to be deleted has only one child\n else {\n // choose a child node\n TreapNode child = (root.left != null)? root.left: root.right;\n root = child;\n }\n }\n\n return root;\n }", "public void deleteNode(int key){\n\t\t//System.out.println(\" in delete Node \");\n\t\tNode delNode = search(key);\n\t\tif(delNode != nil){\n\t\t\t//System.out.println(\" del \" + delNode.id);\n\t\t\tdelete(delNode);\n\t\t}else{\n\t\t\tSystem.out.println(\" Node not in RB Tree\");\n\t\t}\n\t}", "public boolean delete(Integer key){\n\n TreeNode parent=null;\n TreeNode curr=root;\n\n while (curr!=null && (Integer.compare(key,curr.data)!=0)){\n parent=curr;\n curr=Integer.compare(key,curr.data)>0?curr.right:curr.left;\n }\n\n if(curr==null){ // node does not exist\n\n return false;\n }\n\n TreeNode keyNode=curr;\n\n if(keyNode.right!=null){ //has right subtree\n\n // Find the minimum of Right Subtree\n\n TreeNode rKeyNode=keyNode.right;\n TreeNode rParent=keyNode;\n\n while (rKeyNode.left!=null){\n rParent=rKeyNode;\n rKeyNode=rKeyNode.left;\n }\n\n keyNode.data=rKeyNode.data;\n\n // Move Links to erase data\n\n if(rParent.left==rKeyNode){\n\n rParent.left=rKeyNode.right;\n }else{\n\n rParent.right=rKeyNode.right;\n }\n rKeyNode.right=null;\n\n }else{ // has only left subtree\n\n if(root==keyNode){ // if node to be deleted is root\n\n root=keyNode.left; // making new root\n keyNode.left=null; // unlinking initial root's left pointer\n }\n else{\n\n if(parent.left==keyNode){ // if nodes to be deleted is a left child of it's parent\n\n parent.left=keyNode.left;\n }else{ // // if nodes to be deleted is a right child of it's parent\n\n parent.right=keyNode.left;\n }\n\n }\n\n }\n return true;\n }", "public BSTNode delete(int key) {\n BSTNode node = (BSTNode)search(key); \n if (node != null) { \n \tif (node.getLeft() != null && node.getRight() != null) {\n \t\tBSTNode left = (BSTNode)max(node.getLeft()), leftParent = left.getParent();\n \t\treplace(node, left);\n \t\tif (left.getColor() == Color.BLACK) {\n \t\t\tif (node.getColor() == Color.RED)\n \t\t\t\tleft.setColor(Color.RED);\n \t\t\tif (leftParent != node) {\n \t\t\t\tif (leftParent.getRight() != null)\n \t\t\t\t\tleftParent.getRight().setColor(Color.BLACK);\n \t\t\t\telse\n \t\t\t\t\tadjustColorsRemoval(leftParent, false);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (left.getLeft() != null)\n \t\t\t\t\tleft.getLeft().setColor(Color.BLACK);\n \t\t\t\telse\n \t\t\t\t\tadjustColorsRemoval(left, true);\n \t\t\t}\n \t\t}\n \t\telse if (node.getColor() == Color.BLACK)\n \t\t\tleft.setColor(Color.BLACK);\n \t}\n \telse if (node.getLeft() == null && node.getRight() == null) {\n \tremove(node, null); \n \tif (root != null && node.getColor() == Color.BLACK)\n \t\tadjustColorsRemoval(node.getParent(), node.getKey() < node.getParent().getKey());\n }\n \telse if (node.getLeft() != null && node.getRight() == null) {\n \t\tremove(node, node.getLeft());\n \t\tnode.getLeft().setColor(Color.BLACK);\n \t}\n\t else {\n\t \tremove(node, node.getRight()); \n\t \tnode.getRight().setColor(Color.BLACK);\n\t }\n }\n return node;\n }", "public static TreapNode deleteNode(TreapNode root, int key)\n {\n if (root == null)\n return root;\n\n if (key < root.key)\n root.left = deleteNode(root.left, key);\n else if (key > root.key)\n root.right = deleteNode(root.right, key);\n\n // IF KEY IS AT ROOT\n\n // If left is null\n else if (root.left == null)\n {\n TreapNode temp = root.right;\n root = temp; // Make right child as root\n }\n\n // If Right is null\n else if (root.right == null)\n {\n TreapNode temp = root.left;\n root = temp; // Make left child as root\n }\n\n // If key is at root and both left and right are not null\n else if (root.left.priority < root.right.priority)\n {\n root = leftRotate(root);\n root.left = deleteNode(root.left, key);\n }\n else\n {\n root = rightRotate(root);\n root.right = deleteNode(root.right, key);\n }\n\n return root;\n }", "public void delete(Key key) {\n root = delete(root, key);\n }", "@Override\n public V remove(K key) {\n // just using a temp node to save the the .value of the removed node.\n Node saveRemove = new Node(null, null);\n root = removeHelper(key, root, saveRemove);\n return saveRemove.value;\n }", "public void delete(String key) throws KeyNotFoundException{\n Node N, P, S;\n if(findKey(root, key)==null){\n throw new KeyNotFoundException(\"Dictionary Error: delete() cannot delete non-existent key\");\n }\n N = findKey(root, key);\n if( N.left == null && N.right == null ){\n if( N == root ){\n root = null;\n }else{\n P = findParent(N, root);\n if( P.right == N ) P.right = null;\n else P.left = null;\n }\n }else if( N.right == null ){\n if( N == root ){\n root = N.left;\n }else{\n P = findParent(N, root);\n if( P.right == N ) P.right = N.left;\n else P.left = N.left;\n }\n }else if( N.left == null ){\n if( N == root ){\n root = N.right;\n }else{\n P = findParent(N, root);\n if( P.right == N ) P.right = N.right;\n else P.left = N.right;\n }\n }else{ // N.left != null && N.right != null\n S = findLeftmost(N.right);\n N.item.key = S.item.key;\n N.item.value = S.item.value;\n P = findParent(S, N);\n if( P.right == S ) P.right = S.right;\n else P.left = S.right; \n }\n numItems--;\n }", "Node deleteNode(Node root, int key) {\n\t\tif (root == null)\n\t\t\treturn root;\n\n\t\tif (key < root.data)\n\t\t\troot.left = deleteNode(root.left, key);\n\t\telse if (key > root.data)\n\t\t\troot.right = deleteNode(root.right, key);\n\t\telse {\n\n\t\t\t// if node to be deleted has 1 or 0 child\n\t\t\tif (root.left == null)\n\t\t\t\treturn root.right;\n\t\t\telse if (root.right == null)\n\t\t\t\treturn root.left;\n\n\t\t\t// Get the inorder successor (smallest\n\t\t\t// in the right subtree)\n\t\t\tNode minkey = minValueNode(root.right);\n\t\t\troot.data = minkey.data;\n\t\t\troot.right = deleteNode(root.right, minkey.data);\n\n\t\t}\n\n\t\t// now Balance tree operation perform just like we did in insertion\n\t\tif (root == null)\n\t\t\treturn root;\n\n\t\troot.height = max(height(root.left), height(root.right)) + 1;\n\n\t\tint balance = getBalance(root);\n\n\t\t// If this node becomes unbalanced, then there are 4 cases\n\t\t// Left Left Case\n\t\tif (balance > 1 && getBalance(root.left) >= 0)\n\t\t\treturn rightRotate(root);\n\n\t\t// Left Right Case\n\t\tif (balance > 1 && getBalance(root.left) < 0) {\n\t\t\troot.left = leftRotate(root.left);\n\t\t\treturn rightRotate(root);\n\t\t}\n\n\t\t// Right Right Case\n\t\tif (balance < -1 && getBalance(root.right) <= 0)\n\t\t\treturn leftRotate(root);\n\n\t\t// Right Left Case\n\t\tif (balance < -1 && getBalance(root.right) > 0) {\n\t\t\troot.right = rightRotate(root.right);\n\t\t\treturn leftRotate(root);\n\t\t}\n\n\t\treturn root;\n\t}", "private BSTnode<K> actualDelete(BSTnode<K> n, K key) {\n\t\tif (n == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (key.equals(n.getKey())) {\n\t\t\t// n is the node to be removed\n\t\t\tif (n.getLeft() == null && n.getRight() == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (n.getLeft() == null) {\n\t\t\t\treturn n.getRight();\n\t\t\t}\n\t\t\tif (n.getRight() == null) {\n\t\t\t\treturn n.getLeft();\n\t\t\t}\n\n\t\t\t// if we get here, then n has 2 children\n\t\t\tK smallVal = smallest(n.getRight());\n\t\t\tn.setKey(smallVal);\n\t\t\tn.setRight(actualDelete(n.getRight(), smallVal));\n\t\t\treturn n;\n\t\t}\n\n\t\telse if (key.compareTo(n.getKey()) < 0) {\n\t\t\tn.setLeft(actualDelete(n.getLeft(), key));\n\t\t\treturn n;\n\t\t}\n\n\t\telse {\n\t\t\tn.setRight(actualDelete(n.getRight(), key));\n\t\t\treturn n;\n\t\t}\n\t}", "@Override\n public void delete(K key){\n try {\n this.rootNode = deleteNode(this.rootNode, key);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }", "public BinarySearchTree deleteItem(BinarySearchTree curr, Comparable key) throws TreeException{\r\n\t\t\r\n\t\tBinarySearchTree temp = null;\r\n\t\t\r\n\t\t//Tree is empty, no item to delete\r\n\t\tif(root == null){\r\n\t\t\tthrow new TreeException(\"Tree is empty. Cannot delete key.\");\r\n\t\t}\r\n\t\t//The key is equal to the root item. we need to delete it\r\n\t\telse if(root.getKey().compareTo(key) == 0){\r\n\t\t\ttemp = deleteTree(this,key);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t\t//The key is less than the root item, recursive call til we find it\r\n\t\telse if(root.getKey().compareTo(key) > 0){\r\n\t\t\ttemp = deleteItem(curr.getLeftChild(),key);\r\n\t\t\tcurr.attachLeftSubtree(temp);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t\t//The key is grater than the root item, recursive call til we find it\r\n\t\telse{\r\n\t\t\ttemp = deleteItem(curr.getRightChild(),key);\r\n\t\t\tcurr.attachRightSubtree(curr);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t}", "public V remove(K key){\n\t\tV v=null;\n\t\tNode n=searchkey(root, key);\n\t\tif(n!=null)\n\t\t{v=n.value;}\n\t\troot =deletehelp(root, key);\n\t\t\n\t\treturn v;\n\t\t\n\t\t\n\t}", "public Tree<K, V> delete(K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\ttry {\n\t\t\t\tthis.key = left.max();\n\t\t\t\tthis.value = left.lookup(left.max());\n\t\t\t\tleft = left.delete(this.key); \n\t\t\t} catch (EmptyTreeException e) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.key = right.min();\n\t\t\t\t\tthis.value = right.lookup(right.min());\n\t\t\t\t\tright = right.delete(this.key);\n\t\t\t\t} catch (EmptyTreeException f) {\n\t\t\t\t\treturn EmptyTree.getInstance();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\tleft = left.delete(key);\n\t\t} else {\n\t\t\tright = right.delete(key);\n\t\t}\n\t\treturn this;\n\t}", "private BSTNode<K> deleteNode(BSTNode<K> currentNode, K key) throws IllegalArgumentException{ \n // if key is null, throw an IllegalArgumentException\n if (key == null) {\n throw new IllegalArgumentException(\"Please input a valid key\");\n }\n // if currentNode is null, return null\n if (currentNode == null) \n return currentNode; \n // otherwise, keep searching through the tree until meet the node with value key\n switch(key.compareTo(currentNode.getId())){\n case -1:\n currentNode.setLeftChild(deleteNode(currentNode.getLeftChild(), key));\n break;\n case 1:\n currentNode.setRightChild(deleteNode(currentNode.getRightChild(), key));\n break;\n case 0:\n // build a temporary node when finding the node that need to be deleted\n BSTNode<K> tempNode = null;\n // when the node doesn't have two childNodes\n // has one childNode: currentNode = tempNode = a childNode\n // has no childNode: currentNode = null, tempNode = currentNode\n if ((currentNode.getLeftChild() == null) || (currentNode.getRightChild() == null)) {\n if (currentNode.getLeftChild() == null) \n tempNode = currentNode.getRightChild(); \n else \n tempNode = currentNode.getLeftChild(); \n \n if (tempNode == null) {\n //tempNode = currentNode; \n currentNode = null; \n }\n else\n currentNode = tempNode;\n }\n // when the node has two childNodes, \n // use in-order way to find the minimum node in its subrighttree, called rightMinNode\n // set tempNode = rightMinNode, and currentNode's ID = tempNode.ID\n // do recursion to update the subrighttree with currentNode's rightChild and tempNode's Id\n else {\n BSTNode<K> rightMinNode = currentNode.getRightChild();\n while (rightMinNode.getLeftChild() != null)\n rightMinNode = rightMinNode.getLeftChild();\n \n tempNode = rightMinNode;\n currentNode.setId(tempNode.getId());\n \n currentNode.setRightChild(deleteNode(currentNode.getRightChild(), tempNode.getId()));\n }\n }\n // since currentNode == null means currentNode has no childNode, return null to its ancestor\n if (currentNode == null) \n return currentNode; \n // since currentNode != null, we have to update its balance\n int balanceValue = getNodeBalance(currentNode);\n if (balanceValue < -1) { // balanceValue < -1 means sublefttree is longer than subrighttree\n if (getNodeBalance(currentNode.getLeftChild()) < 0) { // Left Left Case \n return rotateRight(currentNode);\n }\n else if (getNodeBalance(currentNode.getLeftChild()) >= 0) { // Left Right Case \n currentNode.setLeftChild(rotateLeft(currentNode.getLeftChild()));\n return rotateRight(currentNode);\n }\n }\n else if (balanceValue > 1) { // balanceValue < -1 means subrighttree is longer than sublefttree\n if ((getNodeBalance(currentNode.getRightChild()) > 0)) { // Right Right Case \n return rotateLeft(currentNode);\n }\n else if ((getNodeBalance(currentNode.getRightChild()) <= 0)) {// Right Left Case \n currentNode.setRightChild(rotateRight(currentNode.getRightChild()));\n return rotateLeft(currentNode);\n }\n }\n return currentNode;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public boolean Delete(int v_key){\n\tTree current_node ;\n\tTree parent_node ;\n\tboolean cont ;\n\tboolean found ;\n\tboolean is_root ;\n\tint key_aux ;\n\tboolean ntb ;\n\n\tcurrent_node = this ;\n\tparent_node = this ;\n\tcont = true ;\n\tfound = false ;\n\tis_root = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left()){\n\t\t parent_node = current_node ;\n\t\t current_node = current_node.GetLeft() ;\n\t\t}\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right()){\n\t\t\tparent_node = current_node ;\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t }\n\t\t else cont = false ;\n\t\telse { \n\t\t if (is_root) \n\t\t\tif ((!current_node.GetHas_Right()) && \n\t\t\t (!current_node.GetHas_Left()) )\n\t\t\t ntb = true ;\n\t\t\telse \n\t\t\t ntb = this.Remove(parent_node,current_node); \n\t\t else ntb = this.Remove(parent_node,current_node);\n\t\t found = true ;\n\t\t cont = false ;\n\t\t}\n\t is_root = false ;\n\t}\n\treturn found ;\n }", "public Node deleteBST(Node root, int key) {\n if (root == null) {\n return root;\n }\n if (key < root.key) {\n root.left = deleteBST(root.left, key);\n } else if (key > root.key) {\n root.right = deleteBST(root.right, key);\n } // deletes the target key node\n else {\n // condition if node has only one child or no child\n if ((root.left == null) || (root.right == null)) {\n Node temp = null;\n if (temp == root.left) {\n temp = root.right;\n } else {\n temp = root.left;\n }\n\n // Condition if there's no child\n if (temp == null) {\n temp = root;\n root = null;\n // else if there's one child\n } else\n {\n root = temp;\n }\n } else {\n // Gets the Inorder traversal inlined with the node w/ two children\n Node temp = minNode(root.right);\n // Stores the inorder successor's node to this node\n root.key = temp.key;\n // Delete the inorder successor\n root.right = deleteBST(root.right, temp.key);\n }\n }\n // Condition if there's only one child then returns the root\n if (root == null) {\n return root;\n }\n // Gets the updated height of the BST\n root.height = maxInt(heightBST(root.left), heightBST(root.right)) + 1;\n int balance = getBalance(root); \n \n // If this node becomes unbalanced, then there are 4 cases \n // Left Left Case \n if (balance > 1 && getBalance(root.left) >= 0) \n return rightRotate(root); \n\n // Left Right Case \n if (balance > 1 && getBalance(root.left) < 0) \n { \n root.left = leftRotate(root.left); \n return rightRotate(root); \n } \n\n // Right Right Case \n if (balance < -1 && getBalance(root.right) <= 0) \n return leftRotate(root); \n\n // Right Left Case \n if (balance < -1 && getBalance(root.right) > 0) \n { \n root.right = rightRotate(root.right); \n return leftRotate(root); \n } \n return root;\n\n }" ]
[ "0.8245826", "0.7970906", "0.7815777", "0.7808195", "0.7788626", "0.77201253", "0.7659341", "0.75946796", "0.7545311", "0.75339717", "0.75014734", "0.75013244", "0.74929005", "0.74919933", "0.7461108", "0.74548256", "0.7392365", "0.73739505", "0.7348293", "0.73459846", "0.7331197", "0.73059464", "0.72860914", "0.72605777", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.72219795", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7221624", "0.7219837" ]
0.0
-1
TODO Autogenerated method stub
@Override protected IEfDeviceAlarmTargetDao getEntityDao() { return dao; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Parse the given file indicated from given script name and returns the generated query with its other information. Your script name would be the relative path from the script root directory, always having forward slashes (/). You should call this only if you are working with a script repository.
@CompileStatic public QScript parse(String scriptName) throws NyException { return parse(scriptName, EMPTY_MAP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String readSQLFile(String filename) {\n\t\tString query = null;\n\t\ttry (BufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(\n\t\t\t\t\t\tgetClass().getResourceAsStream(\"/sql/\" + filename + \".sql\")))) {\n\t\t\tList<String> lines = reader.lines().collect(Collectors.toList());\n\t\t\tquery = join(\" \", lines).replaceAll(\"\\\\s+\", \" \");\n\t\t} catch (IOException e) {\n\t\t\tString msg = \"Can't read SQL file \" + filename;\n\t\t\tlogger.error(msg, e);\n\t\t\tthrow new RuntimeException(msg, e);\n\t\t}\n\t\treturn query;\n\t}", "public String query(String filename)\n\t{\n\t\treturn filename;\n\t}", "public static Queries parseFile(File file) throws JAXBException {\n\t\tJAXBContext jc = JAXBContext.newInstance(\"com.insa.rila.xml.querie\");\n\t\tUnmarshaller u = jc.createUnmarshaller();\n\t\tObject o = u.unmarshal(file);\n\n\t\treturn (Queries) o;\n\t}", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }", "public String readQueryFile(String queryFileName) {\n assert queryFileName != null : \"queryFileName cannont be null\";\n StringBuilder queryBuilder = new StringBuilder();\n String query = null;\n InputStream input = null;\n\n try {\n input = new FileInputStream(queryFileName);\n List<String> queryLines = new ArrayList<>();\n queryLines.clear();\n queryLines.addAll(IOUtils.readLines(input));\n\n if (!queryLines.isEmpty()) {\n for (String queryLine : queryLines) {\n queryBuilder.append(queryLine).append(\"\\n\");\n }\n }\n\n } catch (FileNotFoundException ex) {\n //Logger.getLogger(OracleDAO.class.getName()).log(Level.SEVERE, null, ex);\n logger.error(queryFileName + \" could not be found\", ex);\n } catch (IOException ioe) {\n logger.error(\"There was a problem with the file \" + queryFileName, ioe);\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException ex) {\n logger.error(\"There was a problem with the file \" + queryFileName, ex);\n }\n }\n }\n\n //InputStream input = new URL(queryFileName).openStream();\n query = queryBuilder.toString();\n return query;\n }", "public String parse(File file);", "public static void parseScript(String inFile) {\r\n\t\tScanner in;\r\n\t\t\r\n\t\t// Create the resize visitor\r\n\t\tResizeVisitor rsv = new ResizeVisitor();\r\n\t\t// Set the text tree display (with decorators) as an observer to the resize visitor\r\n\t\trsv.attach(ttd);\r\n\t\t\r\n\t\t/*\r\n\t\t * Other visitor objects should also be created here instead of in the switch statement\r\n\t\t * I would have fixed this if I had more time\r\n\t\t * The program works the way it is now, but fixing this would have been better design\r\n\t\t */\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create scanner to read the script file\r\n\t\t\tin = new Scanner(new File(inFile));\r\n\t\t\tFileComponentBuilder fb;\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\tString[] command;\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tline = in.nextLine();\r\n\t\t\t\t\r\n\t\t\t\t// Print command to output file for clarity\r\n\t\t\t\tout.print('\\n' + fs.getCurrentDir().getName() + \"> \");\r\n\t\t\t\tout.println(line);\r\n\t\t\t\t\r\n\t\t\t\t// Read line from script and parse it\r\n\t\t\t\tcommand = line.split(\"\\\\s\");\r\n\t\t\t\t\r\n\t\t\t\t// All script commands must be accounted for in this switch statement\r\n\t\t\t\tswitch(command[0]) {\r\n\t\t\t\tcase \"mkdir\":\r\n\t\t\t\t\t// Uses builder pattern to create directory and proxy while hiding creation process\r\n\t\t\t\t\tfb = new DirectoryBuilder();\r\n\t\t\t\t\tfb.setParameters(fs, command);\r\n\t\t\t\t\tfs.getCurrentDir().add(fb.getFileComponent());\r\n\t\t\t\t\tout.println(\"Subdirectory \\\"\" + command[1] + \"\\\" created\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"create\":\r\n\t\t\t\t\t// Uses builder pattern to create file and proxy while hiding creation process\r\n\t\t\t\t\tfb = new FileBuilder();\r\n\t\t\t\t\tfb.setParameters(fs, command);\r\n\t\t\t\t\tfs.getCurrentDir().add(fb.getFileComponent());\r\n\t\t\t\t\tout.println(\"File \\\"\" + command[1] + \"\\\" created\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"cd\":\r\n\t\t\t\t\tif (command[1].contentEquals(\"..\")) {\r\n\t\t\t\t\t\t// cd ..\r\n\t\t\t\t\t\t// If at root (or in error situation where parent directory is null)\r\n\t\t\t\t\t\t// current directory will be set to the root\r\n\t\t\t\t\t\tfs.setDir(fs.getCurrentDir().getParent());\r\n\t\t\t\t\t\tif (fs.getCurrentDir() == null) {\r\n\t\t\t\t\t\t\tfs.setDir(fs.getRoot());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tout.println(\"Directory changed to \" + fs.getCurrentDir().getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// cd subdirectory\r\n\t\t\t\t\t\tFileComponent newDir = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\t\tif (newDir == null || newDir instanceof LeafFile) {\r\n\t\t\t\t\t\t\tout.println(command[1] + \" is not a valid directory\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tfs.setDir(newDir);\r\n\t\t\t\t\t\t\tout.println(\"Directory changed to \" + command[1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"del\":\r\n\t\t\t\t\tFileComponent delFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (delFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdelFile.accept(new DeleteVisitor());\r\n\t\t\t\t\t\tout.println(command[1] + \" deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"size\":\r\n\t\t\t\t\tFileComponent sizeFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (sizeFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSizeVisitor sv = new SizeVisitor();\r\n\t\t\t\t\t\tsizeFile.accept(sv);\r\n\t\t\t\t\t\tout.println(sv.getTotalSize());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"ls\":\r\n\t\t\t\t\tFileComponent lsFile = fs.getCurrentDir();\r\n\t\t\t\t\tif (command.length > 1) {\r\n\t\t\t\t\t\tlsFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (lsFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tLSVisitor lv = new LSVisitor();\r\n\t\t\t\t\t\tlsFile.accept(lv);\r\n\t\t\t\t\t\tfor (int i = 0; i < lv.getOutput().size(); i++) {\r\n\t\t\t\t\t\t\tif (lv.getOutput().get(i).length > 1) {\r\n\t\t\t\t\t\t\t\tout.println(lv.getOutput().get(i)[0] + \" \" + lv.getOutput().get(i)[1]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tout.println(lv.getOutput().get(i)[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"resize\":\r\n\t\t\t\t\tFileComponent ResizeFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (ResizeFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\trsv.setNewSize(Integer.parseInt(command[2]));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tResizeFile.accept(rsv);\r\n\t\t\t\t\t\tif (rsv.resizeSuccessful()) {\r\n\t\t\t\t\t\t\tout.println(\"Size of \" + command[1] + \" set to \" + command[2]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tout.println(command[1] + \" is not a valid file\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"exit\":\r\n\t\t\t\t\tfs.getRoot().accept(new ExitVisitor());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: out.println(command[0] + \" is not a valid command\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tin.close();\r\n\t\t\tSystem.out.println(\"Script read successfully\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error: could not read from script file\");\r\n\t\t}\r\n\t}", "public SqlFileParser(File sqlScript) {\n try {\n this.reader = new BufferedReader(new FileReader(sqlScript));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + sqlScript);\n }\n }", "void parseQueryFile(Path path, boolean hasFlag);", "public String getQuery(String queryName, String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getQuery\");\r\n\r\n\t\tgetQuerys(sqlFile);\r\n\r\n\t\tString query = querysMap.get(queryName);\r\n\r\n\t\tLOG.debug(querysMap.containsKey(queryName));\r\n\r\n\t\tLOG.info(\"\\nQuery [\" + query + \"]\");\r\n\r\n\t\treturn query;\r\n\t\t\r\n\t}", "public void parse(String filename);", "public static String SQLFromFile(String file) throws IOException{\n BufferedReader reader = new BufferedReader(new FileReader(file));\n StringBuilder sb = new StringBuilder();\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append(' ');\n }\n reader.close();\n return sb.toString();\n }", "public AnalysisMetadata parseFileToAnalysisMetadata(String filename) {\n\t\t\n\t\tAnalysisMetadata am = new AnalysisMetadata();\n\t\t\n\t\tRubyScript rs = new RubyScript(filename);\n\t\t\n\t\tam.setScript(rs);\n\t\t\t\t\n\t\tParameterDictionary pd = ParameterDictionary.emptyDictionary();\n\t\t\n\t\tParameter p = new Parameter(SCRIPT_FILENAME_PARAM, SCRIPT_FILENAME_PARAM, ParameterType.STRING_T, filename, null);\n\t\tpd.addParameter(p);\n\t\t\n\t\t\n\t\tam.setInputParameters(pd);\n\t\t\n\t\tScriptingContainer sc = new ScriptingContainer(org.jruby.embed.LocalContextScope.SINGLETHREAD, org.jruby.embed.LocalVariableBehavior.PERSISTENT);\n\t\tsc.setClassLoader(ij.IJ.getClassLoader());\n\t\tsc.put(\"parameters\", pd);\n\t\t\t\t\n\t\tsc.setCompatVersion(org.jruby.CompatVersion.RUBY1_9);\n\t\t\n\t\tsc.runScriptlet(this.getClass().getClassLoader().getResourceAsStream(SCRIPT_FUNCTIONS_FILE), SCRIPT_FUNCTIONS_FILE);\n\t\tsc.runScriptlet(rs.getScriptString());\n\t\t\n\t\tp = new Parameter(\"method_name\", \"method_name\", ParameterType.STRING_T, \"ScriptMethod\", null);\n\t\tpd.addIfNotSet(\"method_name\", p);\n\t\t\n\t\tam.setOutputParameters(new ParameterDictionary(pd));\n\t\t\n\t\treturn am;\n\t}", "public static void executeSQLScript(Connection conn, String file) throws Exception{\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\tBufferedInputStream bis=new BufferedInputStream(fis);\n\t\tStringBuffer sb=new StringBuffer(); \n\t\tbyte[] bytes=new byte[1024];\n\t\twhile (bis.available()!=0){\n\t\t\tint length=fis.read(bytes);\n\t\t\tif (length!=1024){\n\t\t\t\tbyte[] smallBytes=new byte[length];\n\t\t\t\tSystem.arraycopy(bytes,0,smallBytes,0,length);\n\t\t\t\tbytes=smallBytes;\n\t\t\t}\t\n\t\t\tsb.append(new String(bytes));\n\t\t}\n\t\tStringTokenizer st = new StringTokenizer(sb.toString(),\";\",false);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString token=st.nextToken().trim();\t\n\t\t\tif (!token.equals(\"\")){\n\t\t\t\tif (token.equalsIgnoreCase(\"commit\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\tDataAccessObject.rollback(conn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (token.equalsIgnoreCase(\"quit\")){\n\t\t\t\t\t//do nothing\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse if (token.substring(0,2).equals(\"--\")){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\texecuteSQLStatement(conn,token);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public SimpleDatabase executeSqlFile(SQLiteDatabase db, @RawRes int id) {\n Scanner scan = context.openInternalFileScanner(id);\n String query = \"\";\n if (logging) Log.d(\"SimpleDB\", \"start reading file\");\n int queryCount = 0;\n while (scan.hasNextLine()) {\n String line = scan.nextLine().trim();\n if (line.startsWith(\"--\") || line.isEmpty()) {\n continue;\n } else {\n query += line + \"\\n\";\n }\n\n if (query.endsWith(\";\\n\")) {\n if (logging) Log.d(\"SimpleDB\", \"query: \\\"\" + query + \"\\\"\");\n db.execSQL(query);\n query = \"\";\n queryCount++;\n }\n }\n if (logging) Log.d(\"SimpleDB\", \"done reading file\");\n if (logging) Log.d(\"SimpleDB\", \"performed \" + queryCount + \" queries.\");\n return this;\n }", "public void executeFile(String fileName) {\n String file = \"\";\r\n String lign;\r\n try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\r\n while ((lign = br.readLine()) != null) {\r\n file += \" \" + lign;\r\n }\r\n\r\n String[] commands = file.split(\";\");\r\n for (int i = 0; i < commands.length; i++) {\r\n executeUpdate(commands[i]);\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void loadClasspathCypherScriptFile(String cqlFileName) {\n StringBuilder cypher = new StringBuilder();\n try (Scanner scanner = new Scanner(Thread.currentThread().getContextClassLoader().getResourceAsStream(cqlFileName))) {\n scanner.useDelimiter(System.getProperty(\"line.separator\"));\n while (scanner.hasNext()) {\n cypher.append(scanner.next()).append(' ');\n }\n }\n\n new ExecutionEngine(this.database).execute(cypher.toString());\n }", "@Cacheable(value = \"cypherQueriesCache\", key = \"#name\", unless = \"#result != null\")\n private String loadCypher(String name) {\n\n try {\n logger.debug(\"Cypher query with name {} not found in cache, try loading it from file.\", name);\n\n ResourcePatternResolver resolver = ResourcePatternUtils.getResourcePatternResolver(this.resourceLoader);\n Resource[] queryFiles = resolver.getResources(\"classpath*:queries/*.cql\");\n\n for (Resource queryFile : queryFiles) {\n\n if (queryFile.getFilename().endsWith(name + QUERY_FILE_SUFFIX)) {\n\n logger.debug(\"Found query file with name {} in classpath.\", queryFile.getFilename());\n\n InputStream inputStream = queryFile.getInputStream();\n String cypher = StreamUtils.copyToString(inputStream, Charset.defaultCharset());\n\n return cypher;\n }\n }\n\n logger.warn(\"Query file with name {} not found in classpath.\", name + QUERY_FILE_SUFFIX);\n\n return null;\n } catch (IOException e) {\n throw new IllegalStateException(\"Invalid query file path.\", e);\n }\n }", "private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public void parse(String fileName) throws Exception;", "public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }", "@Override\n public String readFile(BufferedReader reader)\n {\n try\n {\n StringBuffer strLine = new StringBuffer();\n String line;\n\n while ((line = reader.readLine()) != null)\n {\n if (!line.startsWith(\"--\", 0))\n {\n strLine.append(line);\n\n // use ; as the command delimiter and execute the query on the database.\n if (line.endsWith(\";\"))\n {\n super.exeQuery(strLine.toString());\n strLine = new StringBuffer();\n }\n }\n }\n\n return strLine.toString();\n }\n catch (IOException ioex)\n {\n logger.error(\"Error reading contents from file.\");\n return null;\n }\n }", "public IAstSourceFile findIncludeFile(String string);", "private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was read, each line is one of the elements of the file_read_lines list\n //line 0 is keyword \"TELL\"\n //line 1 is the knowledge base\n //line 2 is the keyword \"ASK\"\n //line 3 is the query\n file_read_lines.add(spaceEscaped);\n }\n\n //generate list of Horn clauses (raw) from the KB raw sentence\n //replace \\/ by |\n String kbLine = file_read_lines.get(1).replace(\"\\\\/\", \"|\");\n rawClauses = Arrays.asList(kbLine.split(\";\"));\n //query - a propositional symbol\n query = file_read_lines.get(3);\n } catch (IOException e) {\n //Return error if file cannot be opened\n error = true;\n System.out.println(source_file.toString() + \" is not found!\");\n }\n }", "public IAstSourceFile findIncludeFile(ISourceFile file);", "String getSingleLinkerScriptFile();", "private File scanForScript(final File scriptPath, final RequestMethod verb) {\n File folder = scriptPath;\n File scriptFile = null;\n while(!folder.equals(scriptRoot)) {\n if(folder.exists() && folder.isDirectory()) {\n LOGGER.info(\"Scanning {} for script with verb {}\", scriptPath, verb);\n IOFileFilter fileFileFilter = FileFilterUtils.fileFileFilter();\n IOFileFilter prefixFileFilter = FileFilterUtils.prefixFileFilter(verb.name());\n File[] matchingFiles = folder.listFiles((FilenameFilter) FileFilterUtils.and(fileFileFilter, prefixFileFilter));\n if(matchingFiles != null && matchingFiles.length >= 1) {\n scriptFile = matchingFiles[0];\n break;\n }\n }\n folder = folder.getParentFile();\n }\n if(scriptFile == null) {\n LOGGER.error(\"Could not find script for verb {} on path {}\", verb.name(), scriptPath.getAbsolutePath());\n }\n return scriptFile;\n }", "private void performSearchUsingFileContents(File file) {\n try {\n FileUtility.CustomFileReader customFileReader =\n new FileUtility.CustomFileReader(file.getAbsolutePath()\n .replace(\".txt\", \"\"));\n\n String queryString = null; int i = 1;\n while ((queryString = customFileReader.readLineFromFile()) != null) {\n \t\n Query q = new QueryParser(Version.LUCENE_47, \"contents\",\n analyzer).parse(QueryParser.escape(queryString));\n\n collector = TopScoreDocCollector\n .create(100, true);\n searcher.search(q, collector);\n ScoreDoc[] hits = collector.topDocs().scoreDocs;\n\n Map<String, Float> documentScoreMapper =\n new HashMap<>();\n Arrays.stream(hits).forEach(hit ->\n {\n int docId = hit.doc;\n Document d = null;\n try {\n d = searcher.doc(docId);\n documentScoreMapper.put(d.get(\"path\"), hit.score);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n SearchResult searchResult =\n new SearchResult(String.valueOf(i), documentScoreMapper);\n\n FileUtility.writeToFile(searchResult, SEARCH_RESULT_DIR + File.separator + i);\n i++;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String[] getFile(String nomefile){\n\t\tFileReader doc = null;\n\t\ttry {\n\t\t\t doc = new FileReader(nomefile);\n\t\t\t String i;\n\t\t\t String Query_All=\"\";\n\t\t // apriamo lo stream di input...\n\t\t BufferedReader br=new BufferedReader(doc);\n\t // ...e avviamo la lettura del file con un ciclo\n\t\t do\n\t\t {\n\t\t i=br.readLine();\n\t\t if (i!=null)\n\t\t \t {\n\t\t \t \t//System.out.println(i);\n\t\t \t \tQuery_All += i;\n\t\t \t }\n\t\t }\n\t\t while (i!=null);\n\t\t String[] Query = Query_All.split(\";\");\n\t\t \n\t\t return Query;\n\t\t \n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t}", "public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }", "public void separateFileToQueries(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, File queriesFile, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath) {\n try {\n String allQueries = new String(Files.readAllBytes(Paths.get(queriesFile.getAbsolutePath())), Charset.defaultCharset());\n String[] allQueriesArr = allQueries.split(\"<top>\");\n\n for (String query : allQueriesArr) {\n if(query.equals(\"\")){\n continue;\n }\n String queryId = \"\", queryText = \"\", queryDescription = \"\";\n String[] lines = query.toString().split(\"\\n\");\n for (int i = 0; i < lines.length; i++){\n if(lines[i].contains(\"<num>\")){\n queryId = lines[i].substring(lines[i].indexOf(\":\") + 2);\n }\n else if(lines[i].contains(\"<title>\")){\n queryText = lines[i].substring(8);\n }\n else if(lines[i].contains(\"<desc>\")){\n i++;\n while(i < lines.length && !lines[i].equals(\"\")){\n queryDescription += lines[i];\n i++;\n }\n }\n }\n search(indexer, cityIndexer, ranker, queryText, withSemantic, chosenCities, citiesByTag, withStemming, saveInPath, queryId, queryDescription);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "public static String pickQueryFromResources(String migrateVersion) throws SQLException, APIManagementException, IOException {\n String databaseType = getDatabaseDriverName();\n String queryTobeExecuted = null;\n String resourcePath;\n\n if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_9)) {\n //pick from 18to19Migration/sql-scripts\n resourcePath = \"/18to19Migration/sql-scripts/\";\n\n } else if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_8)) {\n //pick from 17to18Migration/sql-scripts\n resourcePath = \"/17to18Migration/sql-scripts/\";\n } else if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_7)) {\n //pick from 16to17Migration/sql-scripts\n resourcePath = \"/16to17Migration/sql-scripts/\";\n } else {\n throw new APIManagementException(\"No query picked up for the given migrate version. Please check the migrate version.\");\n }\n\n if (!resourcePath.equals(\"\")) {\n InputStream inputStream;\n try {\n if (databaseType.equalsIgnoreCase(\"MYSQL\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"mysql.sql\");\n } else if (databaseType.equalsIgnoreCase(\"MSSQL\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"mssql.sql\");\n } else if (databaseType.equalsIgnoreCase(\"H2\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"h2.sql\");\n } else if (databaseType.equalsIgnoreCase(\"ORACLE\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"oracle.sql\");\n } else {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"postgresql.sql\");\n }\n\n queryTobeExecuted = IOUtils.toString(inputStream);\n\n } catch (IOException e) {\n throw new IOException(\"Error occurred while accessing the sql from resources. \" + e);\n }\n }\n return queryTobeExecuted;\n }", "public static final Document parse(final File f) {\r\n String uri = \"file:\" + f.getAbsolutePath();\r\n\r\n if (File.separatorChar == '\\\\') {\r\n uri = uri.replace('\\\\', '/');\r\n }\r\n\r\n return parse(new InputSource(uri));\r\n }", "public static List<SQLquery> updateQueryList() throws IOException {\n\n List<String> querynames = new ArrayList<String>();\n List<SQLquery> queries = new ArrayList<SQLquery>();\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n\n for (int i = 0; i <= fileNames.length - 1; i++) {\n\n /**\n * SELECT ONLY .XYZ FILES FROM FOLDER\n */\n System.out.println(fileNames[i]);\n if (fileNames[i].contains(\".xyz\")) {\n\n querynames.add(fileNames[i]);\n\n }\n\n }\n\n /**\n * create SQLquery objects with appropriate name and query string\n */\n for ( String querypath : querynames ) {\n\n String content = new String(Files.readAllBytes(Paths.get(querypath)));\n SQLquery newquery = new SQLquery(querypath.replace(\".xyz\",\"\"),content);\n queries.add(newquery);\n\n }\n\n /**\n * return query list\n */\n return queries;\n\n }", "public List<String> parse() {\n String line = null;\n int lineCounter = 0;\n StringBuilder statement = new StringBuilder();\n List<String> statements = new LinkedList<String>();\n Pattern commentPattern = Pattern.compile(\"(//|#|--)+.*$\");\n try {\n while ((line = reader.readLine()) != null) {\n lineCounter++;\n //strip comment up to the first non-comment\n Matcher m = commentPattern.matcher(line);\n if (m.find()) {\n line = line.substring(0, m.start());\n }\n\n //remove leading and trailing whitespace\n\n statement.append(\" \");\n line = statement.append(line).toString();\n line = line.replaceAll(\"\\\\s+\", \" \");\n line = line.trim();\n\n //split by ;\n //Note: possible problems with ; in ''\n String[] tokens = line.split(\";\");\n\n //trim the tokens (no leading or trailing whitespace\n for (int i = 0; i < tokens.length; i++) {\n tokens[i] = tokens[i].trim();\n }\n\n boolean containsSemicolon = line.contains(\";\");\n boolean endsWithSemicolon = line.endsWith(\";\");\n if (!containsSemicolon) {\n //statement is still open, do nothing\n continue;\n }\n if (tokens.length == 1 && endsWithSemicolon) {\n //statement is complete, semicolon at the end.\n statements.add(tokens[0]);\n statement = new StringBuilder();\n continue;\n\n }\n // other cases must have more than 1 token \n //iterate over tokens (but the last one)\n for (int i = 0; i < tokens.length - 1; i++) {\n statements.add(tokens[0]);\n statement = new StringBuilder();\n }\n //last statement may remain open:\n if (endsWithSemicolon) {\n statements.add(tokens[0]);\n statement = new StringBuilder();\n } else {\n statement = new StringBuilder();\n statement.append(tokens[tokens.length - 1]);\n }\n }\n if (statement != null && statement.toString().trim().length() > 0)\n throw new UnclosedStatementException(\"Statement is not closed until the end of the file.\");\n } catch (IOException e) {\n logger.warn(\"An error occurred!\", e);\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n logger.warn(\"An error occurred!\", e);\n }\n }\n return statements;\n }", "private boolean loadAndExecuteFromFile(Connection conn, String file) {\n String sql;\n BufferedReader in;\n try {\n in = new BufferedReader(new FileReader(file));\n for (;;) {\n sql = in.readLine();\n if (sql == null)\n break;\n try {\n PreparedStatement loadStmt = conn.prepareStatement(sql);\n loadStmt.execute();\n loadStmt.close();\n } catch (java.sql.SQLException e) {\n logger.log(\"Error executing \" + sql);\n logger.log(e);\n return (false);\n }\n logger.log(\"Successfully executed: \" + sql);\n }\n in.close();\n }catch (Exception e) {\n logger.log(\"Error Loading from \" + file);\n logger.log(e.toString());\n return (false);\n }\n return (true);\n }", "String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);", "@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }", "public static ArrayList<String> parseFile(String f) throws Exception {\n\t\tArrayList<CommandNode> cmdNode = new ArrayList<CommandNode>();\n\t\tArrayList<MemoryNode> memNode = new ArrayList<MemoryNode>();\n\t\tparseFile(f,cmdNode,memNode);\n\t\treturn preCompile(cmdNode, memNode);\n\t}", "public Script getScriptObjectFromName(final String scriptFile)\n\t{\n\t\treturn scripts.get(scriptFile);\n\t}", "public ImportCommand parseFile(File file) throws ParseException {\n\n FileReader fr;\n\n try {\n fr = new FileReader(file);\n } catch (FileNotFoundException fnfe) {\n throw new ParseException(\"File not found\");\n }\n\n BufferedReader br = new BufferedReader(fr);\n return parseLinesFromFile(br);\n }", "Object parse(String line) throws IOException, FSException {\n int oldLine=code.curLine;\n try {\n code.curLine=-1;\n code.forError=line;\n char[] chars=line.toCharArray();\n LineLoader.checkLine(chars);\n tok=new LexAnn(chars);\n tok.nextToken();\n // a script must always start with a word...\n try {\n parseStmt();\n } catch (RetException e) {\n return retVal;\n }\n } finally {\n code.curLine=oldLine;\n }\n return null;\n }", "public static void main(String[] args) throws IOException, QizxException {\n int min = 0;\n int max = Integer.MAX_VALUE;\n //fichero para recoger cada script XQuery de consulta\n File scriptFile;\n //objeto file 'directorioGrupo' apuntando a la ruta del Library Group\n File directorioGrupo = new File(directorioGrupoRoot);\n // Conexión o apertura del gestor del grupo\n LibraryManager bdManager = Configuration.openLibraryGroup(directorioGrupo);\n //Conexión a la BD\n Library bd = bdManager.openLibrary(bdNombre);\n\n try {\n //Para cada script con consulta XQuery\n for (int i = 0; i < scriptNombre.length; ++i) {\n //recoge la ruta del fichero de script con consulta XQuery\n scriptFile = new File(directorioScriptsRoot + scriptNombre[i]);\n //mensaje indicando el script XQuery que se ejecutará\n System.out.println(\"Ejecutando '\" + scriptFile + \"'...\");\n\n //carga el contenido del script XQuery en una cadena\n String consultaXquery = cargaScript(scriptFile);\n //imprime la expresión de consulta XQuery\n System.out.println(\"---\\n\" + consultaXquery + \"\\n---\");\n\n //compila la consulta, almacenado resultado en expr\n Expression expr = compileExpression(bd, consultaXquery);\n //evalúa la consulta para mostrar resultados en el rango [min, max]\n evaluarExpression(expr, min, max);\n }\n } finally {\n //cierra conexión con BD\n cerrar(bd, bdManager);\n }\n }", "@CompileStatic\n public QScript parse(String scriptName, Map<String, Object> data) throws NyException {\n QSession qSession = QSession.create(configurations, scriptName);\n if (data != null) {\n qSession.getSessionVariables().putAll(data);\n }\n return configurations.getRepositoryRegistry().defaultRepository().parse(scriptName, qSession);\n }", "private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "public static Document parse(String filename) throws ParserException {\n\t\tif (filename == null) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile file = new File(filename);\n\t\tif (!file.exists() || !file.isFile()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile subDir = file.getParentFile();\n\t\tif (!subDir.exists() || !subDir.isDirectory()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t// Document should be valid by here\n\t\tDocument doc = new Document();\n\t\tFieldNames field = FieldNames.TITLE;\n\t\tList<String> authors = new LinkedList<String>();\n\t\tString content = new String();\n\t\tboolean startContent = false;\n\n\t\tdoc.setField(FieldNames.FILEID, file.getName());\n\t\tdoc.setField(FieldNames.CATEGORY, subDir.getName());\n\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tString line = reader.readLine();\n\n\t\t\twhile (line != null) {\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\tswitch (field) {\n\t\t\t\t\tcase TITLE:\n\t\t\t\t\t\tdoc.setField(field, line);\n\t\t\t\t\t\tfield = FieldNames.AUTHOR;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AUTHOR:\n\t\t\t\t\tcase AUTHORORG:\n\t\t\t\t\t\tif (line.startsWith(\"<AUTHOR>\") || !authors.isEmpty()) {\n\t\t\t\t\t\t\tString[] seg = null;\n\t\t\t\t\t\t\tString[] author = null;\n\n\t\t\t\t\t\t\tline = line.replace(\"<AUTHOR>\", \"\");\n\t\t\t\t\t\t\tseg = line.split(\",\");\n\t\t\t\t\t\t\tauthor = seg[0].split(\"and\");\n\t\t\t\t\t\t\tauthor[0] = author[0].replaceAll(\"BY|By|by\", \"\");\n\t\t\t\t\t\t\t// Refines author names\n\t\t\t\t\t\t\tfor (int i = 0; i < author.length; ++i) {\n\t\t\t\t\t\t\t\tauthor[i] = author[i].trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tauthor[author.length - 1] = author[author.length - 1]\n\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim();\n\t\t\t\t\t\t\tauthors.addAll(Arrays.asList(author));\n\n\t\t\t\t\t\t\t// Saves author organization\n\t\t\t\t\t\t\tif (seg.length > 1) {\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHORORG, seg[1]\n\t\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (line.endsWith(\"</AUTHOR>\")) {\n\t\t\t\t\t\t\t\t// Saves author\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHOR, authors\n\t\t\t\t\t\t\t\t\t\t.toArray(new String[authors.size()]));\n\t\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This should be a PLACE\n\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t}\n\t\t\t\t\tcase PLACE:\n\t\t\t\t\t\tif (!line.contains(\"-\")) {\n\t\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] seg = line.split(\"-\");\n\t\t\t\t\t\t\tString[] meta = seg[0].split(\",\");\n\t\t\t\t\t\t\tif (seg.length != 0 && !seg[0].isEmpty()) {\n\n\t\t\t\t\t\t\t\tif (meta.length > 1) {\n\t\t\t\t\t\t\t\t\tdoc.setField(\n\t\t\t\t\t\t\t\t\t\t\tFieldNames.PLACE,\n\t\t\t\t\t\t\t\t\t\t\tseg[0].substring(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tseg[0].lastIndexOf(\",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.trim());\n\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\tmeta[meta.length - 1].trim());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmeta[0] = meta[0].trim();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tnew SimpleDateFormat(\"MMM d\",\n\t\t\t\t\t\t\t\t\t\t\t\tLocale.ENGLISH).parse(meta[0]);\n\t\t\t\t\t\t\t\t\t\t// This is a news date\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\t\tmeta[0]);\n\t\t\t\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// This is a place\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.PLACE, meta[0]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\tcase CONTENT:\n\t\t\t\t\t\tif (!startContent) {\n\t\t\t\t\t\t\t// First line of content\n\t\t\t\t\t\t\tString[] cont = line.split(\"-\");\n\t\t\t\t\t\t\tif (cont.length > 1) {\n\t\t\t\t\t\t\t\tfor (int i = 1; i < cont.length; ++i) {\n\t\t\t\t\t\t\t\t\tcontent += cont[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontent += \" \" + line;\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t}\n\t\t\tdoc.setField(FieldNames.CONTENT, content);\n\t\t\tdoc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split(\"\\\\s+\").length));\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ParserException();\n\t\t}\n\n\t\treturn doc;\n\t}", "public static DataSource createDataTables(String databaseName, String scriptFilePath) throws IOException,\n SQLException {\n JdbcDataSource dataSource = new JdbcDataSource();\n dataSource.setURL(\"jdbc:h2:mem:\" + databaseName + \";DB_CLOSE_DELAY=-1\");\n dataSource.setUser(\"sa\");\n dataSource.setPassword(\"sa\");\n\n File file = new File(scriptFilePath);\n\n final String LOAD_DATA_QUERY = \"RUNSCRIPT FROM '\" + file.getCanonicalPath() + \"'\";\n\n Connection connection = null;\n try {\n connection = dataSource.getConnection();\n Statement statement = connection.createStatement();\n statement.execute(LOAD_DATA_QUERY);\n } finally {\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n }\n }\n }\n return dataSource;\n }", "public static void main(String[] args) {\n\n String sql = \"load json.`F:\\\\tmp\\\\user` as 121;\";\n CodePointCharStream input = CharStreams.fromString(sql);\n DslLexer lexer = new DslLexer(input);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n DslParser parser = new DslParser(tokens);\n DslParser.SqlContext tree = parser.sql();\n ParseListener listener = new ParseListener();\n ParseTreeWalker.DEFAULT.walk(listener,tree); //规则树遍历\n\n\n\n }", "private SourceFile _parseString(String txt) throws ParseException {\n ACParser p = new ACParser(txt);\n return p.SourceFile();\n }", "public static String getScriptName(final File file)\n\t{\n\t\treturn file.getName().replace(SCRIPT_EXTENSION, \"\");\n\t}", "public static void main(String[] args) {\n String fileDirectoryPath = \"D:\\\\My WorkSpace\\\\New folder\\\\FBCO Worklist\";\n String[] sysEnvDetails = {\"SrcSystem\", \"SrcEnv\", \"TgtSystem\", \"TgtEnv\"};\n File dir = new File(fileDirectoryPath);\n search(\".*\\\\.sql\", dir, sysEnvDetails);\n\n }", "@Override\n public ImportCommand parse(String args) throws ParseException {\n if (args.isEmpty()) {\n return parseFile(getFileFromFileBrowser());\n } else {\n return parseFile(getFileFromArgs(args));\n }\n }", "public void parseFile(File file) throws IOException {\r\n if (file.isDirectory()) {\r\n for (File subFile : file.listFiles()) {\r\n if (subFile.isDirectory() || subFile.getName().endsWith(\".java\")) {\r\n parseFile(subFile);\r\n }\r\n }\r\n } else {\r\n parseSourceCode(new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8));\r\n }\r\n }", "public String FetchDataFromFile(File file) {\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\ttry {\r\n\t\t\tScanner sc=new Scanner(file);\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tsb.append(sc.nextLine());\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String wholePath = pagePath + firstDir + File.separator + secondDir\n + File.separator + fileName;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(wholePath));\n String line = null;\n while((line = reader.readLine()) != null) {\n if (line.equals(\"#ThisURL#\")) {\n url = reader.readLine();\n }\n// else if (line.equals(\"#Length#\")) {\n// length = Integer.parseInt(reader.readLine());\n// }\n else if (line.equals(\"#Title#\")) {\n title = reader.readLine();\n }\n else if (line.equals(\"#Content#\")) {\n content = reader.readLine();\n lowerContent = content.toLowerCase();\n break;\n }\n }\n reader.close();\n if (content == null) {\n return;\n }\n valid = true;\n } catch (IOException e) {\n// System.out.println(\"Parse page \" + id + \" not successful\");\n }\n }", "public String searchFromGridFile(File file) {\n String result = \"\";\n\n // TODO: read file and generate path using AStar algorithm\n\n return result;\n }", "public SqlFileParser(String filename) {\n try {\n this.reader = new BufferedReader(new FileReader(filename));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + filename);\n }\n }", "private void runSqlFromFile(String fileName) throws IOException {\n String[] sqlStatements = StreamUtils.copyToString( new ClassPathResource(fileName).getInputStream(), Charset.defaultCharset()).split(\";\");\n for (String sqlStatement : sqlStatements) {\n sqlStatement = sqlStatement.replace(\"CREATE TABLE \", \"CREATE TABLE OLD\");\n sqlStatement = sqlStatement.replace(\"REFERENCES \", \"REFERENCES OLD\");\n sqlStatement = sqlStatement.replace(\"INSERT INTO \", \"INSERT INTO OLD\");\n jdbcTemplate.execute(sqlStatement);\n }\n }", "abstract protected String getResultFileName();", "private void parseFile(String fileName) {\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line;\n\t\t\tint counter = 0;\n\t\t\tString lastMethod = null;\n\t\t\t\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t// Logic for method consolidation\n\t\t\t\tif (line.contains(\"Method Call\")) {\n\t\t\t\t\tlastMethod = line.substring(line.indexOf(\"target=\")+7);\n\t\t\t\t\tlastMethod = lastMethod.substring(lastMethod.indexOf('#')+1).replace(\"\\\"\",\"\").trim();\n\t\t\t\t\tlastMethod = lastMethod + \":\" + counter++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (line.contains(\"Field Write\")) {\n\t\t\t\t\tString[] tokens = line.split(\",\");\n\t\t\t\t\t\n\t\t\t\t\tString object = tokens[4].substring(tokens[4].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString field = tokens[5].substring(0, tokens[5].indexOf(\"=\")).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString value = tokens[5].substring(tokens[5].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString fld = object.replace(\"/\", \".\") + \".\" + field;\n\t\t\t\t\tevents.add(new Event(fld, value, lastMethod));\n\t\t\t\t\t\n\t\t\t\t\tallFields.add(fld);\n\t\t\t\t}\n//\t\t\t\tif (line.contains(\"Method Returned\")) {\n//\t\t\t\t\t//operations for this method ended\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private Map<String, TableImportResult> parseSchema(File databaseFile,\n\t\t\tboolean commit, String serverName, String databaseName)\n\t\t\tthrows IOException {\n\t\tDatabase database = DatabaseBuilder.open(databaseFile);\n\n\t\tMap<String, TableImportResult> results = new HashMap<String, TableImportResult>();\n\n\t\t//\n\t\t// Tables\n\t\t//\n\t\tSet<String> tablesName = database.getTableNames();\n\t\tIterator<String> tables = tablesName.iterator();\n\t\twhile (tables.hasNext()) {\n\t\t\tTable table = database.getTable(tables.next());\n\t\t\tTableImportResult result = new TableImportResult();\n\t\t\tif (!excludeTable(table.getName())) {\n\t\t\t\tif (!createTableStructure(table, commit, serverName,\n\t\t\t\t\t\tdatabaseName)) {\n\t\t\t\t\tlog.error(\"Unable to create table structure\");\n\t\t\t\t\tresult.setTableCreateResult(TableImportResult.FAILED);\n\t\t\t\t} else {\n\t\t\t\t\tresult.setTableCreateResult(TableImportResult.SUCCESSFUL);\n\t\t\t\t}\n\t\t\t}\n\t\t\tresults.put(getNormalisedTableName(table.getName()), result);\n\t\t}\n\n\t\t//\n\t\t// Constraints\n\t\t//\n\t\tMap<String, TableImportResult> constraintResults = createForeignKeys(\n\t\t\t\tserverName, databaseName, database, commit);\n\n\t\t//\n\t\t// Merge results\n\t\t//\n\t\tfor (String key : results.keySet()) {\n\t\t\tresults.get(key).merge(constraintResults.get(key));\n\t\t}\n\n\t\treturn results;\n\t}", "java.lang.String getSourceFile(int index);", "private String ddlString(String database, String name) {\n StringBuffer location = new StringBuffer();\n location.append(\"ddl/\").append(database).append(\"/\").append(name);\n\n InputStream resource = Thread.currentThread().getContextClassLoader().getResourceAsStream(location.toString());\n\n if (resource == null) {\n throw new CayenneRuntimeException(\"Can't find DDL file: \" + location);\n }\n\n BufferedReader in = new BufferedReader(new InputStreamReader(resource));\n StringBuffer buf = new StringBuffer();\n try {\n String line = null;\n while ((line = in.readLine()) != null) {\n buf.append(line).append('\\n');\n }\n } catch (IOException e) {\n throw new CayenneRuntimeException(\"Error reading DDL file: \" + location);\n } finally {\n\n try {\n in.close();\n } catch (IOException e) {\n\n }\n }\n return buf.toString();\n }", "private File getFileFromArgs(String args) throws ParseException {\n ArgumentMultimap argMultimap =\n ArgumentTokenizer.tokenize(args, PREFIX_FILE_LOCATION);\n if (!argMultimap.getValue(PREFIX_FILE_LOCATION).isPresent()) {\n throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ImportCommand.MESSAGE_USAGE));\n }\n Path fileLocation = ParserUtil.parseCsv(argMultimap.getValue(PREFIX_FILE_LOCATION).get());\n return fileLocation.toFile();\n }", "public FitnessParser getParser(UploadedFile file, DataSource ds) throws IOException, DBException {\n\t\tInputStream stream = file.getInputstream();\n\t\tStringWriter sw = new StringWriter();\n\t\tIOUtils.copy(stream, sw);\n\t\tStringReader sr = new StringReader(sw.toString());\n\t\tBufferedReader br = new BufferedReader(sr);\n\t\t\n\t\tString firstLine = br.readLine();\n\t\tif(firstLine == null) {\n\t\t\tFacesMessage msg = new FacesMessage( FacesMessage.SEVERITY_ERROR, \"Error\", \"Invalid File\" );\n\t\t\tFacesContext.getCurrentInstance().addMessage( null, msg );\n\t\t\treturn null;\n\t\t} \n\t\tFitnessParser ret = null;\n\t\tif(checkFitbitFile(firstLine)) {\n\t\t\tret = new FitbitParser(file, ds);\n\t\t} else if (checkMicrosoftFile(firstLine)) {\n\t\t\tret = new MicrosoftParser(file, ds);\n\t\t} \n\t\t\n\t\tbr.close();\n\t\treturn ret;\n\t}", "public static void readQueryFromFile(String fileName, String outputFile, String outputMetricsFile, String op, Indexer si) {\n readQueryFromFile(fileName, outputFile, outputMetricsFile, op, si, null);\n }", "public static ParserResult loadDatabase(File fileToOpen, String encoding) throws IOException {\n \n Reader reader = getReader(fileToOpen, encoding);\n String suppliedEncoding = null;\n try {\n boolean keepon = true;\n int piv = 0, c;\n while (keepon) {\n c = reader.read();\n if ( (piv == 0 && Character.isWhitespace( (char) c)) ||\n c == GUIGlobals.SIGNATURE.charAt(piv))\n piv++;\n else\n keepon = false;\n found: if (piv == GUIGlobals.SIGNATURE.length()) {\n keepon = false;\n // Found the signature. The rest of the line is unknown, so we skip it:\n while (reader.read() != '\\n');\n // Then we must skip the \"Encoding: \"\n for (int i=0; i<GUIGlobals.encPrefix.length(); i++) {\n if (reader.read() != GUIGlobals.encPrefix.charAt(i))\n break found; // No, it doesn't seem to match.\n }\n // If ok, then read the rest of the line, which should contain the name\n // of the encoding:\n StringBuffer sb = new StringBuffer();\n while ((c = reader.read()) != '\\n')\n sb.append((char)c);\n suppliedEncoding = sb.toString();\n }\n \n }\n } catch (IOException ex) {}\n \n if ((suppliedEncoding != null) && (!suppliedEncoding.equalsIgnoreCase(encoding))) {\n Reader oldReader = reader;\n try {\n // Ok, the supplied encoding is different from our default, so we must make a new\n // reader. Then close the old one.\n reader = getReader(fileToOpen, suppliedEncoding);\n oldReader.close();\n //System.out.println(\"Using encoding: \"+suppliedEncoding);\n } catch (IOException ex) {\n reader = oldReader; // The supplied encoding didn't work out, so we keep our\n // existing reader.\n \n //System.out.println(\"Error, using default encoding.\");\n }\n } else {\n // We couldn't find a supplied encoding. Since we don't know far into the file we read,\n // we start a new reader.\n reader.close();\n reader = getReader(fileToOpen, encoding);\n //System.out.println(\"No encoding supplied, or supplied encoding equals default. Using default encoding.\");\n }\n \n \n //return null;\n \n BibtexParser bp = new BibtexParser(reader);\n \n ParserResult pr = bp.parse();\n pr.setEncoding(encoding);\n \n return pr;\n }", "public void processInput(String theFile){processInput(new File(theFile));}", "protected Expression buildBSRJoinQuery() {\n try {\n final InputStream input = ResourceUtil.getResourceAsStream(QUERY_FILE);\n final QueryExpression query = QueryExpressionParser.parse(input);\n return query.toExpression(new ReferenceTable(catalog));\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n }", "public String getScriptID(String scriptName) throws MDSException {\r\n\r\n\t\tString scriptID = null;\r\n\t\tString key = scriptName.toUpperCase();\r\n\t\tscriptID = (String) scriptMap.get(key);\r\n\t\tif (scriptID == null || scriptID == \"\") {\r\n\t\t\tscriptID = \"\";\r\n\t\t\t//logger.warn(\"script : \" + scriptName + \" is not loaded !\");\r\n\t\t}\r\n\t\treturn scriptID;\r\n\t}", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "protected Script getScript(String scriptName, boolean withSrc) {\n \t\tScript s = getConfiguration().getScriptByName(scriptName);\n \t\tFile scriptSrc = new File(getScriptDirectory(), scriptName);\n \t\tif (withSrc) {\n \t\t\ttry {\n \t\t\t\tReader reader = new FileReader(scriptSrc);\n \t\t\t\tString src = IOUtils.toString(reader);\n \t\t\t\ts.setScript(src);\n \t\t\t} catch (IOException e) {\n \t\t\t\tLOGGER.log(Level.SEVERE, \"not able to load sources for script [\" + scriptName + \"]\", e);\n \t\t\t}\n \t\t}\n \t\treturn s;\n \t}", "java.lang.String getSourceFile();", "static RobotProgramNode parseFile(File code){\r\n\tScanner scan = null;\r\n\ttry {\r\n\t scan = new Scanner(code);\r\n\r\n\t // the only time tokens can be next to each other is\r\n\t // when one of them is one of (){},;\r\n\t scan.useDelimiter(\"\\\\s+|(?=[{}(),;])|(?<=[{}(),;])\");\r\n\r\n\t RobotProgramNode n = parseProgram(scan); // You need to implement this!!!\r\n\r\n\t scan.close();\r\n\t return n;\r\n\t} catch (FileNotFoundException e) {\r\n\t System.out.println(\"Robot program source file not found\");\r\n\t} catch (ParserFailureException e) {\r\n\t System.out.println(\"Parser error:\");\r\n\t System.out.println(e.getMessage());\r\n\t scan.close();\r\n\t}\r\n\treturn null;\r\n }", "private String readAndProcessSourceFile(String fileName, HashMap<String, String> substitutions) {\r\n try {\r\n // Read the source file packaged as a resource\r\n BufferedReader br = new BufferedReader(new InputStreamReader(\r\n getClass().getClassLoader().getResourceAsStream(fileName)));\r\n StringBuffer sb = new StringBuffer();\r\n try {\r\n String line = null;\r\n while (true) {\r\n line = br.readLine();\r\n if (line == null) {\r\n break;\r\n }\r\n sb.append(line + \"\\n\");\r\n }\r\n }\r\n finally {\r\n br.close();\r\n }\r\n String text = sb.toString();\r\n\r\n // Handle substitutions as key-value pairs where key is a regular expression and value is the substitution\r\n if (substitutions != null) {\r\n for (Entry<String, String> s : substitutions.entrySet()) {\r\n Pattern p = Pattern.compile(s.getKey());\r\n Matcher m = p.matcher(text);\r\n sb = new StringBuffer();\r\n while (m.find()) {\r\n m.appendReplacement(sb, m.group(1) + s.getValue());\r\n }\r\n m.appendTail(sb);\r\n text = sb.toString();\r\n }\r\n }\r\n\r\n return text;\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "@Override\n public String generareSourcecodetoReadInputFromFile() throws Exception {\n String typeVar = VariableTypes.deleteStorageClasses(this.getType())\n .replace(IAbstractDataNode.REFERENCE_OPERATOR, \"\");\n // Ex: A::B, ::B. We need to get B\n if (typeVar.contains(\"::\"))\n typeVar = typeVar.substring(typeVar.lastIndexOf(\"::\") + 2);\n\n String loadValueStm = \"data.findStructure\" + typeVar + \"ByName\" + \"(\\\"\" + getVituralName() + \"\\\")\";\n\n String fullStm = typeVar + \" \" + this.getVituralName() + \"=\" + loadValueStm + SpecialCharacter.END_OF_STATEMENT;\n return fullStm;\n }", "public void parse(String userInput) {\n\t\tString[] args = toStringArray(userInput, ' ');\n\t\tString key = \"\";\n\t\tArrayList<String> filePaths = new ArrayList<String>();\n\t\tboolean caseSensitive = true;\n\t\tboolean fileName = false;\n\n\t\t// resolves the given args\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (args[i].equals(\"-i\")) {\n\t\t\t\tcaseSensitive = false;\n\t\t\t} else if (args[i].equals(\"-l\")) {\n\t\t\t\tfileName = true;\n\t\t\t} else if (args[i].contains(\".\")) {\n\t\t\t\tfilePaths.add(args[i]);\n\t\t\t} else {\n\t\t\t\tkey = args[i];\n\t\t\t}\n\t\t}\n\t\t// in the case of multiple files to parse this repeats until all files\n\t\t// have been searched\n\t\tfor (String path : filePaths) {\n\t\t\tthis.document = readFile(path);\n\t\t\tfindMatches(key, path, caseSensitive, fileName);\n\t\t}\n\t}", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static void main(String [] filenames) throws Exception {\n for(String filename : filenames) {\n Files.lines(Paths.get(filename)).forEach(LanguageModel::parseDocument);\n }\n\n // Read user queries\n Scanner input = new Scanner(System.in);\n while(true) {\n System.out.print(\"Enter a query (exit to quit): \");\n String query = input.nextLine();\n\n if(\"exit\".equals(query)) {\n break;\n } else {\n executeQuery(query);\n }\n }\n }", "protected void executeSQLScript(SQLiteDatabase database, String assetName) {\n /*\n * variables locales para manejar la lectura del archivo de scripts\n */\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n byte buf[] = new byte[1024];\n int len;\n AssetManager assetManager = context.getAssets();\n InputStream inputStream = null;\n\n try {\n /*\n * obtenemos el asset y lo convertimos a string\n */\n inputStream = assetManager.open(assetName);\n while ((len = inputStream.read(buf)) != -1) {\n outputStream.write(buf, 0, len);\n }\n outputStream.close();\n inputStream.close();\n\n /*\n * desencriptamos el archivo\n */\n String sqlClear = Cypher.decrypt(SD, outputStream.toString());\n // String sqlClear = outputStream.toString();\n\n /*\n * separamos la cadena por el separador de sentencias\n */\n String[] createScript = sqlClear.split(\";\");\n\n /*\n * por cada sentencia del archivo ejecutamos la misma en la base de\n * datos\n */\n for (int i = 0; i < createScript.length; i++) {\n String sqlStatement = createScript[i].trim();\n\n if (sqlStatement.startsWith(\"--\")) {\n continue;\n }\n\n if (sqlStatement.length() > 0) {\n Log.i(CsTigoApplication.getContext().getString(\n CSTigoLogTags.DATABASE.getValue()),\n CsTigoApplication.getContext().getString(\n R.string.database_exec_sql)\n + sqlStatement);\n\n try {\n database.execSQL(sqlStatement + \";\");\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }\n }\n\n } catch (IOException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_read_asset)\n + e.getMessage());\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }", "public static String getPostScriptHeaderContent() throws AlgorithmExecutionException { \t\r\n\t\tInputStream inStream = null;\r\n \tBufferedReader input = null;\r\n \tString line;\r\n \tString psHeaderContentinString = \"\";\r\n \r\n \ttry {\r\n URLConnection connection = PostScriptOperations.postScriptHeaderFile.openConnection();\r\n connection.setDoInput(true);\r\n inStream = connection.getInputStream();\r\n input = new BufferedReader(new InputStreamReader(inStream, \"UTF-8\"));\r\n \t\t \t\t\r\n \t while (null != (line = input.readLine())) {\r\n \t \tpsHeaderContentinString = psHeaderContentinString.concat(line).concat(\"\\n\");\r\n \t}\r\n \t} catch (IOException e) {\r\n \t\tthrow new AlgorithmExecutionException(e.getMessage(), e);\r\n \t} finally {\r\n \t\ttry {\r\n \t\t\tif (input != null) {\r\n \t\t\t\tinput.close();\r\n \t\t\t}\r\n \t if (inStream != null) { \r\n \t \tinStream.close();\r\n \t }\r\n \t } catch (IOException e) {\r\n \t e.printStackTrace();\r\n \t }\r\n \t}\r\n \t\r\n\t\treturn psHeaderContentinString;\r\n\t}", "public static void main(String[] args) {\n TextAnalyzerService tas = new TextAnalyzerService();\n ResultObject resultObject;\n List<String> resultList = new ArrayList<>();\n String path = \"1.txt\";\n boolean isBracketsOk = false;\n\n try {\n isBracketsOk = tas.parsing(path).equals(\"correct\") ? true : false;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n try {\n resultList = tas.readFile(path);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n resultObject = new ResultObject(path, resultList, isBracketsOk);\n //System.out.println(resultObject.toString());\n\n for(String x : resultObject.getListOfString()){\n System.out.println(x);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource source = new Source(\"src\\\\test\\\\resources\\\\a.txt\", buffer);\n\t\t\n\t\tParseOption option = new ParseOption();\n\t\t\n\t\tParser parser = new Parser();\n\t\t\n\t\tparser.parse(source, option);\n\n\t}", "public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }", "protected void evaluate(String filePath) throws FormatException {\n\n try {\n int latSlash = filePath.lastIndexOf(\"/\");\n if (latSlash > 1) {\n if (DEBUG) {\n Debug.output(\"Have lat index of \" + latSlash);\n }\n String lonSearch = filePath.substring(0, latSlash);\n\n if (DEBUG) {\n Debug.output(\"Searching for lon index in \" + lonSearch);\n }\n int lonSlash = lonSearch.lastIndexOf(\"/\");\n if (lonSlash > 1) {\n filename = filePath.substring(latSlash + 1);\n String latString = filename.toUpperCase();\n\n if (DEBUG) {\n Debug.output(\"have lat \" + latString);\n }\n\n int dotIndex = latString.indexOf(\".\");\n if (dotIndex > 0) {\n\n lat = Double.parseDouble(latString.substring(1,\n dotIndex));\n if (latString.charAt(0) == 'S') {\n lat *= -1;\n }\n\n subDirs = filePath.substring(lonSlash + 1, latSlash);\n String dd = filePath.substring(0, lonSlash + 1);\n if (dd.length() > 0) {\n dtedDir = dd;\n }\n\n String lonString = subDirs.toUpperCase();\n\n if (DEBUG) {\n Debug.output(\"have lon \" + lonString);\n }\n\n lon = Double.parseDouble(lonString.substring(1));\n if (lonString.charAt(0) == 'W') {\n lon *= -1;\n }\n\n level = (int) Integer.parseInt(filePath.substring(filePath.length() - 1));\n if (DEBUG) {\n Debug.output(\"have level \" + level);\n }\n return;\n }\n }\n }\n } catch (NumberFormatException nfe) {\n\n }\n\n throw new FormatException(\"StandardDTEDNameTranslator couldn't convert \"\n + filePath + \" to valid parameters\");\n }", "public abstract DbQuery getQuery(String queryName);", "private void parseFile(Project p, File f, ImportSettings settings, int pass)\n throws ImportException {\n\n\n try {\n BufferedInputStream bs = new BufferedInputStream(new FileInputStream(f));\n Lexer l = new Lexer(bs, f.getAbsolutePath());\n TokenCollection toks = l.lex();\n Parser px = new Parser();\n CompilationUnitNode cu = px.parse(toks, l.StringLiterals);\n parsedElements.add(cu);\n } catch (FeatureNotSupportedException e) {\n //throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n } catch (Exception e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n// throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath());\n }\n\n }", "Program( String filename ) throws IOException, ParserException, EvaluationException\n\t\t{\n\t\t\tmParser = new Parser();\n\t\t\t\n\t\t\tFileReader r = new FileReader( filename );\n\t\t\t\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\n\t\t\tint ch = -1;\n\t\t\twhile( ( ch = r.read() ) >= 0 )\n\t\t\t{\n\t\t\t\tbuilder.append( (char) ch );\n\t\t\t}\n\t\t\tmProgram = builder.toString();\n\t\t\t\n\t\t\tmParser.parse( mProgram );\n\t\t}", "private void getMap(String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getMap\");\r\n\r\n\t\tString fileContent = loadFile(sqlFile);\r\n\t\tString[] querys = getStringArray(fileContent, END_QUERY_PATTERN);\r\n\t\tfillMap(querys);\r\n\r\n\t\tLOG.info(\"END getMap\");\r\n\t\t\r\n\t}", "public static void parseQueryString(String queryString) {\n Pattern pattern = Pattern.compile(\".+\\\\bfrom\\\\b\\\\s+(\\\\w+)\");\n Matcher matcher = pattern.matcher(queryString);\n if(matcher.find()){\n \t//System.out.println(\"got it\");\n \tString tableName = matcher.group(1);\n \t//System.out.println(\"Table Name\"+tableName);\n \tString fileName = \"data/user_data/\"+tableName+\".tbl\";\n \tUserDataHandler table = new UserDataHandler(fileName);;\n table.displayTable(fileName, tableName);\n }\n }", "public String parseSrc() throws Exception{\n\t\tr = new FileReader(userArg); \r\n\t\tst = new StreamTokenizer(r);\r\n\t\t st.eolIsSignificant(true);\r\n\t\t st.commentChar(46);\r\n\t\t st.whitespaceChars(9, 9);\r\n\t\t st.whitespaceChars(32, 32);\r\n\t\t st.wordChars(39, 39);\r\n\t\t st.wordChars(44, 44);\r\n\t\t \r\n\t\t //first we check for a specified start address\r\n\t\t while (InstructionsRead < 2) {\r\n\t\t \tif (st.sval != null) {\r\n\t\t \t\tInstructionsRead++;\r\n\t\t \t\tif (st.sval.equals(\"START\")) {\r\n\t\t \t\twhile(st.ttype != StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tst.nextToken();\r\n\t\t \t\t}\r\n\t\t \t\tDDnval = st.nval;\r\n\t\t \t\tstartAddress = Integer.parseInt(\"\" + DDnval.intValue(), 16);\r\n\t\t \t\tlocctr = startAddress;\r\n\t\t \t\tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t\t \t\tif (sLocctr.length() == 1) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 2) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse {\r\n\t\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\t//writer.write(\"\" + locctr); //should write to IF, not working yet 2/15/2011\r\n\t\t \t\tstartSpecified = true;\r\n\t\t \t\t}\r\n\t\t \t\telse if (!st.sval.equals(\"START\") && InstructionsRead < 2) { //this should be the program name, also could allow for label here potentially...\r\n\t\t \t\t\t//this is the name of the program\r\n\t\t \t\t\t//search SYMTAB for label etc. \r\n\t\t \t\t\tname = st.sval;\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t st.nextToken();\r\n\t\t }\r\n\t\t if (!startSpecified) {\r\n\t\t \tstartAddress = 0;\r\n\t\t \tlocctr = startAddress;\r\n\t\t }\r\n\t\t startAddress2 = startAddress;\r\n\t\t /*\r\n\t\t ATW = Integer.toHexString(startAddress2.intValue());\r\n\t\t \r\n\t\t for (int i = 0; i<(6-ATW.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(ATW);\r\n\t\t myWriter.newLine();//end of line for now; in ReadIF when this line is read and translated to object code, the program length will be tacked on the end\r\n\t\t */\r\n\t\t \r\n\t\t //Now that startAddress has been established, we move on to the main parsing loop\r\n\t\t while (st.ttype != StreamTokenizer.TT_EOF) { //starts parsing to end of file\r\n\t\t \t//System.out.println(\"Stuck in eof\");\r\n\t\t \t//iLocctr = locctr.intValue();\r\n\t\t \tinstFound = false;\r\n\t\t \topcodeDone = false;\r\n\t\t \tlabelDone = false;\r\n\t\t \tmoveOn = true;\r\n\t\t \t//constantCaseW = false;\r\n\t\t \tconstantCaseB = false;\r\n\t\t \txfound = false;\r\n\t\t \tcfound = false;\r\n\t\t \t\r\n\t\t \tInstructionsRead = 0; //init InsRead to 0 at the start of each line\r\n\t\t \tSystem.out.println(\"new line\");\r\n\t\t \tSystem.out.println(\"Ins read: \" + InstructionsRead);\r\n\t\t \tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t \t\tif (sLocctr.length() == 1) {\r\n\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 2) {\r\n\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t\t \tif (foundEnd()) {\r\n\t\t \t\tbreak;\r\n\t\t \t}\r\n\t\t \twhile (st.ttype != StreamTokenizer.TT_EOL) {//breaks up parsing by lines so that InstructionsRead will be a useful count\r\n\t\t \t\t\r\n\t\t \t\tmoveOn = true;\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_WORD) { \r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tSystem.out.println(st.sval);\r\n\t\t \t\t\tSystem.out.println(\"Instructions Read: \" + InstructionsRead);\r\n\t\t \t\t\tif (foundEnd()) {\r\n\t\t \t\t\t\tbreak;\r\n\t\t \t\t\t}\r\n\t\t \t\t\t/*\r\n\t\t \t\t\t * The whole instructinsread control architecture doesn't quite work, because\r\n\t\t \t\t\t * the ST doesn't count the whitespace it reads in. This is by design because\r\n\t\t \t\t\t * the prof specified that whitespace is non-regulated and thus we cannot\r\n\t\t \t\t\t * predict exactly how many instances of char dec value 32 (space) will appear\r\n\t\t \t\t\t * before and/or between the label/instruction/operand 'fields'. \r\n\t\t \t\t\t * \r\n\t\t \t\t\t * What we could try alternatively is to structure the control around'\r\n\t\t \t\t\t * the optab, since it it static and populated pre-runtime. The schema might\r\n\t\t \t\t\t * go something like this: first convert whatever the sval or nval is to string.\r\n\t\t \t\t\t * Then call the optab.searchOpcode method with the resultant string as the input\r\n\t\t \t\t\t * parameter. If the string is in optab then it is an instruction and the ST is in the\r\n\t\t \t\t\t * instruction 'field' and boolean foundInst is set to true. If it is not in optab AND a boolean variable foundInst which resets to\r\n\t\t \t\t\t * false at the beginning of each new line is still false, then it is a label being declared in the label 'field'\r\n\t\t \t\t\t * If it is not in the optab AND foundInst is true, then the ST is at the operand 'field'.\r\n\t\t \t\t\t * This should work even if the prof has a crappy line with just a label declaration and no instruction or operand, because there\r\n\t\t \t\t\t * definitely cannot be an operand without an instruction...\r\n\t\t \t\t\t */\r\n\t\t \t\t\tif (instFound){\r\n\t\t \t\t\t\tprocessOperand(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (st.sval.equals(\"WORD\") || st.sval.equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (st.sval.equals(\"RESW\") || st.sval.equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(st.sval)) {//if true this is the instruction\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {//otherwise this is the label\r\n\t\t \t\t\t\t\tprocessLabel(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\t//else{ //if instFound is true, this must be the operand field\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//processOperand(st);\r\n\t\t \t\t\t//}\r\n\t\t \t\t\t//if (InstructionsRead == 3) {//this is the operand field\r\n\t\t \t\t\t\t//processOperand();\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t//}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"WORD\") || NtoString(st.nval).equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"RESW\") || NtoString(st.nval).equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(\"\" + st.nval)) {\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {\r\n\t\t \t\t\t\t\tprocessLabelN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse{ //this is the operand field\r\n\t\t \t\t\t\tprocessOperandN(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \tif (moveOn){\r\n\t\t \tst.nextToken(); //read next token in current line\r\n\t\t \t}\r\n\t\t \t}\r\n\t\t \t////write line just finished to IF eventually\r\n\t\t if (moveOn){\r\n\t\t st.nextToken(); //read first token of next line\t\r\n\t\t }\r\n\t\t }\r\n\t\t programLength = (locctr - startAddress); \r\n\t\t programLength2 = programLength;\r\n\t\t System.out.println(\" !!prgmlngth2:\" + Integer.toHexString(programLength2.intValue()));\r\n\t\t /*\r\n\t\t sProgramLength = Integer.toHexString(programLength2.intValue());\r\n\t\t for (int i = 0; i<(6-sProgramLength.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(sProgramLength);\r\n\t\t myWriter.close();\r\n\t\t ////myWriter.close();\r\n\t\t \r\n\t\t */\r\n\t\t r.close();\r\n\t\t System.out.println(\"?????!?!?!?!?ALPHA?!?!?!?!?!??!?!?!\");\r\n\t\t if (hexDigitCount/2 < 16){\r\n\t\t \tlineLength.add(\"0\" + Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t else{\r\n\t\t lineLength.add(Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t for (int i = 0; i<lineLength.size(); i++){\r\n\t\t System.out.println(lineLength.get(i));\r\n\t\t }\r\n\t\t // System.out.println(hexDigitCount);\r\n\t\t ReadIF pass2 = new ReadIF(this.optab,this.symtab,this.startAddress2,this.programLength2,this.name,this.lineLength,this.userArg);\r\n\t\t return st.sval;\r\n\t\t \r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException {\n for (int i = 0; i < args.length; i++) {\n //System.out.println(args[i]);\n }\n RunSQL2 r = new RunSQL2();\n r.ReadCatalog(args[0]);\n String lines;\n String mainQuery = \"\";\n List<String> tokens = new ArrayList<String>();\n List<String> select = new ArrayList<String>();\n List<String> from = new ArrayList<String>();\n List<String> where = new ArrayList<String>();\n StringBuilder line = new StringBuilder();\n List<String> colName = new ArrayList<String>();\n List<String> ttable = new ArrayList<String>();\n String path = args[1];\n tt1 = new ArrayList<String>();\n tt2 = new ArrayList<String>();\n tt3 = new ArrayList<String>();\n tt4 = new ArrayList<String>();\n tt5 = new ArrayList<String>();\n String tname;\n int tCount = 0;\n int ttCount = 0;\n BufferedReader br = new BufferedReader(new FileReader(path));\n while ((lines = br.readLine()) != null) {\n line.append(lines + \" \");\n }\n if (line.lastIndexOf(\";\") > -1) {\n line.deleteCharAt(line.lastIndexOf(\";\"));\n }\n mainQuery = line.toString();\n StringTokenizer st = new StringTokenizer(line.toString(), \" \");\n while (st.hasMoreTokens()) {\n tokens.add(st.nextToken());\n }\n for (int i = 0; i < tokens.size(); i++) { // SELECTED ATTRIBUTES\n if (tokens.get(i).equalsIgnoreCase(\"select\")) {\n if (tokens.get(i + 1) != null) {\n int j = i;\n while (!tokens.get(j + 1).equalsIgnoreCase(\"from\")) {\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n select.add(sb.toString());\n } else {\n select.add(tokens.get(j + 1));\n }\n j++;\n }\n }\n }\n if (tokens.get(i).equalsIgnoreCase(\"from\")) {\n // TODO: SQL TABLE FROM CLAUSE FORMAT [TABLE S], OR [TABLE]\n if (tokens.get(i + 2) != null) {\n int j = i;\n while (!tokens.get(j + 2).equalsIgnoreCase(\"where\")) {\n //TODO QUERY ERROR IF NO WHERE CLAUSE\n //System.out.println(j);\n //System.out.println(tokens.get(j).toString());\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n from.add(sb.toString());\n } else {\n from.add(tokens.get(j + 1));\n }\n if (j > tokens.size() - 1) {\n break;\n }\n j++;\n }\n }\n }\n }\n\n try {\n String query = \"\";\n List<String> columnNames = new ArrayList<String>();\n Class.forName(driver).newInstance();\n Connection conn;\n Statement stmt = null;\n conn = DriverManager.getConnection(connUrl + \"?verifyServerCertificate=false&useSSL=true\", connUser, connPwd);\n br = new BufferedReader(new FileReader(path));\n query = \"SELECT * FROM DTABLES\";\n PreparedStatement statement = conn\n .prepareStatement(query);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n if (rs.getString(\"TNAME\") != null) {\n tname = rs.getString(\"TNAME\").replaceAll(\"\\\\s+\", \"\");\n if (tname.equalsIgnoreCase(from.get(0))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n t1.add(tname);\n t2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n t3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n t4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n t5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n tCount++;\n }\n if (tname.equalsIgnoreCase(from.get(2))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n tt1.add(tname);\n tt2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n tt3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n tt4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n tt5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n ttCount++;\n }\n }\n }\n conn.close();\n\n // GET ATTRIBUTES FROM THE FIRST TABLE IN ORDER TO CREATE TEMP TABLE\n Class.forName(t2.get(0)).newInstance();\n conn = DriverManager.getConnection(t3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(0), t5.get(0));\n query = \"SELECT * FROM \" + t1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb = new StringBuilder();\n StringBuilder sb1 = new StringBuilder();\n String name;\n String export;\n String tempQuery = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name = rsmd.getColumnName(i);\n sb1.append(name + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb.append(name + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb.append(name + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb.append(name + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb.append(name + \" DECIMAL (15, 2), \");\n }\n }\n sb1.setLength(sb1.length() - 2);\n sb.setLength(sb.length() - 2);\n tempQuery = sb.toString();\n export = sb1.toString();\n\n //System.out.println(sb.toString());\n conn.close();\n\n Class.forName(tt2.get(0)).newInstance();\n conn = DriverManager.getConnection(tt3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(0), tt5.get(0));\n query = \"SELECT * FROM \" + tt1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n columnCount = rsmd.getColumnCount();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n String name1;\n String export1;\n String tempQuery1 = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name1 = rsmd.getColumnName(i);\n sb3.append(name1 + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb2.append(name1 + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb2.append(name1 + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb2.append(name1 + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb2.append(name1 + \" DECIMAL (15, 2), \");\n }\n }\n sb3.setLength(sb3.length() - 2);\n sb2.setLength(sb2.length() - 2);\n tempQuery1 = sb2.toString();\n export1 = sb3.toString();\n //System.out.println(tempQuery1);\n\n //System.out.println(sb.toString());\n conn.close();\n\n // FOR TESTING\n for (int x = 0; x < tt1.size(); x++) {\n //System.out.println(tt1.get(x));\n }\n\n // MAIN\n // CREATE TEMP TABLE FIRST AND JOIN TABLES\n // NOTE: CLOSING CONNECTION WILL DELETE TEMP TABLE\n Class.forName(localdriver).newInstance();\n // NEW CONNECTION (DO NOT USE CONN OR ELSE TEMP TABLE MIGHT DROP)\n final Connection iconn = DriverManager.getConnection(localconnUrl + \"?verifyServerCertificate=false&useSSL=true\", localconnUser, localconnPwd);\n query = \"CREATE TEMPORARY TABLE \" + t1.get(0) + \" (\" + tempQuery + \")\"; // TEMP TABLE FOR TABLE 1\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n query = \"CREATE TEMPORARY TABLE \" + tt1.get(0) + \" (\" + tempQuery1 + \")\"; // TEMP TABLE FOR TABLE 2\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n Thread thread1[] = new Thread[tCount];\n Thread thread2[] = new Thread[ttCount];\n\n for (int z = 0; z < tCount; z++) {\n final int c = z;\n final String d = export;\n // EXPORT ALL DATA TO TEMP TABLE\n thread1[z] = new Thread(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"Working on \" + Thread.currentThread());\n try {\n // EXPORT CONNECTION \n //System.out.println(t3.get(c));\n Class.forName(t2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(t3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(c), t5.get(c));\n //System.out.println(t1.get(c));\n // GETTING DATA FROM TABLE 1\n String exportQuery = \"SELECT * FROM \" + t1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n int columnCount = rsmd.getColumnCount();\n for (int i = 1; i <= columnCount; i++) {\n columnNames.add(rsmd.getColumnName(i));\n }\n //System.out.println(sb.toString());\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + t1.get(0) + \" (\" + d + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getFloat(k + 1);\n //System.out.println(\"temp \" + temp);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n //System.out.println(sb.toString());\n String query2 = sb.toString();\n //System.out.println(query2);\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n\n }\n \n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n } finally {\n //System.out.println();\n }\n\n }\n });\n thread1[z].start();\n }\n\n // CREATE TEMP TABLE FOR SECOND TABLE\n for (int i = 0; i < ttCount; i++) {\n final int c = i;\n thread2[i] = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //System.out.println(\"Working on \" + Thread.currentThread());\n // THIS PART WILL INSERT TABLE 2 DATA TO A NODE\n //if (tt3.get(c).compareToIgnoreCase(localconnUrl) != 0) {\n //System.out.println(tt3.get(c));\n //System.out.println(localconnUrl);\n Class.forName(tt2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(tt3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(c), tt5.get(c));\n String exportQuery = \"SELECT * FROM \" + tt1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n String name = null;\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb1 = new StringBuilder();\n for (int i = 1; i <= columnCount; i++) {\n //System.out.println(rsmd.getColumnName(i));\n columnNames.add(rsmd.getColumnName(i));\n sb1.append(rsmd.getColumnName(i) + \", \");\n }\n sb1.setLength(sb1.length() - 2);\n name = sb1.toString();\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + tt1.get(0) + \" (\" + name + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getDouble(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n String query2 = sb.toString();\n //System.out.println(query2);\n\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n }\n //}\n\n } catch (Exception e) {\n System.err.println(e);\n } finally {\n //System.out.println(\"Done with \" + Thread.currentThread());\n }\n }\n });\n thread2[i].start();\n }\n\n //System.out.println(mainQuery);\n for (int z = 0; z < tCount; z++) {\n thread1[z].join();\n }\n\n for (int z = 0; z < ttCount; z++) {\n thread2[z].join();\n }\n\n // JOIN SQL PERFORMS HERE\n //System.out.println(mainQuery);\n statement = iconn\n .prepareStatement(mainQuery);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n Object temp;\n String output;\n columnCount = rsmd.getColumnCount();\n double temp1;\n while (rs.next()) {\n StringBuilder sbb = new StringBuilder();\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER || rsmd.getColumnType(k + 1) == Types.BIGINT) {\n temp = rs.getInt(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.FLOAT || rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp1 = rs.getDouble(k + 1);\n sbb.append(temp1 + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sbb.append(temp + \" | \");\n } else {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n }\n }\n sbb.setLength(sbb.length() - 1);\n output = sbb.toString();\n System.out.println(output);\n }\n\n conn.close();\n iconn.close();\n } catch (IOException | ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n }\n }", "public static String parse( String input, File parentDirectory, String url )\n {\n List<Block> blocks = parseBlocks( input );\n\n EphemeralFileSystemAbstraction fs = new EphemeralFileSystemAbstraction();\n //TODO remove config when compiled plans are feature complete\n Map<Setting<?>, String> config = new HashMap<>();\n config.put( GraphDatabaseSettings.cypher_runtime, \"INTERPRETED\" );\n GraphDatabaseService database = new TestGraphDatabaseFactory().setFileSystem( fs ).newImpermanentDatabase(config);\n\n Connection conn = null;\n TestFailureException failure = null;\n try\n {\n DocsExecutionEngine engine = new DocsExecutionEngine( database );\n conn = DriverManager.getConnection( \"jdbc:hsqldb:mem:graphgist;shutdown=true\" );\n conn.setAutoCommit( true );\n return executeBlocks( blocks, new State( engine, database, conn, parentDirectory, url ) );\n }\n catch ( TestFailureException exception )\n {\n dumpStoreFiles( fs, failure = exception, \"before-shutdown\" );\n throw exception;\n }\n catch ( SQLException sqlException )\n {\n throw new RuntimeException( sqlException );\n }\n finally\n {\n database.shutdown();\n if ( failure != null )\n {\n dumpStoreFiles( fs, failure, \"after-shutdown\" );\n }\n if ( conn != null )\n {\n try\n {\n conn.close();\n }\n catch ( SQLException sqlException )\n {\n throw new RuntimeException( sqlException );\n }\n }\n }\n }", "public void parse() {\n File sourceFile = new File(DEFAULT_DS_FILE_PATH);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory\n .newInstance();\n documentBuilderFactory.setNamespaceAware(true);\n DocumentBuilder builder = null;\n try {\n builder = documentBuilderFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n Document document = null;\n try {\n document = builder.parse(sourceFile);\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n XPathFactory xpathFactory = XPathFactory.newInstance();\n XPath xpath = xpathFactory.newXPath();\n\n //read the database properties and assign to local variables.\n XPathExpression expression = null;\n Node result = null;\n try {\n expression = xpath.compile(DRIVER_CLASS_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n driverClassName = result.getTextContent();\n expression = xpath.compile(CONNECTION_URL_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n connectionUrl = result.getTextContent();\n expression = xpath.compile(USER_NAME_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n userName = result.getTextContent();\n expression = xpath.compile(PASSWORD_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n password = result.getTextContent();\n\n } catch (XPathExpressionException e) {\n e.printStackTrace();\n }\n System.out.println(driverClassName);\n System.out.println(connectionUrl);\n try {\n\t\t\tSystem.out.println(userName.getBytes(\"EUC-JP\"));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(password);\n }", "private String getAFileFromSegment(Value segment, Repository repository)\n {\n \n RepositoryConnection con = null;\n try\n {\n con = getRepositoryConnection(repository);\n \n String adaptorQuery = \"SELECT ?fileName WHERE { <\" + segment + \"> <http://toif/contains> ?file . \"\n + \"?file <http://toif/type> \\\"toif:File\\\" .\" + \"?file <http://toif/name> ?fileName . }\";\n \n TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);\n \n TupleQueryResult queryResult = adaptorTupleQuery.evaluate();\n \n while (queryResult.hasNext())\n {\n BindingSet adaptorSet = queryResult.next();\n Value name = adaptorSet.getValue(\"fileName\");\n \n return name.stringValue();\n }\n \n queryResult.close();\n }\n catch (RepositoryException e)\n {\n e.printStackTrace();\n }\n catch (MalformedQueryException e)\n {\n e.printStackTrace();\n }\n catch (QueryEvaluationException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n con.close();\n }\n catch (RepositoryException e)\n {\n e.printStackTrace();\n }\n }\n return null;\n }", "private String[] getProgramFromFile(String filename) {\n\t\tString program = \"\";\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tprogram += line;\n\t\t\t\tprogram += \" \";\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getTokens(program);\n\t}", "String getCmdForExternalTool(ObjectStorage storage, Alias alias,\r\n String sqlFile);", "public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }" ]
[ "0.628074", "0.57601994", "0.5674195", "0.56679577", "0.5626042", "0.55001175", "0.54430157", "0.5373523", "0.53708786", "0.5366192", "0.5357785", "0.529785", "0.5146808", "0.51455337", "0.50552255", "0.5042066", "0.50265026", "0.5012578", "0.49911705", "0.49814323", "0.49676493", "0.4931619", "0.49315137", "0.49292958", "0.49217838", "0.48565403", "0.48525637", "0.48511952", "0.4838991", "0.4830365", "0.48298356", "0.4829586", "0.48202062", "0.4755681", "0.4753025", "0.47377208", "0.47090423", "0.4707112", "0.46902418", "0.46821892", "0.46743023", "0.46722254", "0.4658305", "0.4650727", "0.4643549", "0.46267638", "0.46254167", "0.46239695", "0.46234956", "0.4581489", "0.45665792", "0.45575342", "0.45436686", "0.4519263", "0.45115677", "0.45072633", "0.45060435", "0.44862303", "0.44860318", "0.44851267", "0.44833454", "0.4472535", "0.44725007", "0.44592467", "0.4457094", "0.44248042", "0.44218433", "0.4420663", "0.44195116", "0.44153714", "0.4415269", "0.44098738", "0.4395492", "0.43885252", "0.4384205", "0.43724138", "0.43723106", "0.437022", "0.43679565", "0.43586925", "0.43573081", "0.4355856", "0.4350887", "0.43497235", "0.43335706", "0.43334812", "0.4332335", "0.4321123", "0.4318888", "0.4316243", "0.43160826", "0.4300681", "0.42988637", "0.4297417", "0.42948943", "0.42910558", "0.42836887", "0.42826143", "0.42817208", "0.42808744" ]
0.52376264
12
Parse the given file indicated from given script name using the given variable set and returns the generated query with its other information. Your script name would be the relative path from the script root directory, always having forward slashes (/). You should call this only if you are working with a script repository.
@CompileStatic public QScript parse(String scriptName, Map<String, Object> data) throws NyException { QSession qSession = QSession.create(configurations, scriptName); if (data != null) { qSession.getSessionVariables().putAll(data); } return configurations.getRepositoryRegistry().defaultRepository().parse(scriptName, qSession); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String readSQLFile(String filename) {\n\t\tString query = null;\n\t\ttry (BufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(\n\t\t\t\t\t\tgetClass().getResourceAsStream(\"/sql/\" + filename + \".sql\")))) {\n\t\t\tList<String> lines = reader.lines().collect(Collectors.toList());\n\t\t\tquery = join(\" \", lines).replaceAll(\"\\\\s+\", \" \");\n\t\t} catch (IOException e) {\n\t\t\tString msg = \"Can't read SQL file \" + filename;\n\t\t\tlogger.error(msg, e);\n\t\t\tthrow new RuntimeException(msg, e);\n\t\t}\n\t\treturn query;\n\t}", "public String query(String filename)\n\t{\n\t\treturn filename;\n\t}", "public static void parseScript(String inFile) {\r\n\t\tScanner in;\r\n\t\t\r\n\t\t// Create the resize visitor\r\n\t\tResizeVisitor rsv = new ResizeVisitor();\r\n\t\t// Set the text tree display (with decorators) as an observer to the resize visitor\r\n\t\trsv.attach(ttd);\r\n\t\t\r\n\t\t/*\r\n\t\t * Other visitor objects should also be created here instead of in the switch statement\r\n\t\t * I would have fixed this if I had more time\r\n\t\t * The program works the way it is now, but fixing this would have been better design\r\n\t\t */\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create scanner to read the script file\r\n\t\t\tin = new Scanner(new File(inFile));\r\n\t\t\tFileComponentBuilder fb;\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\tString[] command;\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tline = in.nextLine();\r\n\t\t\t\t\r\n\t\t\t\t// Print command to output file for clarity\r\n\t\t\t\tout.print('\\n' + fs.getCurrentDir().getName() + \"> \");\r\n\t\t\t\tout.println(line);\r\n\t\t\t\t\r\n\t\t\t\t// Read line from script and parse it\r\n\t\t\t\tcommand = line.split(\"\\\\s\");\r\n\t\t\t\t\r\n\t\t\t\t// All script commands must be accounted for in this switch statement\r\n\t\t\t\tswitch(command[0]) {\r\n\t\t\t\tcase \"mkdir\":\r\n\t\t\t\t\t// Uses builder pattern to create directory and proxy while hiding creation process\r\n\t\t\t\t\tfb = new DirectoryBuilder();\r\n\t\t\t\t\tfb.setParameters(fs, command);\r\n\t\t\t\t\tfs.getCurrentDir().add(fb.getFileComponent());\r\n\t\t\t\t\tout.println(\"Subdirectory \\\"\" + command[1] + \"\\\" created\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"create\":\r\n\t\t\t\t\t// Uses builder pattern to create file and proxy while hiding creation process\r\n\t\t\t\t\tfb = new FileBuilder();\r\n\t\t\t\t\tfb.setParameters(fs, command);\r\n\t\t\t\t\tfs.getCurrentDir().add(fb.getFileComponent());\r\n\t\t\t\t\tout.println(\"File \\\"\" + command[1] + \"\\\" created\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"cd\":\r\n\t\t\t\t\tif (command[1].contentEquals(\"..\")) {\r\n\t\t\t\t\t\t// cd ..\r\n\t\t\t\t\t\t// If at root (or in error situation where parent directory is null)\r\n\t\t\t\t\t\t// current directory will be set to the root\r\n\t\t\t\t\t\tfs.setDir(fs.getCurrentDir().getParent());\r\n\t\t\t\t\t\tif (fs.getCurrentDir() == null) {\r\n\t\t\t\t\t\t\tfs.setDir(fs.getRoot());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tout.println(\"Directory changed to \" + fs.getCurrentDir().getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// cd subdirectory\r\n\t\t\t\t\t\tFileComponent newDir = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\t\tif (newDir == null || newDir instanceof LeafFile) {\r\n\t\t\t\t\t\t\tout.println(command[1] + \" is not a valid directory\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tfs.setDir(newDir);\r\n\t\t\t\t\t\t\tout.println(\"Directory changed to \" + command[1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"del\":\r\n\t\t\t\t\tFileComponent delFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (delFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdelFile.accept(new DeleteVisitor());\r\n\t\t\t\t\t\tout.println(command[1] + \" deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"size\":\r\n\t\t\t\t\tFileComponent sizeFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (sizeFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSizeVisitor sv = new SizeVisitor();\r\n\t\t\t\t\t\tsizeFile.accept(sv);\r\n\t\t\t\t\t\tout.println(sv.getTotalSize());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"ls\":\r\n\t\t\t\t\tFileComponent lsFile = fs.getCurrentDir();\r\n\t\t\t\t\tif (command.length > 1) {\r\n\t\t\t\t\t\tlsFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (lsFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tLSVisitor lv = new LSVisitor();\r\n\t\t\t\t\t\tlsFile.accept(lv);\r\n\t\t\t\t\t\tfor (int i = 0; i < lv.getOutput().size(); i++) {\r\n\t\t\t\t\t\t\tif (lv.getOutput().get(i).length > 1) {\r\n\t\t\t\t\t\t\t\tout.println(lv.getOutput().get(i)[0] + \" \" + lv.getOutput().get(i)[1]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tout.println(lv.getOutput().get(i)[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"resize\":\r\n\t\t\t\t\tFileComponent ResizeFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (ResizeFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\trsv.setNewSize(Integer.parseInt(command[2]));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tResizeFile.accept(rsv);\r\n\t\t\t\t\t\tif (rsv.resizeSuccessful()) {\r\n\t\t\t\t\t\t\tout.println(\"Size of \" + command[1] + \" set to \" + command[2]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tout.println(command[1] + \" is not a valid file\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"exit\":\r\n\t\t\t\t\tfs.getRoot().accept(new ExitVisitor());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: out.println(command[0] + \" is not a valid command\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tin.close();\r\n\t\t\tSystem.out.println(\"Script read successfully\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error: could not read from script file\");\r\n\t\t}\r\n\t}", "void parseQueryFile(Path path, boolean hasFlag);", "public static Queries parseFile(File file) throws JAXBException {\n\t\tJAXBContext jc = JAXBContext.newInstance(\"com.insa.rila.xml.querie\");\n\t\tUnmarshaller u = jc.createUnmarshaller();\n\t\tObject o = u.unmarshal(file);\n\n\t\treturn (Queries) o;\n\t}", "public SqlFileParser(File sqlScript) {\n try {\n this.reader = new BufferedReader(new FileReader(sqlScript));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + sqlScript);\n }\n }", "public void parse(String filename);", "public String readQueryFile(String queryFileName) {\n assert queryFileName != null : \"queryFileName cannont be null\";\n StringBuilder queryBuilder = new StringBuilder();\n String query = null;\n InputStream input = null;\n\n try {\n input = new FileInputStream(queryFileName);\n List<String> queryLines = new ArrayList<>();\n queryLines.clear();\n queryLines.addAll(IOUtils.readLines(input));\n\n if (!queryLines.isEmpty()) {\n for (String queryLine : queryLines) {\n queryBuilder.append(queryLine).append(\"\\n\");\n }\n }\n\n } catch (FileNotFoundException ex) {\n //Logger.getLogger(OracleDAO.class.getName()).log(Level.SEVERE, null, ex);\n logger.error(queryFileName + \" could not be found\", ex);\n } catch (IOException ioe) {\n logger.error(\"There was a problem with the file \" + queryFileName, ioe);\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException ex) {\n logger.error(\"There was a problem with the file \" + queryFileName, ex);\n }\n }\n }\n\n //InputStream input = new URL(queryFileName).openStream();\n query = queryBuilder.toString();\n return query;\n }", "public static void executeSQLScript(Connection conn, String file) throws Exception{\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\tBufferedInputStream bis=new BufferedInputStream(fis);\n\t\tStringBuffer sb=new StringBuffer(); \n\t\tbyte[] bytes=new byte[1024];\n\t\twhile (bis.available()!=0){\n\t\t\tint length=fis.read(bytes);\n\t\t\tif (length!=1024){\n\t\t\t\tbyte[] smallBytes=new byte[length];\n\t\t\t\tSystem.arraycopy(bytes,0,smallBytes,0,length);\n\t\t\t\tbytes=smallBytes;\n\t\t\t}\t\n\t\t\tsb.append(new String(bytes));\n\t\t}\n\t\tStringTokenizer st = new StringTokenizer(sb.toString(),\";\",false);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString token=st.nextToken().trim();\t\n\t\t\tif (!token.equals(\"\")){\n\t\t\t\tif (token.equalsIgnoreCase(\"commit\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\tDataAccessObject.rollback(conn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (token.equalsIgnoreCase(\"quit\")){\n\t\t\t\t\t//do nothing\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse if (token.substring(0,2).equals(\"--\")){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\texecuteSQLStatement(conn,token);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void parseDropinsFilesVariables(File file)\n throws SAXException, IOException, XPathExpressionException {\n Document doc = parseDropinsXMLFile(file);\n if (doc != null) {\n parseVariables(doc);\n parseIncludeVariables(doc);\n }\n }", "public String parse(File file);", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }", "public static String SQLFromFile(String file) throws IOException{\n BufferedReader reader = new BufferedReader(new FileReader(file));\n StringBuilder sb = new StringBuilder();\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append(' ');\n }\n reader.close();\n return sb.toString();\n }", "public AnalysisMetadata parseFileToAnalysisMetadata(String filename) {\n\t\t\n\t\tAnalysisMetadata am = new AnalysisMetadata();\n\t\t\n\t\tRubyScript rs = new RubyScript(filename);\n\t\t\n\t\tam.setScript(rs);\n\t\t\t\t\n\t\tParameterDictionary pd = ParameterDictionary.emptyDictionary();\n\t\t\n\t\tParameter p = new Parameter(SCRIPT_FILENAME_PARAM, SCRIPT_FILENAME_PARAM, ParameterType.STRING_T, filename, null);\n\t\tpd.addParameter(p);\n\t\t\n\t\t\n\t\tam.setInputParameters(pd);\n\t\t\n\t\tScriptingContainer sc = new ScriptingContainer(org.jruby.embed.LocalContextScope.SINGLETHREAD, org.jruby.embed.LocalVariableBehavior.PERSISTENT);\n\t\tsc.setClassLoader(ij.IJ.getClassLoader());\n\t\tsc.put(\"parameters\", pd);\n\t\t\t\t\n\t\tsc.setCompatVersion(org.jruby.CompatVersion.RUBY1_9);\n\t\t\n\t\tsc.runScriptlet(this.getClass().getClassLoader().getResourceAsStream(SCRIPT_FUNCTIONS_FILE), SCRIPT_FUNCTIONS_FILE);\n\t\tsc.runScriptlet(rs.getScriptString());\n\t\t\n\t\tp = new Parameter(\"method_name\", \"method_name\", ParameterType.STRING_T, \"ScriptMethod\", null);\n\t\tpd.addIfNotSet(\"method_name\", p);\n\t\t\n\t\tam.setOutputParameters(new ParameterDictionary(pd));\n\t\t\n\t\treturn am;\n\t}", "public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }", "public IAstSourceFile findIncludeFile(String string);", "public void executeFile(String fileName) {\n String file = \"\";\r\n String lign;\r\n try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\r\n while ((lign = br.readLine()) != null) {\r\n file += \" \" + lign;\r\n }\r\n\r\n String[] commands = file.split(\";\");\r\n for (int i = 0; i < commands.length; i++) {\r\n executeUpdate(commands[i]);\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void separateFileToQueries(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, File queriesFile, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath) {\n try {\n String allQueries = new String(Files.readAllBytes(Paths.get(queriesFile.getAbsolutePath())), Charset.defaultCharset());\n String[] allQueriesArr = allQueries.split(\"<top>\");\n\n for (String query : allQueriesArr) {\n if(query.equals(\"\")){\n continue;\n }\n String queryId = \"\", queryText = \"\", queryDescription = \"\";\n String[] lines = query.toString().split(\"\\n\");\n for (int i = 0; i < lines.length; i++){\n if(lines[i].contains(\"<num>\")){\n queryId = lines[i].substring(lines[i].indexOf(\":\") + 2);\n }\n else if(lines[i].contains(\"<title>\")){\n queryText = lines[i].substring(8);\n }\n else if(lines[i].contains(\"<desc>\")){\n i++;\n while(i < lines.length && !lines[i].equals(\"\")){\n queryDescription += lines[i];\n i++;\n }\n }\n }\n search(indexer, cityIndexer, ranker, queryText, withSemantic, chosenCities, citiesByTag, withStemming, saveInPath, queryId, queryDescription);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static String pickQueryFromResources(String migrateVersion) throws SQLException, APIManagementException, IOException {\n String databaseType = getDatabaseDriverName();\n String queryTobeExecuted = null;\n String resourcePath;\n\n if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_9)) {\n //pick from 18to19Migration/sql-scripts\n resourcePath = \"/18to19Migration/sql-scripts/\";\n\n } else if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_8)) {\n //pick from 17to18Migration/sql-scripts\n resourcePath = \"/17to18Migration/sql-scripts/\";\n } else if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_7)) {\n //pick from 16to17Migration/sql-scripts\n resourcePath = \"/16to17Migration/sql-scripts/\";\n } else {\n throw new APIManagementException(\"No query picked up for the given migrate version. Please check the migrate version.\");\n }\n\n if (!resourcePath.equals(\"\")) {\n InputStream inputStream;\n try {\n if (databaseType.equalsIgnoreCase(\"MYSQL\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"mysql.sql\");\n } else if (databaseType.equalsIgnoreCase(\"MSSQL\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"mssql.sql\");\n } else if (databaseType.equalsIgnoreCase(\"H2\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"h2.sql\");\n } else if (databaseType.equalsIgnoreCase(\"ORACLE\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"oracle.sql\");\n } else {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"postgresql.sql\");\n }\n\n queryTobeExecuted = IOUtils.toString(inputStream);\n\n } catch (IOException e) {\n throw new IOException(\"Error occurred while accessing the sql from resources. \" + e);\n }\n }\n return queryTobeExecuted;\n }", "public static void main(String[] args) {\n String fileDirectoryPath = \"D:\\\\My WorkSpace\\\\New folder\\\\FBCO Worklist\";\n String[] sysEnvDetails = {\"SrcSystem\", \"SrcEnv\", \"TgtSystem\", \"TgtEnv\"};\n File dir = new File(fileDirectoryPath);\n search(\".*\\\\.sql\", dir, sysEnvDetails);\n\n }", "@CompileStatic\n public QScript parse(String scriptName) throws NyException {\n return parse(scriptName, EMPTY_MAP);\n }", "private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was read, each line is one of the elements of the file_read_lines list\n //line 0 is keyword \"TELL\"\n //line 1 is the knowledge base\n //line 2 is the keyword \"ASK\"\n //line 3 is the query\n file_read_lines.add(spaceEscaped);\n }\n\n //generate list of Horn clauses (raw) from the KB raw sentence\n //replace \\/ by |\n String kbLine = file_read_lines.get(1).replace(\"\\\\/\", \"|\");\n rawClauses = Arrays.asList(kbLine.split(\";\"));\n //query - a propositional symbol\n query = file_read_lines.get(3);\n } catch (IOException e) {\n //Return error if file cannot be opened\n error = true;\n System.out.println(source_file.toString() + \" is not found!\");\n }\n }", "private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public List<String> parse() {\n String line = null;\n int lineCounter = 0;\n StringBuilder statement = new StringBuilder();\n List<String> statements = new LinkedList<String>();\n Pattern commentPattern = Pattern.compile(\"(//|#|--)+.*$\");\n try {\n while ((line = reader.readLine()) != null) {\n lineCounter++;\n //strip comment up to the first non-comment\n Matcher m = commentPattern.matcher(line);\n if (m.find()) {\n line = line.substring(0, m.start());\n }\n\n //remove leading and trailing whitespace\n\n statement.append(\" \");\n line = statement.append(line).toString();\n line = line.replaceAll(\"\\\\s+\", \" \");\n line = line.trim();\n\n //split by ;\n //Note: possible problems with ; in ''\n String[] tokens = line.split(\";\");\n\n //trim the tokens (no leading or trailing whitespace\n for (int i = 0; i < tokens.length; i++) {\n tokens[i] = tokens[i].trim();\n }\n\n boolean containsSemicolon = line.contains(\";\");\n boolean endsWithSemicolon = line.endsWith(\";\");\n if (!containsSemicolon) {\n //statement is still open, do nothing\n continue;\n }\n if (tokens.length == 1 && endsWithSemicolon) {\n //statement is complete, semicolon at the end.\n statements.add(tokens[0]);\n statement = new StringBuilder();\n continue;\n\n }\n // other cases must have more than 1 token \n //iterate over tokens (but the last one)\n for (int i = 0; i < tokens.length - 1; i++) {\n statements.add(tokens[0]);\n statement = new StringBuilder();\n }\n //last statement may remain open:\n if (endsWithSemicolon) {\n statements.add(tokens[0]);\n statement = new StringBuilder();\n } else {\n statement = new StringBuilder();\n statement.append(tokens[tokens.length - 1]);\n }\n }\n if (statement != null && statement.toString().trim().length() > 0)\n throw new UnclosedStatementException(\"Statement is not closed until the end of the file.\");\n } catch (IOException e) {\n logger.warn(\"An error occurred!\", e);\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n logger.warn(\"An error occurred!\", e);\n }\n }\n return statements;\n }", "private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "public IAstSourceFile findIncludeFile(ISourceFile file);", "public static List<SQLquery> updateQueryList() throws IOException {\n\n List<String> querynames = new ArrayList<String>();\n List<SQLquery> queries = new ArrayList<SQLquery>();\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n\n for (int i = 0; i <= fileNames.length - 1; i++) {\n\n /**\n * SELECT ONLY .XYZ FILES FROM FOLDER\n */\n System.out.println(fileNames[i]);\n if (fileNames[i].contains(\".xyz\")) {\n\n querynames.add(fileNames[i]);\n\n }\n\n }\n\n /**\n * create SQLquery objects with appropriate name and query string\n */\n for ( String querypath : querynames ) {\n\n String content = new String(Files.readAllBytes(Paths.get(querypath)));\n SQLquery newquery = new SQLquery(querypath.replace(\".xyz\",\"\"),content);\n queries.add(newquery);\n\n }\n\n /**\n * return query list\n */\n return queries;\n\n }", "public String getQuery(String queryName, String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getQuery\");\r\n\r\n\t\tgetQuerys(sqlFile);\r\n\r\n\t\tString query = querysMap.get(queryName);\r\n\r\n\t\tLOG.debug(querysMap.containsKey(queryName));\r\n\r\n\t\tLOG.info(\"\\nQuery [\" + query + \"]\");\r\n\r\n\t\treturn query;\r\n\t\t\r\n\t}", "public void loadClasspathCypherScriptFile(String cqlFileName) {\n StringBuilder cypher = new StringBuilder();\n try (Scanner scanner = new Scanner(Thread.currentThread().getContextClassLoader().getResourceAsStream(cqlFileName))) {\n scanner.useDelimiter(System.getProperty(\"line.separator\"));\n while (scanner.hasNext()) {\n cypher.append(scanner.next()).append(' ');\n }\n }\n\n new ExecutionEngine(this.database).execute(cypher.toString());\n }", "public static void main(String[] args) throws IOException, QizxException {\n int min = 0;\n int max = Integer.MAX_VALUE;\n //fichero para recoger cada script XQuery de consulta\n File scriptFile;\n //objeto file 'directorioGrupo' apuntando a la ruta del Library Group\n File directorioGrupo = new File(directorioGrupoRoot);\n // Conexión o apertura del gestor del grupo\n LibraryManager bdManager = Configuration.openLibraryGroup(directorioGrupo);\n //Conexión a la BD\n Library bd = bdManager.openLibrary(bdNombre);\n\n try {\n //Para cada script con consulta XQuery\n for (int i = 0; i < scriptNombre.length; ++i) {\n //recoge la ruta del fichero de script con consulta XQuery\n scriptFile = new File(directorioScriptsRoot + scriptNombre[i]);\n //mensaje indicando el script XQuery que se ejecutará\n System.out.println(\"Ejecutando '\" + scriptFile + \"'...\");\n\n //carga el contenido del script XQuery en una cadena\n String consultaXquery = cargaScript(scriptFile);\n //imprime la expresión de consulta XQuery\n System.out.println(\"---\\n\" + consultaXquery + \"\\n---\");\n\n //compila la consulta, almacenado resultado en expr\n Expression expr = compileExpression(bd, consultaXquery);\n //evalúa la consulta para mostrar resultados en el rango [min, max]\n evaluarExpression(expr, min, max);\n }\n } finally {\n //cierra conexión con BD\n cerrar(bd, bdManager);\n }\n }", "@Override\n public String readFile(BufferedReader reader)\n {\n try\n {\n StringBuffer strLine = new StringBuffer();\n String line;\n\n while ((line = reader.readLine()) != null)\n {\n if (!line.startsWith(\"--\", 0))\n {\n strLine.append(line);\n\n // use ; as the command delimiter and execute the query on the database.\n if (line.endsWith(\";\"))\n {\n super.exeQuery(strLine.toString());\n strLine = new StringBuffer();\n }\n }\n }\n\n return strLine.toString();\n }\n catch (IOException ioex)\n {\n logger.error(\"Error reading contents from file.\");\n return null;\n }\n }", "public void parse(String fileName) throws Exception;", "String getSingleLinkerScriptFile();", "public void parse(String userInput) {\n\t\tString[] args = toStringArray(userInput, ' ');\n\t\tString key = \"\";\n\t\tArrayList<String> filePaths = new ArrayList<String>();\n\t\tboolean caseSensitive = true;\n\t\tboolean fileName = false;\n\n\t\t// resolves the given args\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (args[i].equals(\"-i\")) {\n\t\t\t\tcaseSensitive = false;\n\t\t\t} else if (args[i].equals(\"-l\")) {\n\t\t\t\tfileName = true;\n\t\t\t} else if (args[i].contains(\".\")) {\n\t\t\t\tfilePaths.add(args[i]);\n\t\t\t} else {\n\t\t\t\tkey = args[i];\n\t\t\t}\n\t\t}\n\t\t// in the case of multiple files to parse this repeats until all files\n\t\t// have been searched\n\t\tfor (String path : filePaths) {\n\t\t\tthis.document = readFile(path);\n\t\t\tfindMatches(key, path, caseSensitive, fileName);\n\t\t}\n\t}", "public Script getScriptObjectFromName(final String scriptFile)\n\t{\n\t\treturn scripts.get(scriptFile);\n\t}", "public SimpleDatabase executeSqlFile(SQLiteDatabase db, @RawRes int id) {\n Scanner scan = context.openInternalFileScanner(id);\n String query = \"\";\n if (logging) Log.d(\"SimpleDB\", \"start reading file\");\n int queryCount = 0;\n while (scan.hasNextLine()) {\n String line = scan.nextLine().trim();\n if (line.startsWith(\"--\") || line.isEmpty()) {\n continue;\n } else {\n query += line + \"\\n\";\n }\n\n if (query.endsWith(\";\\n\")) {\n if (logging) Log.d(\"SimpleDB\", \"query: \\\"\" + query + \"\\\"\");\n db.execSQL(query);\n query = \"\";\n queryCount++;\n }\n }\n if (logging) Log.d(\"SimpleDB\", \"done reading file\");\n if (logging) Log.d(\"SimpleDB\", \"performed \" + queryCount + \" queries.\");\n return this;\n }", "public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }", "public static void main(String[] args) {\n\n String sql = \"load json.`F:\\\\tmp\\\\user` as 121;\";\n CodePointCharStream input = CharStreams.fromString(sql);\n DslLexer lexer = new DslLexer(input);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n DslParser parser = new DslParser(tokens);\n DslParser.SqlContext tree = parser.sql();\n ParseListener listener = new ParseListener();\n ParseTreeWalker.DEFAULT.walk(listener,tree); //规则树遍历\n\n\n\n }", "Object parse(String line) throws IOException, FSException {\n int oldLine=code.curLine;\n try {\n code.curLine=-1;\n code.forError=line;\n char[] chars=line.toCharArray();\n LineLoader.checkLine(chars);\n tok=new LexAnn(chars);\n tok.nextToken();\n // a script must always start with a word...\n try {\n parseStmt();\n } catch (RetException e) {\n return retVal;\n }\n } finally {\n code.curLine=oldLine;\n }\n return null;\n }", "public static void main(String [] filenames) throws Exception {\n for(String filename : filenames) {\n Files.lines(Paths.get(filename)).forEach(LanguageModel::parseDocument);\n }\n\n // Read user queries\n Scanner input = new Scanner(System.in);\n while(true) {\n System.out.print(\"Enter a query (exit to quit): \");\n String query = input.nextLine();\n\n if(\"exit\".equals(query)) {\n break;\n } else {\n executeQuery(query);\n }\n }\n }", "public String[] getFile(String nomefile){\n\t\tFileReader doc = null;\n\t\ttry {\n\t\t\t doc = new FileReader(nomefile);\n\t\t\t String i;\n\t\t\t String Query_All=\"\";\n\t\t // apriamo lo stream di input...\n\t\t BufferedReader br=new BufferedReader(doc);\n\t // ...e avviamo la lettura del file con un ciclo\n\t\t do\n\t\t {\n\t\t i=br.readLine();\n\t\t if (i!=null)\n\t\t \t {\n\t\t \t \t//System.out.println(i);\n\t\t \t \tQuery_All += i;\n\t\t \t }\n\t\t }\n\t\t while (i!=null);\n\t\t String[] Query = Query_All.split(\";\");\n\t\t \n\t\t return Query;\n\t\t \n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t}", "@Test\r\n\tpublic void test4() throws Exception {\r\n\t\t\r\n\t\t// Bind the xquery named parameter 'test' to the contents of Test1.xml file\r\n\t\tsetParameter(\"test\", new File(\"testdata/Test1.xml\"));\r\n\t\t\r\n\t\t// Execute the XQuery\r\n\t\texecuteQuery(new File(\"testdata/TestQuery2.xq\"));\r\n\t\t\r\n\t\t//\r\n\t}", "private boolean loadAndExecuteFromFile(Connection conn, String file) {\n String sql;\n BufferedReader in;\n try {\n in = new BufferedReader(new FileReader(file));\n for (;;) {\n sql = in.readLine();\n if (sql == null)\n break;\n try {\n PreparedStatement loadStmt = conn.prepareStatement(sql);\n loadStmt.execute();\n loadStmt.close();\n } catch (java.sql.SQLException e) {\n logger.log(\"Error executing \" + sql);\n logger.log(e);\n return (false);\n }\n logger.log(\"Successfully executed: \" + sql);\n }\n in.close();\n }catch (Exception e) {\n logger.log(\"Error Loading from \" + file);\n logger.log(e.toString());\n return (false);\n }\n return (true);\n }", "String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);", "void parse(String fileName1,String fileName2) {\n\t\tString sCurrentLine;\n\t\tbr = null;\n\t\t\n\t\t//first read the fileName1\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(fileName1));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"File provided as the first argument is not found\");\n\t\t}\n\t\ttry {\n\t\t\t//For Users.xml\n\t\t\t//read current line and then first extract the attributes and then the\n\t\t\t//\tdata between the double quotes\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tMatcher m = id.matcher(sCurrentLine);\n\t\t\t\tMatcher dispName = name.matcher(sCurrentLine);\n\t\t\t\tMatcher dbQuotes,num;\n\t\t\t\tif (m.find() && dispName.find()){\n\t\t\t\t\tnum = number.matcher(m.group());\n\t\t\t\t\tdbQuotes = quotes.matcher(dispName.group());\n\t\t\t\t\tnum.find();\n\t\t\t\t\tdbQuotes.find();\n\t\t\t\t\tuserMap.put(Integer.parseInt(num.group()), dbQuotes.group());\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Some Error in Reading the referred file\");\n\t\t}\n\t\tcatch (IllegalStateException e){\n\t\t\tSystem.out.println(\"Illegal call to the function m.find() or pattern not found\");\n\t\t}\n\t\t\n\t\t\n\t\ttry {\n\t\t\t//read the second file\n\t\t\tbr = new BufferedReader(new FileReader(fileName2));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"File provided as the first argument is not found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//For posts.xml\n\t\t\t//read current line and then first extract the attributes and then the\n\t\t\t//\tdata between the double quotes\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tMatcher m = postType.matcher(sCurrentLine);\n\t\t\t\tMatcher owner = ownerId.matcher(sCurrentLine);\n\t\t\t\tMatcher ownId,postNum;\n\t\t\t\tif (m.find() && owner.find()){\n\t\t\t\t\townId = number.matcher(owner.group());\n\t\t\t\t\tpostNum = number.matcher(m.group());\n\t\t\t\t\townId.find();\n\t\t\t\t\tpostNum.find();\n\t\t\t\t\tint key = Integer.parseInt(postNum.group());\n\t\t\t\t\tint own = Integer.parseInt(ownId.group());\n\t\t\t\t\tif (key == 1){\n\t\t\t\t\t\t//if the post is a question\n\t\t\t\t\t\tif(postsMapQuestions.containsKey(own)){\n\t\t\t\t\t\t\tpostsMapQuestions.put(own,postsMapQuestions.get(own)+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tpostsMapQuestions.put(own, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//this post is an answer\n\t\t\t\t\t\tif(postsMapAnswers.containsKey(own)){\n\t\t\t\t\t\t\tpostsMapAnswers.put(own,postsMapAnswers.get(own)+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tpostsMapAnswers.put(own, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Some Error in Reading the referred file\");\n\t\t}\n\t\tcatch (IllegalStateException e){\n\t\t\tSystem.out.println(\"Illegal call to the function m.find() or pattern not found\");\n\t\t}\n\t}", "public static DataSource createDataTables(String databaseName, String scriptFilePath) throws IOException,\n SQLException {\n JdbcDataSource dataSource = new JdbcDataSource();\n dataSource.setURL(\"jdbc:h2:mem:\" + databaseName + \";DB_CLOSE_DELAY=-1\");\n dataSource.setUser(\"sa\");\n dataSource.setPassword(\"sa\");\n\n File file = new File(scriptFilePath);\n\n final String LOAD_DATA_QUERY = \"RUNSCRIPT FROM '\" + file.getCanonicalPath() + \"'\";\n\n Connection connection = null;\n try {\n connection = dataSource.getConnection();\n Statement statement = connection.createStatement();\n statement.execute(LOAD_DATA_QUERY);\n } finally {\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n }\n }\n }\n return dataSource;\n }", "public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException {\n for (int i = 0; i < args.length; i++) {\n //System.out.println(args[i]);\n }\n RunSQL2 r = new RunSQL2();\n r.ReadCatalog(args[0]);\n String lines;\n String mainQuery = \"\";\n List<String> tokens = new ArrayList<String>();\n List<String> select = new ArrayList<String>();\n List<String> from = new ArrayList<String>();\n List<String> where = new ArrayList<String>();\n StringBuilder line = new StringBuilder();\n List<String> colName = new ArrayList<String>();\n List<String> ttable = new ArrayList<String>();\n String path = args[1];\n tt1 = new ArrayList<String>();\n tt2 = new ArrayList<String>();\n tt3 = new ArrayList<String>();\n tt4 = new ArrayList<String>();\n tt5 = new ArrayList<String>();\n String tname;\n int tCount = 0;\n int ttCount = 0;\n BufferedReader br = new BufferedReader(new FileReader(path));\n while ((lines = br.readLine()) != null) {\n line.append(lines + \" \");\n }\n if (line.lastIndexOf(\";\") > -1) {\n line.deleteCharAt(line.lastIndexOf(\";\"));\n }\n mainQuery = line.toString();\n StringTokenizer st = new StringTokenizer(line.toString(), \" \");\n while (st.hasMoreTokens()) {\n tokens.add(st.nextToken());\n }\n for (int i = 0; i < tokens.size(); i++) { // SELECTED ATTRIBUTES\n if (tokens.get(i).equalsIgnoreCase(\"select\")) {\n if (tokens.get(i + 1) != null) {\n int j = i;\n while (!tokens.get(j + 1).equalsIgnoreCase(\"from\")) {\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n select.add(sb.toString());\n } else {\n select.add(tokens.get(j + 1));\n }\n j++;\n }\n }\n }\n if (tokens.get(i).equalsIgnoreCase(\"from\")) {\n // TODO: SQL TABLE FROM CLAUSE FORMAT [TABLE S], OR [TABLE]\n if (tokens.get(i + 2) != null) {\n int j = i;\n while (!tokens.get(j + 2).equalsIgnoreCase(\"where\")) {\n //TODO QUERY ERROR IF NO WHERE CLAUSE\n //System.out.println(j);\n //System.out.println(tokens.get(j).toString());\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n from.add(sb.toString());\n } else {\n from.add(tokens.get(j + 1));\n }\n if (j > tokens.size() - 1) {\n break;\n }\n j++;\n }\n }\n }\n }\n\n try {\n String query = \"\";\n List<String> columnNames = new ArrayList<String>();\n Class.forName(driver).newInstance();\n Connection conn;\n Statement stmt = null;\n conn = DriverManager.getConnection(connUrl + \"?verifyServerCertificate=false&useSSL=true\", connUser, connPwd);\n br = new BufferedReader(new FileReader(path));\n query = \"SELECT * FROM DTABLES\";\n PreparedStatement statement = conn\n .prepareStatement(query);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n if (rs.getString(\"TNAME\") != null) {\n tname = rs.getString(\"TNAME\").replaceAll(\"\\\\s+\", \"\");\n if (tname.equalsIgnoreCase(from.get(0))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n t1.add(tname);\n t2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n t3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n t4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n t5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n tCount++;\n }\n if (tname.equalsIgnoreCase(from.get(2))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n tt1.add(tname);\n tt2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n tt3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n tt4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n tt5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n ttCount++;\n }\n }\n }\n conn.close();\n\n // GET ATTRIBUTES FROM THE FIRST TABLE IN ORDER TO CREATE TEMP TABLE\n Class.forName(t2.get(0)).newInstance();\n conn = DriverManager.getConnection(t3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(0), t5.get(0));\n query = \"SELECT * FROM \" + t1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb = new StringBuilder();\n StringBuilder sb1 = new StringBuilder();\n String name;\n String export;\n String tempQuery = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name = rsmd.getColumnName(i);\n sb1.append(name + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb.append(name + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb.append(name + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb.append(name + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb.append(name + \" DECIMAL (15, 2), \");\n }\n }\n sb1.setLength(sb1.length() - 2);\n sb.setLength(sb.length() - 2);\n tempQuery = sb.toString();\n export = sb1.toString();\n\n //System.out.println(sb.toString());\n conn.close();\n\n Class.forName(tt2.get(0)).newInstance();\n conn = DriverManager.getConnection(tt3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(0), tt5.get(0));\n query = \"SELECT * FROM \" + tt1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n columnCount = rsmd.getColumnCount();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n String name1;\n String export1;\n String tempQuery1 = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name1 = rsmd.getColumnName(i);\n sb3.append(name1 + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb2.append(name1 + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb2.append(name1 + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb2.append(name1 + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb2.append(name1 + \" DECIMAL (15, 2), \");\n }\n }\n sb3.setLength(sb3.length() - 2);\n sb2.setLength(sb2.length() - 2);\n tempQuery1 = sb2.toString();\n export1 = sb3.toString();\n //System.out.println(tempQuery1);\n\n //System.out.println(sb.toString());\n conn.close();\n\n // FOR TESTING\n for (int x = 0; x < tt1.size(); x++) {\n //System.out.println(tt1.get(x));\n }\n\n // MAIN\n // CREATE TEMP TABLE FIRST AND JOIN TABLES\n // NOTE: CLOSING CONNECTION WILL DELETE TEMP TABLE\n Class.forName(localdriver).newInstance();\n // NEW CONNECTION (DO NOT USE CONN OR ELSE TEMP TABLE MIGHT DROP)\n final Connection iconn = DriverManager.getConnection(localconnUrl + \"?verifyServerCertificate=false&useSSL=true\", localconnUser, localconnPwd);\n query = \"CREATE TEMPORARY TABLE \" + t1.get(0) + \" (\" + tempQuery + \")\"; // TEMP TABLE FOR TABLE 1\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n query = \"CREATE TEMPORARY TABLE \" + tt1.get(0) + \" (\" + tempQuery1 + \")\"; // TEMP TABLE FOR TABLE 2\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n Thread thread1[] = new Thread[tCount];\n Thread thread2[] = new Thread[ttCount];\n\n for (int z = 0; z < tCount; z++) {\n final int c = z;\n final String d = export;\n // EXPORT ALL DATA TO TEMP TABLE\n thread1[z] = new Thread(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"Working on \" + Thread.currentThread());\n try {\n // EXPORT CONNECTION \n //System.out.println(t3.get(c));\n Class.forName(t2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(t3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(c), t5.get(c));\n //System.out.println(t1.get(c));\n // GETTING DATA FROM TABLE 1\n String exportQuery = \"SELECT * FROM \" + t1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n int columnCount = rsmd.getColumnCount();\n for (int i = 1; i <= columnCount; i++) {\n columnNames.add(rsmd.getColumnName(i));\n }\n //System.out.println(sb.toString());\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + t1.get(0) + \" (\" + d + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getFloat(k + 1);\n //System.out.println(\"temp \" + temp);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n //System.out.println(sb.toString());\n String query2 = sb.toString();\n //System.out.println(query2);\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n\n }\n \n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n } finally {\n //System.out.println();\n }\n\n }\n });\n thread1[z].start();\n }\n\n // CREATE TEMP TABLE FOR SECOND TABLE\n for (int i = 0; i < ttCount; i++) {\n final int c = i;\n thread2[i] = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //System.out.println(\"Working on \" + Thread.currentThread());\n // THIS PART WILL INSERT TABLE 2 DATA TO A NODE\n //if (tt3.get(c).compareToIgnoreCase(localconnUrl) != 0) {\n //System.out.println(tt3.get(c));\n //System.out.println(localconnUrl);\n Class.forName(tt2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(tt3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(c), tt5.get(c));\n String exportQuery = \"SELECT * FROM \" + tt1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n String name = null;\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb1 = new StringBuilder();\n for (int i = 1; i <= columnCount; i++) {\n //System.out.println(rsmd.getColumnName(i));\n columnNames.add(rsmd.getColumnName(i));\n sb1.append(rsmd.getColumnName(i) + \", \");\n }\n sb1.setLength(sb1.length() - 2);\n name = sb1.toString();\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + tt1.get(0) + \" (\" + name + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getDouble(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n String query2 = sb.toString();\n //System.out.println(query2);\n\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n }\n //}\n\n } catch (Exception e) {\n System.err.println(e);\n } finally {\n //System.out.println(\"Done with \" + Thread.currentThread());\n }\n }\n });\n thread2[i].start();\n }\n\n //System.out.println(mainQuery);\n for (int z = 0; z < tCount; z++) {\n thread1[z].join();\n }\n\n for (int z = 0; z < ttCount; z++) {\n thread2[z].join();\n }\n\n // JOIN SQL PERFORMS HERE\n //System.out.println(mainQuery);\n statement = iconn\n .prepareStatement(mainQuery);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n Object temp;\n String output;\n columnCount = rsmd.getColumnCount();\n double temp1;\n while (rs.next()) {\n StringBuilder sbb = new StringBuilder();\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER || rsmd.getColumnType(k + 1) == Types.BIGINT) {\n temp = rs.getInt(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.FLOAT || rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp1 = rs.getDouble(k + 1);\n sbb.append(temp1 + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sbb.append(temp + \" | \");\n } else {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n }\n }\n sbb.setLength(sbb.length() - 1);\n output = sbb.toString();\n System.out.println(output);\n }\n\n conn.close();\n iconn.close();\n } catch (IOException | ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n }\n }", "public static ArrayList<String> parseFile(String f) throws Exception {\n\t\tArrayList<CommandNode> cmdNode = new ArrayList<CommandNode>();\n\t\tArrayList<MemoryNode> memNode = new ArrayList<MemoryNode>();\n\t\tparseFile(f,cmdNode,memNode);\n\t\treturn preCompile(cmdNode, memNode);\n\t}", "@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }", "private void performSearchUsingFileContents(File file) {\n try {\n FileUtility.CustomFileReader customFileReader =\n new FileUtility.CustomFileReader(file.getAbsolutePath()\n .replace(\".txt\", \"\"));\n\n String queryString = null; int i = 1;\n while ((queryString = customFileReader.readLineFromFile()) != null) {\n \t\n Query q = new QueryParser(Version.LUCENE_47, \"contents\",\n analyzer).parse(QueryParser.escape(queryString));\n\n collector = TopScoreDocCollector\n .create(100, true);\n searcher.search(q, collector);\n ScoreDoc[] hits = collector.topDocs().scoreDocs;\n\n Map<String, Float> documentScoreMapper =\n new HashMap<>();\n Arrays.stream(hits).forEach(hit ->\n {\n int docId = hit.doc;\n Document d = null;\n try {\n d = searcher.doc(docId);\n documentScoreMapper.put(d.get(\"path\"), hit.score);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n SearchResult searchResult =\n new SearchResult(String.valueOf(i), documentScoreMapper);\n\n FileUtility.writeToFile(searchResult, SEARCH_RESULT_DIR + File.separator + i);\n i++;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private File scanForScript(final File scriptPath, final RequestMethod verb) {\n File folder = scriptPath;\n File scriptFile = null;\n while(!folder.equals(scriptRoot)) {\n if(folder.exists() && folder.isDirectory()) {\n LOGGER.info(\"Scanning {} for script with verb {}\", scriptPath, verb);\n IOFileFilter fileFileFilter = FileFilterUtils.fileFileFilter();\n IOFileFilter prefixFileFilter = FileFilterUtils.prefixFileFilter(verb.name());\n File[] matchingFiles = folder.listFiles((FilenameFilter) FileFilterUtils.and(fileFileFilter, prefixFileFilter));\n if(matchingFiles != null && matchingFiles.length >= 1) {\n scriptFile = matchingFiles[0];\n break;\n }\n }\n folder = folder.getParentFile();\n }\n if(scriptFile == null) {\n LOGGER.error(\"Could not find script for verb {} on path {}\", verb.name(), scriptPath.getAbsolutePath());\n }\n return scriptFile;\n }", "@Cacheable(value = \"cypherQueriesCache\", key = \"#name\", unless = \"#result != null\")\n private String loadCypher(String name) {\n\n try {\n logger.debug(\"Cypher query with name {} not found in cache, try loading it from file.\", name);\n\n ResourcePatternResolver resolver = ResourcePatternUtils.getResourcePatternResolver(this.resourceLoader);\n Resource[] queryFiles = resolver.getResources(\"classpath*:queries/*.cql\");\n\n for (Resource queryFile : queryFiles) {\n\n if (queryFile.getFilename().endsWith(name + QUERY_FILE_SUFFIX)) {\n\n logger.debug(\"Found query file with name {} in classpath.\", queryFile.getFilename());\n\n InputStream inputStream = queryFile.getInputStream();\n String cypher = StreamUtils.copyToString(inputStream, Charset.defaultCharset());\n\n return cypher;\n }\n }\n\n logger.warn(\"Query file with name {} not found in classpath.\", name + QUERY_FILE_SUFFIX);\n\n return null;\n } catch (IOException e) {\n throw new IllegalStateException(\"Invalid query file path.\", e);\n }\n }", "<T> List<String> generateFindAllScript(GremlinSource<T> source);", "public void processInput(String theFile){processInput(new File(theFile));}", "private void runScriptShell(Interpreter interpreter, String filePath) {\r\n\r\n\t\tint lineNumber = 1;\r\n\r\n\t\tFile file = new File(filePath);\r\n\r\n\t\tSet<String> errorMessages = new HashSet<String>();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tthis.statementScanner = new Scanner(file);\r\n\r\n\t\t\tthis.statementScanner.useDelimiter(\"(?<!\\\\\\\\);\");\r\n\r\n\t\t\twhile (this.statementScanner.hasNext()) {\r\n\r\n\t\t\t\tthis.input = this.statementScanner.next();\r\n\r\n\t\t\t\tthis.statement.parseStatement(this.input);\r\n\r\n\t\t\t\terrorMessages = statement.getErrorMessages();\r\n\r\n\t\t\t\tif (errorMessages.size() > 0) {\r\n\t\t\t\t\tSystem.out.println(\" Error on line number \" + lineNumber + \": \");\r\n\t\t\t\t\tfor (String errorMessage : errorMessages) {\r\n\r\n\t\t\t\t\t\tSystem.out.println(\" \" + errorMessage);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tinterpreter.processStatement(this.statement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlineNumber++;\r\n\t\t\t}\r\n\r\n\t\t\tstatementScanner.close();\r\n\t\t\t/*\r\n\t\t\t * For script input, the file is written to and saved after the script's\r\n\t\t\t * execution is complete.\r\n\t\t\t */\r\n\t\t\tinterpreter.getDisk().writeDataMapToDisk(interpreter.getMemory().getDataMap());\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\tSystem.out.println(\"Could not access the script file: \" + filePath + \"...no changes were made.\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource source = new Source(\"src\\\\test\\\\resources\\\\a.txt\", buffer);\n\t\t\n\t\tParseOption option = new ParseOption();\n\t\t\n\t\tParser parser = new Parser();\n\t\t\n\t\tparser.parse(source, option);\n\n\t}", "private void parseWindowsScript(String match, File windowsScript, Collection<String> foundTokenList) throws IOException {\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new FileReader(windowsScript));\n\t\tString line = reader.readLine();\n\t\twhile (line != null) {\n\t\t\tint tokenIndex = line.lastIndexOf(match);\n\t\t\tif (tokenIndex >= 0) {\n\t\t\t\tint startIndex = -1;\n\t\t\t\tint percent = line.lastIndexOf(\"%,\");\n\t\t\t\tif (percent >= 0)\n\t\t\t\t\tstartIndex = percent + 2;\n\t\t\t\telse {\n\t\t\t\t\tint equals = line.lastIndexOf(\"=\\\"\");\n\t\t\t\t\tif (equals >= 0)\n\t\t\t\t\t\tstartIndex = equals + 2;\n\t\t\t\t}\n\t\t\t\tint endIndex = line.lastIndexOf(\"\\\"\");\n\t\t\t\t\n\t\t\t\tif (startIndex >= 0 && endIndex >= 0) {\n\t\t\t\t\tString token = line.substring(startIndex, endIndex);\n\t\t\t\t\tfoundTokenList.add(token);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tline = reader.readLine();\n\t\t}\n\t\treader.close();\n\t\t\n\t}", "private void parseFile(Project p, File f, ImportSettings settings, int pass)\n throws ImportException {\n\n\n try {\n BufferedInputStream bs = new BufferedInputStream(new FileInputStream(f));\n Lexer l = new Lexer(bs, f.getAbsolutePath());\n TokenCollection toks = l.lex();\n Parser px = new Parser();\n CompilationUnitNode cu = px.parse(toks, l.StringLiterals);\n parsedElements.add(cu);\n } catch (FeatureNotSupportedException e) {\n //throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n } catch (Exception e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n// throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath());\n }\n\n }", "private void runSqlFromFile(String fileName) throws IOException {\n String[] sqlStatements = StreamUtils.copyToString( new ClassPathResource(fileName).getInputStream(), Charset.defaultCharset()).split(\";\");\n for (String sqlStatement : sqlStatements) {\n sqlStatement = sqlStatement.replace(\"CREATE TABLE \", \"CREATE TABLE OLD\");\n sqlStatement = sqlStatement.replace(\"REFERENCES \", \"REFERENCES OLD\");\n sqlStatement = sqlStatement.replace(\"INSERT INTO \", \"INSERT INTO OLD\");\n jdbcTemplate.execute(sqlStatement);\n }\n }", "public static List<String> separarInstrucoesSql(String script) {\n\n\t\tList<String> retorno = new ArrayList<String>();\n\n\t\tInteger posCaractereInicio = 0;\n\t\tInteger posCaractereFim = 0;\n\t\tString terminador = \";\";\n\t\tboolean terminouScript = false;\n\n\t\tscript = script.trim();\n\n\t\twhile (!terminouScript) {\n\n\t\t\tscript = script.trim();\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tterminouScript = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// verifica se inicia com set term\n\t\t\tString caractereAvaliado = script.substring(posCaractereInicio, 10).toUpperCase();\n\t\t\tcaractereAvaliado = script.replaceAll(\" \", \"\");\n\n\t\t\tif (caractereAvaliado.startsWith(\"SETTERM\")) {\n\t\t\t\tterminador = caractereAvaliado.substring(7, 8);\n\t\t\t\tposCaractereInicio = devolvePosicaoCaractere(script, terminador) + 2;\n\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tposCaractereInicio = 0;\n\t\t\t}\n\n\t\t\t// comentarios fora da instrução SQL\n\t\t\tif (caractereAvaliado.substring(0, 2).equals(\"/*\")) {\n\t\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, \"*/\", true);\n\t\t\t\tscript = script.substring(posCaractereFim + 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tposCaractereInicio = posicaoDoPrimeiroCaracterValido(script);\n\n\t\t\tif (posCaractereInicio > 0) {\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// percorrer a string até encontrar o terminador\n\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, terminador);\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// adicionado na lista de scripts\n\t\t\t// System.out.println(\"-----------------------------------\");\n\t\t\t// System.out.println(script.substring(posCaractereInicio,\n\t\t\t// posCaractereFim));\n\n\t\t\tretorno.add(script.substring(posCaractereInicio, posCaractereFim));\n\n\t\t\tif (script.length() > posCaractereFim + 1)\n\t\t\t\tscript = script.substring(posCaractereFim + 1);\n\n\t\t\t// terminou os scripts\n\t\t\tscript = script.trim();\n\t\t\tif (script.length() < 10)\n\t\t\t\tterminouScript = true;\n\n\t\t\tposCaractereInicio = 0;\n\n\t\t}\n\n\t\treturn retorno;\n\t}", "protected Expression buildBSRJoinQuery() {\n try {\n final InputStream input = ResourceUtil.getResourceAsStream(QUERY_FILE);\n final QueryExpression query = QueryExpressionParser.parse(input);\n return query.toExpression(new ReferenceTable(catalog));\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }", "@SuppressWarnings(\"null\")\n\tpublic QueryParameter parseQuery(String queryString) {\n\t\t\n/*\n\t\t * extract the name of the file from the query. File name can be found after the\n\t\t * \"from\" clause.\n\t\t */\n\n\t\t/*\n\t\t * extract the order by fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"order by\" clause in the query, if at all\n\t\t * the order by clause exists. For eg: select city,winner,team1,team2 from\n\t\t * data/ipl.csv order by city from the query mentioned above, we need to extract\n\t\t * \"city\". Please note that we can have more than one order by fields.\n\t\t */\n\n\t\t/*\n\t\t * extract the group by fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"group by\" clause in the query, if at all\n\t\t * the group by clause exists. For eg: select city,max(win_by_runs) from\n\t\t * data/ipl.csv group by city from the query mentioned above, we need to extract\n\t\t * \"city\". Please note that we can have more than one group by fields.\n\t\t */\n\n\t\t /*\n\t\t * extract the selected fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"select\" clause followed by a space from\n\t\t * the query string. For eg: select city,win_by_runs from data/ipl.csv from the\n\t\t * query mentioned above, we need to extract \"city\" and \"win_by_runs\". Please\n\t\t * note that we might have a field containing name \"from_date\" or \"from_hrs\".\n\t\t * Hence, consider this while parsing.\n\t\t */\n\n\t\t/*\n\t\t * extract the conditions from the query string(if exists). for each condition,\n\t\t * we need to capture the following: 1. Name of field 2. condition 3. value\n\t\t * \n\t\t * For eg: select city,winner,team1,team2,player_of_match from data/ipl.csv\n\t\t * where season >= 2008 or toss_decision != bat\n\t\t * \n\t\t * here, for the first condition, \"season>=2008\" we need to capture: 1. Name of\n\t\t * field: season 2. condition: >= 3. value: 2008\n\t\t * \n\t\t * the query might contain multiple conditions separated by OR/AND operators.\n\t\t * Please consider this while parsing the conditions.\n\t\t * \n\t\t */\n\n\t\t /*\n\t\t * extract the logical operators(AND/OR) from the query, if at all it is\n\t\t * present. For eg: select city,winner,team1,team2,player_of_match from\n\t\t * data/ipl.csv where season >= 2008 or toss_decision != bat and city =\n\t\t * bangalore\n\t\t * \n\t\t * the query mentioned above in the example should return a List of Strings\n\t\t * containing [or,and]\n\t\t */\n\n\t\t/*\n\t\t * extract the aggregate functions from the query. The presence of the aggregate\n\t\t * functions can determined if we have either \"min\" or \"max\" or \"sum\" or \"count\"\n\t\t * or \"avg\" followed by opening braces\"(\" after \"select\" clause in the query\n\t\t * string. in case it is present, then we will have to extract the same. For\n\t\t * each aggregate functions, we need to know the following: 1. type of aggregate\n\t\t * function(min/max/count/sum/avg) 2. field on which the aggregate function is\n\t\t * being applied\n\t\t * \n\t\t * Please note that more than one aggregate function can be present in a query\n\t\t * \n\t\t * \n\t\t */\n\n\t\tString file = null;\n\t\tList<Restriction> restrictions = new ArrayList<Restriction>();\n\t\tList<String> logicalOperators = new ArrayList<String>();\n\t\tList<String> fields = new ArrayList<String>();;\n\t\tList<AggregateFunction> aggregateFunction = new ArrayList<AggregateFunction>();\n\t\tList<String> groupByFields = new ArrayList<String>();;\n\t\tList<String> orderByFields = new ArrayList<String>();;\n\t\tString baseQuery=null;\n\t\n\t\tfile = getFile(queryString);\n\n\t\t\n\t\tString[] conditions = getConditions(queryString);\n\t\tif(conditions!=null) {\n\t\tRestriction[] restriction = new Restriction[conditions.length];\n\t\t\n\t\tfor (int i = 0; i < conditions.length; i++) {\n\t\t\trestriction[i] = new Restriction();\n\t\t\t\n\t\t\tString operator=null;\n\t\t\tString value=null;\n\t\t\tString property=null;\n\t\t\t if(conditions[i].contains(\"<=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"<=\");\n\t\t\t\toperator=\"<=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\">=\")) {\n\t\t\t\tString[] split = conditions[i].split(\">=\");\n\t\t\t\toperator=\">=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\">\")) {\n\t\t\t\tString[] split = conditions[i].split(\">\");\n\t\t\t\toperator=\">\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"!=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"!=\");\n\t\t\t\toperator=\"!=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"=\");\n\t\t\t\toperator=\"=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t if(value.contains(\"'\")) {\n\t\t\t\t\t value= value.replaceAll(\"'\",\"\").trim();\n\t\t\t\t }\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"<\")) {\n\t\t\t\tString[] split = conditions[i].split(\"<\");\n\t\t\t\toperator=\"<\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\t \n\t\t\t\n\t\t\trestriction[i].setCondition(operator);\n\t\t\trestriction[i].setPropertyName(property);\n\t\t\trestriction[i].setPropertyValue(value);\n\t\t\trestrictions.add(restriction[i]);\n\n\t\t}\n\t\t}\n\t\n\t\tString[] operators = getLogicalOperators(queryString);\n\t\tif(operators!=null) {\n\t\tfor (String op : operators) {\n\t\t\tlogicalOperators.add(op);\n\t\t}\n\t\t}\n\t\t\n\t\tString[] filds = getFields(queryString);\n\t\tif(filds!=null) {\n\t\tfor (String field : filds) {\n\t\t\tfields.add(field);\n\t\t}\n\t\t}\n\t\t\n\t\tString[] aggregationVal = getAggregateFunctions(queryString);\n\t\tif(aggregationVal!=null) {\n\t\tAggregateFunction[] aggregation = new AggregateFunction[aggregationVal.length];\n\t\tfor (int i = 0; i < aggregationVal.length; i++) {\n\t\t\taggregation[i] = new AggregateFunction();\n\t\t\tString[] split = (aggregationVal[i].replace(\"(\", \" \")).split(\" \");\n\t\t\tSystem.out.println(split[0]);\n\t\t\tSystem.out.println(split[1].replace(\")\", \"\").trim());\n\t\t\t\n\t\t\taggregation[i].setFunction(split[0]);\n\t\t\taggregation[i].setField(split[1].replace(\")\", \"\").trim());\n\t\t\taggregateFunction.add(aggregation[i]);\n\n\t\t}\n\t\t}\n\t\t\n\t\t\t\n\t\t\n\t\tString[] groupBy = getGroupByFields(queryString);\n\t\tif(groupBy!=null) {\n\t\tfor (String group : groupBy) {\n\t\t\tgroupByFields.add(group);\n\t\t}\n\t\t}\n\t\n\t\tString[] orderBy = getOrderByFields(queryString);\n\t\tif(orderBy!=null) {\n\t\tfor (String order : orderBy) {\n\t\t\torderByFields.add(order);\n\t\t}\n\t\t}\n\t\tqueryParameter.setFile(file);\n\t\tif(restrictions.size()!=0) {\n\t\t\tqueryParameter.setRestrictions(restrictions);\n\t\t}\n\t\telse {\n\t\t\tqueryParameter.setRestrictions(null);\n\t\t}\n\t\tif(logicalOperators.size()!=0) {\n\t\tqueryParameter.setLogicalOperators(logicalOperators);\n\t\t}\n\t\telse {\n\t\t\tqueryParameter.setLogicalOperators(null);\n\t\t}\n\t\tbaseQuery=getBaseQuery(queryString);\n\t\t\n\t\tqueryParameter.setFields(fields);\n\t\tqueryParameter.setAggregateFunctions(aggregateFunction);\n\t\tqueryParameter.setGroupByFields(groupByFields);\n\t\tqueryParameter.setOrderByFields(orderByFields);\n\t\tqueryParameter.setBaseQuery(baseQuery.trim());\n\t\treturn queryParameter;\n\n\t}", "public List<File> query(List<Group> groups) throws Exception {\n \tList<File> ret = new ArrayList<File>();\n \tInputStream reader = getClass().getResourceAsStream(\"/resources/query-template.json\");\n \tString json = new String();\n \tbyte[] bbuf = new byte[1024];\n \tint count = reader.read(bbuf);\n \twhile(count > 0) { \n \t\tjson += new String(bbuf);\n \t\tcount = reader.read(bbuf);\n \t}\n \treader.close();\n \tArrayList<String> queries = new ArrayList<String>();\n \tfor(Group g: groups) {\n \t\tqueries.add(g.getKey()+\": \\\"\"+g.getValue()+\"\\\"\");\n \t}\n \tString query = StringUtils.join(queries.iterator(), \" \");\n \tjson.replace(\"@@QUERY@@\", query);\n \tHttpResponse resp = client.post(new StringEntity(json), new URI(config.queryurl()), \"application/json\");\n \tString outputJson = this.read_http_entity(resp.getEntity());\n \tJsonParser jsonParser = new JsonParser();\n \tJsonElement firstHits = jsonParser.parse(outputJson);\n \tassert firstHits.isJsonObject();\n \tJsonElement nextHits = firstHits.getAsJsonObject().get(\"hits\");\n \tassert firstHits.getAsJsonObject().get(\"myemsl_auth_token\").isJsonPrimitive();\n \tString authtoken = firstHits.getAsJsonObject().get(\"myemsl_auth_token\").getAsString();\n \tJsonElement lastHits = nextHits.getAsJsonObject().get(\"hits\");\n \tclass ItemIDComparator implements Comparator<File> {\n \t @Override\n \t public int compare(File a, File b) {\n \t \tInteger x = null;\n \t \tInteger y = null;\n \t \ttry {\n \t \t\tx = ((gov.pnnl.emsl.PacificaLibrary.FileAuthInfo)a.getAuthInfo()).itemID;\n \t \t\ty = ((gov.pnnl.emsl.PacificaLibrary.FileAuthInfo)b.getAuthInfo()).itemID;\n \t \t} catch (Exception ex) {}\n \t \treturn x.compareTo(y);\n \t }\n \t}\n \tfor(JsonElement item: lastHits.getAsJsonArray())\n \t{\n \t\tassert item.isJsonObject();\n \t\tJsonElement source = item.getAsJsonObject().get(\"_source\");\n \t\tif(isSubSet(groups, source.getAsJsonObject())) {\n \t\t\tString filename = source.getAsJsonObject().get(\"filename\").getAsString();\n \t\t\tInteger itemid = Integer.parseInt(item.getAsJsonObject().get(\"_id\").getAsString());\n \t\tret.add(new FileMetaData(filename, null, null, new FileAuthInfo(itemid, filename, authtoken)));\n \t\t}\n \t}\n \tCollections.sort(ret, new ItemIDComparator());\n \treturn ret;\n }", "private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "public ImportCommand parseFile(File file) throws ParseException {\n\n FileReader fr;\n\n try {\n fr = new FileReader(file);\n } catch (FileNotFoundException fnfe) {\n throw new ParseException(\"File not found\");\n }\n\n BufferedReader br = new BufferedReader(fr);\n return parseLinesFromFile(br);\n }", "protected void evaluate(String filePath) throws FormatException {\n\n try {\n int latSlash = filePath.lastIndexOf(\"/\");\n if (latSlash > 1) {\n if (DEBUG) {\n Debug.output(\"Have lat index of \" + latSlash);\n }\n String lonSearch = filePath.substring(0, latSlash);\n\n if (DEBUG) {\n Debug.output(\"Searching for lon index in \" + lonSearch);\n }\n int lonSlash = lonSearch.lastIndexOf(\"/\");\n if (lonSlash > 1) {\n filename = filePath.substring(latSlash + 1);\n String latString = filename.toUpperCase();\n\n if (DEBUG) {\n Debug.output(\"have lat \" + latString);\n }\n\n int dotIndex = latString.indexOf(\".\");\n if (dotIndex > 0) {\n\n lat = Double.parseDouble(latString.substring(1,\n dotIndex));\n if (latString.charAt(0) == 'S') {\n lat *= -1;\n }\n\n subDirs = filePath.substring(lonSlash + 1, latSlash);\n String dd = filePath.substring(0, lonSlash + 1);\n if (dd.length() > 0) {\n dtedDir = dd;\n }\n\n String lonString = subDirs.toUpperCase();\n\n if (DEBUG) {\n Debug.output(\"have lon \" + lonString);\n }\n\n lon = Double.parseDouble(lonString.substring(1));\n if (lonString.charAt(0) == 'W') {\n lon *= -1;\n }\n\n level = (int) Integer.parseInt(filePath.substring(filePath.length() - 1));\n if (DEBUG) {\n Debug.output(\"have level \" + level);\n }\n return;\n }\n }\n }\n } catch (NumberFormatException nfe) {\n\n }\n\n throw new FormatException(\"StandardDTEDNameTranslator couldn't convert \"\n + filePath + \" to valid parameters\");\n }", "public void runScriptFile(String scriptUrl, boolean mainScript, Hashtable vars) throws Throwable {\n testResults = new Vector();\n testKeys = new Hashtable();\n \n if (vars != null) {\n definedVars = vars;\n } else {\n // Set predefined variables\n definedVars = new Hashtable();\n }\n \n // Add more variables (platform independent)\n if (devInfo.getDeviceRole() == DeviceInfo.DeviceRole.TABLET) {\n definedVars.put(\"devicetype\", \"table\");\n } else {\n definedVars.put(\"devicetype\", \"phone\");\n }\n \n long startTime = System.currentTimeMillis();\n try {\n runScriptFileI(scriptUrl, mainScript);\n } finally {\n long endTime = System.currentTimeMillis();\n dumpResults(startTime, endTime);\n }\n }", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "@Override\n public String generareSourcecodetoReadInputFromFile() throws Exception {\n String typeVar = VariableTypes.deleteStorageClasses(this.getType())\n .replace(IAbstractDataNode.REFERENCE_OPERATOR, \"\");\n // Ex: A::B, ::B. We need to get B\n if (typeVar.contains(\"::\"))\n typeVar = typeVar.substring(typeVar.lastIndexOf(\"::\") + 2);\n\n String loadValueStm = \"data.findStructure\" + typeVar + \"ByName\" + \"(\\\"\" + getVituralName() + \"\\\")\";\n\n String fullStm = typeVar + \" \" + this.getVituralName() + \"=\" + loadValueStm + SpecialCharacter.END_OF_STATEMENT;\n return fullStm;\n }", "@Override\n public ImportCommand parse(String args) throws ParseException {\n if (args.isEmpty()) {\n return parseFile(getFileFromFileBrowser());\n } else {\n return parseFile(getFileFromArgs(args));\n }\n }", "protected void executeSQLScript(SQLiteDatabase database, String assetName) {\n /*\n * variables locales para manejar la lectura del archivo de scripts\n */\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n byte buf[] = new byte[1024];\n int len;\n AssetManager assetManager = context.getAssets();\n InputStream inputStream = null;\n\n try {\n /*\n * obtenemos el asset y lo convertimos a string\n */\n inputStream = assetManager.open(assetName);\n while ((len = inputStream.read(buf)) != -1) {\n outputStream.write(buf, 0, len);\n }\n outputStream.close();\n inputStream.close();\n\n /*\n * desencriptamos el archivo\n */\n String sqlClear = Cypher.decrypt(SD, outputStream.toString());\n // String sqlClear = outputStream.toString();\n\n /*\n * separamos la cadena por el separador de sentencias\n */\n String[] createScript = sqlClear.split(\";\");\n\n /*\n * por cada sentencia del archivo ejecutamos la misma en la base de\n * datos\n */\n for (int i = 0; i < createScript.length; i++) {\n String sqlStatement = createScript[i].trim();\n\n if (sqlStatement.startsWith(\"--\")) {\n continue;\n }\n\n if (sqlStatement.length() > 0) {\n Log.i(CsTigoApplication.getContext().getString(\n CSTigoLogTags.DATABASE.getValue()),\n CsTigoApplication.getContext().getString(\n R.string.database_exec_sql)\n + sqlStatement);\n\n try {\n database.execSQL(sqlStatement + \";\");\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }\n }\n\n } catch (IOException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_read_asset)\n + e.getMessage());\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "private String getAFileFromSegment(Value segment, Repository repository)\n {\n \n RepositoryConnection con = null;\n try\n {\n con = getRepositoryConnection(repository);\n \n String adaptorQuery = \"SELECT ?fileName WHERE { <\" + segment + \"> <http://toif/contains> ?file . \"\n + \"?file <http://toif/type> \\\"toif:File\\\" .\" + \"?file <http://toif/name> ?fileName . }\";\n \n TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);\n \n TupleQueryResult queryResult = adaptorTupleQuery.evaluate();\n \n while (queryResult.hasNext())\n {\n BindingSet adaptorSet = queryResult.next();\n Value name = adaptorSet.getValue(\"fileName\");\n \n return name.stringValue();\n }\n \n queryResult.close();\n }\n catch (RepositoryException e)\n {\n e.printStackTrace();\n }\n catch (MalformedQueryException e)\n {\n e.printStackTrace();\n }\n catch (QueryEvaluationException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n con.close();\n }\n catch (RepositoryException e)\n {\n e.printStackTrace();\n }\n }\n return null;\n }", "public static void readQueryFromFile(String fileName, String outputFile, String outputMetricsFile, String op, Indexer si) {\n readQueryFromFile(fileName, outputFile, outputMetricsFile, op, si, null);\n }", "public List<Script> populateScriptsFromFileList(final List<File> files)\n\t{\n\t\tfinal List<Script> addedScripts = new ArrayList<>();\n\t\t\n\t\tfor (final File scriptFile : files)\n\t\t{\n\t\t\tScript script = scripts.get(Script.getScriptIdFromFile(scriptFile));\n\t\t\t\n\t\t\tif (script == null)\t\t\t\t\t\n\t\t\t{\t\t\t\n\t\t\t\tscript = new Script();\n\t\t\t\t\n\t\t\t\tcreateFileBasedScript(script, scriptFile, new ScriptDetails(true, false, scriptFile.getName())); \t\t\t\n\t\t\t\t\n\t\t\t\taddedScripts.add(script);\n\t\t\t\taddScript(script);\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn addedScripts;\n\t}", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }", "public String parseSrc() throws Exception{\n\t\tr = new FileReader(userArg); \r\n\t\tst = new StreamTokenizer(r);\r\n\t\t st.eolIsSignificant(true);\r\n\t\t st.commentChar(46);\r\n\t\t st.whitespaceChars(9, 9);\r\n\t\t st.whitespaceChars(32, 32);\r\n\t\t st.wordChars(39, 39);\r\n\t\t st.wordChars(44, 44);\r\n\t\t \r\n\t\t //first we check for a specified start address\r\n\t\t while (InstructionsRead < 2) {\r\n\t\t \tif (st.sval != null) {\r\n\t\t \t\tInstructionsRead++;\r\n\t\t \t\tif (st.sval.equals(\"START\")) {\r\n\t\t \t\twhile(st.ttype != StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tst.nextToken();\r\n\t\t \t\t}\r\n\t\t \t\tDDnval = st.nval;\r\n\t\t \t\tstartAddress = Integer.parseInt(\"\" + DDnval.intValue(), 16);\r\n\t\t \t\tlocctr = startAddress;\r\n\t\t \t\tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t\t \t\tif (sLocctr.length() == 1) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 2) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse {\r\n\t\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\t//writer.write(\"\" + locctr); //should write to IF, not working yet 2/15/2011\r\n\t\t \t\tstartSpecified = true;\r\n\t\t \t\t}\r\n\t\t \t\telse if (!st.sval.equals(\"START\") && InstructionsRead < 2) { //this should be the program name, also could allow for label here potentially...\r\n\t\t \t\t\t//this is the name of the program\r\n\t\t \t\t\t//search SYMTAB for label etc. \r\n\t\t \t\t\tname = st.sval;\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t st.nextToken();\r\n\t\t }\r\n\t\t if (!startSpecified) {\r\n\t\t \tstartAddress = 0;\r\n\t\t \tlocctr = startAddress;\r\n\t\t }\r\n\t\t startAddress2 = startAddress;\r\n\t\t /*\r\n\t\t ATW = Integer.toHexString(startAddress2.intValue());\r\n\t\t \r\n\t\t for (int i = 0; i<(6-ATW.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(ATW);\r\n\t\t myWriter.newLine();//end of line for now; in ReadIF when this line is read and translated to object code, the program length will be tacked on the end\r\n\t\t */\r\n\t\t \r\n\t\t //Now that startAddress has been established, we move on to the main parsing loop\r\n\t\t while (st.ttype != StreamTokenizer.TT_EOF) { //starts parsing to end of file\r\n\t\t \t//System.out.println(\"Stuck in eof\");\r\n\t\t \t//iLocctr = locctr.intValue();\r\n\t\t \tinstFound = false;\r\n\t\t \topcodeDone = false;\r\n\t\t \tlabelDone = false;\r\n\t\t \tmoveOn = true;\r\n\t\t \t//constantCaseW = false;\r\n\t\t \tconstantCaseB = false;\r\n\t\t \txfound = false;\r\n\t\t \tcfound = false;\r\n\t\t \t\r\n\t\t \tInstructionsRead = 0; //init InsRead to 0 at the start of each line\r\n\t\t \tSystem.out.println(\"new line\");\r\n\t\t \tSystem.out.println(\"Ins read: \" + InstructionsRead);\r\n\t\t \tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t \t\tif (sLocctr.length() == 1) {\r\n\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 2) {\r\n\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t\t \tif (foundEnd()) {\r\n\t\t \t\tbreak;\r\n\t\t \t}\r\n\t\t \twhile (st.ttype != StreamTokenizer.TT_EOL) {//breaks up parsing by lines so that InstructionsRead will be a useful count\r\n\t\t \t\t\r\n\t\t \t\tmoveOn = true;\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_WORD) { \r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tSystem.out.println(st.sval);\r\n\t\t \t\t\tSystem.out.println(\"Instructions Read: \" + InstructionsRead);\r\n\t\t \t\t\tif (foundEnd()) {\r\n\t\t \t\t\t\tbreak;\r\n\t\t \t\t\t}\r\n\t\t \t\t\t/*\r\n\t\t \t\t\t * The whole instructinsread control architecture doesn't quite work, because\r\n\t\t \t\t\t * the ST doesn't count the whitespace it reads in. This is by design because\r\n\t\t \t\t\t * the prof specified that whitespace is non-regulated and thus we cannot\r\n\t\t \t\t\t * predict exactly how many instances of char dec value 32 (space) will appear\r\n\t\t \t\t\t * before and/or between the label/instruction/operand 'fields'. \r\n\t\t \t\t\t * \r\n\t\t \t\t\t * What we could try alternatively is to structure the control around'\r\n\t\t \t\t\t * the optab, since it it static and populated pre-runtime. The schema might\r\n\t\t \t\t\t * go something like this: first convert whatever the sval or nval is to string.\r\n\t\t \t\t\t * Then call the optab.searchOpcode method with the resultant string as the input\r\n\t\t \t\t\t * parameter. If the string is in optab then it is an instruction and the ST is in the\r\n\t\t \t\t\t * instruction 'field' and boolean foundInst is set to true. If it is not in optab AND a boolean variable foundInst which resets to\r\n\t\t \t\t\t * false at the beginning of each new line is still false, then it is a label being declared in the label 'field'\r\n\t\t \t\t\t * If it is not in the optab AND foundInst is true, then the ST is at the operand 'field'.\r\n\t\t \t\t\t * This should work even if the prof has a crappy line with just a label declaration and no instruction or operand, because there\r\n\t\t \t\t\t * definitely cannot be an operand without an instruction...\r\n\t\t \t\t\t */\r\n\t\t \t\t\tif (instFound){\r\n\t\t \t\t\t\tprocessOperand(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (st.sval.equals(\"WORD\") || st.sval.equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (st.sval.equals(\"RESW\") || st.sval.equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(st.sval)) {//if true this is the instruction\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {//otherwise this is the label\r\n\t\t \t\t\t\t\tprocessLabel(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\t//else{ //if instFound is true, this must be the operand field\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//processOperand(st);\r\n\t\t \t\t\t//}\r\n\t\t \t\t\t//if (InstructionsRead == 3) {//this is the operand field\r\n\t\t \t\t\t\t//processOperand();\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t//}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"WORD\") || NtoString(st.nval).equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"RESW\") || NtoString(st.nval).equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(\"\" + st.nval)) {\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {\r\n\t\t \t\t\t\t\tprocessLabelN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse{ //this is the operand field\r\n\t\t \t\t\t\tprocessOperandN(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \tif (moveOn){\r\n\t\t \tst.nextToken(); //read next token in current line\r\n\t\t \t}\r\n\t\t \t}\r\n\t\t \t////write line just finished to IF eventually\r\n\t\t if (moveOn){\r\n\t\t st.nextToken(); //read first token of next line\t\r\n\t\t }\r\n\t\t }\r\n\t\t programLength = (locctr - startAddress); \r\n\t\t programLength2 = programLength;\r\n\t\t System.out.println(\" !!prgmlngth2:\" + Integer.toHexString(programLength2.intValue()));\r\n\t\t /*\r\n\t\t sProgramLength = Integer.toHexString(programLength2.intValue());\r\n\t\t for (int i = 0; i<(6-sProgramLength.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(sProgramLength);\r\n\t\t myWriter.close();\r\n\t\t ////myWriter.close();\r\n\t\t \r\n\t\t */\r\n\t\t r.close();\r\n\t\t System.out.println(\"?????!?!?!?!?ALPHA?!?!?!?!?!??!?!?!\");\r\n\t\t if (hexDigitCount/2 < 16){\r\n\t\t \tlineLength.add(\"0\" + Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t else{\r\n\t\t lineLength.add(Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t for (int i = 0; i<lineLength.size(); i++){\r\n\t\t System.out.println(lineLength.get(i));\r\n\t\t }\r\n\t\t // System.out.println(hexDigitCount);\r\n\t\t ReadIF pass2 = new ReadIF(this.optab,this.symtab,this.startAddress2,this.programLength2,this.name,this.lineLength,this.userArg);\r\n\t\t return st.sval;\r\n\t\t \r\n\t\t\r\n\r\n\t}", "protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }", "public final void executeSQL(Connection conn,DbConnVO vo,String fileName) throws Throwable {\r\n PreparedStatement pstmt = null;\r\n StringBuffer sql = new StringBuffer(\"\");\r\n InputStream in = null;\r\n\r\n try {\r\n try {\r\n in = this.getClass().getResourceAsStream(\"/\" + fileName);\r\n }\r\n catch (Exception ex5) {\r\n }\r\n if (in==null)\r\n in = new FileInputStream(org.openswing.swing.util.server.FileHelper.getRootResource() + fileName);\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n String line = null;\r\n ArrayList vals = new ArrayList();\r\n int pos = -1;\r\n String oldfk = null;\r\n String oldIndex = null;\r\n StringBuffer newIndex = null;\r\n StringBuffer newfk = null;\r\n ArrayList fks = new ArrayList();\r\n ArrayList indexes = new ArrayList();\r\n boolean fkFound = false;\r\n boolean indexFound = false;\r\n String defaultValue = null;\r\n int index = -1;\r\n StringBuffer unicode = new StringBuffer();\r\n boolean useDefaultValue = false;\r\n// vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") ||\r\n// vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") ||\r\n//\t\t\t\t\tvo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") ||\r\n// vo.getDriverName().equals(\"com.mysql.jdbc.Driver\");\r\n while ( (line = br.readLine()) != null) {\r\n sql.append(' ').append(line);\r\n if (line.endsWith(\";\")) {\r\n if (vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\")) {\r\n sql = replace(sql, \" VARCHAR(\", \" VARCHAR2(\");\r\n sql = replace(sql, \" NUMERIC(\", \" NUMBER(\");\r\n sql = replace(sql, \" DECIMAL(\", \" NUMBER(\");\r\n sql = replace(sql, \" TIMESTAMP\", \" DATE \");\r\n sql = replace(sql, \" DATETIME\", \" DATE \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().toLowerCase().contains(\"postgres\")) {\r\n sql = replace(sql, \" DATETIME\", \" TIMESTAMP \");\r\n sql = replace(sql, \" DATE \", \" TIMESTAMP \");\r\n }\r\n else {\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n\r\n\r\n sql = replace(sql,\"ON DELETE NO ACTION\",\"\");\r\n sql = replace(sql,\"ON UPDATE NO ACTION\",\"\");\r\n\r\n if (sql.indexOf(\":COMPANY_CODE\") != -1) {\r\n sql = replace(sql, \":COMPANY_CODE\", \"'\" + vo.getCompanyCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":COMPANY_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":COMPANY_DESCRIPTION\",\r\n \"'\" + vo.getCompanyDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_CODE\",\r\n \"'\" + vo.getLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_DESCRIPTION\",\r\n \"'\" + vo.getLanguageDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":CLIENT_LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":CLIENT_LANGUAGE_CODE\",\r\n \"'\" + vo.getClientLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":PASSWORD\") != -1) {\r\n sql = replace(sql, \":PASSWORD\", \"'\" + vo.getAdminPassword() + \"'\");\r\n }\r\n if (sql.indexOf(\":DATE\") != -1) {\r\n sql = replace(sql, \":DATE\", \"?\");\r\n vals.add(new java.sql.Date(System.currentTimeMillis()));\r\n }\r\n\r\n if (sql.indexOf(\":CURRENCY_CODE\") != -1) {\r\n sql = replace(sql, \":CURRENCY_CODE\", \"'\" + vo.getCurrencyCodeREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":CURRENCY_SYMBOL\") != -1) {\r\n sql = replace(sql, \":CURRENCY_SYMBOL\", \"'\" + vo.getCurrencySymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":DECIMALS\") != -1) {\r\n sql = replace(sql, \":DECIMALS\", vo.getDecimalsREG03().toString());\r\n }\r\n if (sql.indexOf(\":DECIMAL_SYMBOL\") != -1) {\r\n sql = replace(sql, \":DECIMAL_SYMBOL\", \"'\" + vo.getDecimalSymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":THOUSAND_SYMBOL\") != -1) {\r\n sql = replace(sql, \":THOUSAND_SYMBOL\", \"'\" + vo.getThousandSymbolREG03() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_1\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_1\", \"'\" + vo.getUseVariantType1() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_2\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_2\", \"'\" + vo.getUseVariantType2() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_3\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_3\", \"'\" + vo.getUseVariantType3() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_4\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_4\", \"'\" + vo.getUseVariantType4() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_5\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_5\", \"'\" + vo.getUseVariantType5() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":VARIANT_1\") != -1) {\r\n sql = replace(sql, \":VARIANT_1\", \"'\" + (vo.getVariant1()==null || vo.getVariant1().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant1()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_2\") != -1) {\r\n sql = replace(sql, \":VARIANT_2\", \"'\" + (vo.getVariant2()==null || vo.getVariant2().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant2()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_3\") != -1) {\r\n sql = replace(sql, \":VARIANT_3\", \"'\" + (vo.getVariant3()==null || vo.getVariant3().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant3()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_4\") != -1) {\r\n sql = replace(sql, \":VARIANT_4\", \"'\" + (vo.getVariant4()==null || vo.getVariant4().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant4()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_5\") != -1) {\r\n sql = replace(sql, \":VARIANT_5\", \"'\" + (vo.getVariant5()==null || vo.getVariant5().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant5()) + \"'\");\r\n }\r\n\r\n if (!useDefaultValue)\r\n while((pos=sql.indexOf(\"DEFAULT \"))!=-1) {\r\n defaultValue = sql.substring(pos, sql.indexOf(\",\", pos));\r\n sql = replace(\r\n sql,\r\n defaultValue,\r\n \"\"\r\n );\r\n }\r\n\r\n fkFound = false;\r\n while((pos=sql.indexOf(\"FOREIGN KEY\"))!=-1) {\r\n oldfk = sql.substring(pos,sql.indexOf(\")\",sql.indexOf(\")\",pos)+1)+1);\r\n sql = replace(\r\n sql,\r\n oldfk,\r\n \"\"\r\n );\r\n newfk = new StringBuffer(\"ALTER TABLE \");\r\n newfk.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newfk.append(\" ADD \");\r\n newfk.append(oldfk);\r\n fks.add(newfk);\r\n fkFound = true;\r\n }\r\n\r\n if (fkFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n indexFound = false;\r\n while((pos=sql.indexOf(\"INDEX \"))!=-1) {\r\n oldIndex = sql.substring(pos,sql.indexOf(\")\",pos)+1);\r\n sql = replace(\r\n sql,\r\n oldIndex,\r\n \"\"\r\n );\r\n newIndex = new StringBuffer(\"CREATE \");\r\n newIndex.append(oldIndex.substring(0,oldIndex.indexOf(\"(\")));\r\n newIndex.append(\" ON \");\r\n newIndex.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newIndex.append( oldIndex.substring(oldIndex.indexOf(\"(\")) );\r\n indexes.add(newIndex);\r\n indexFound = true;\r\n }\r\n\r\n if (indexFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n // check for unicode chars...\r\n while((index=sql.indexOf(\"\\\\u\"))!=-1) {\r\n for(int i=index+2;i<Math.min(sql.length(),index+2+6);i++)\r\n if (Character.isDigit(sql.charAt(i)) ||\r\n sql.charAt(i)=='A' ||\r\n sql.charAt(i)=='B' ||\r\n sql.charAt(i)=='C' ||\r\n sql.charAt(i)=='D' ||\r\n sql.charAt(i)=='E' ||\r\n sql.charAt(i)=='F')\r\n if (unicode.length() < 4)\r\n unicode.append(sql.charAt(i));\r\n else\r\n break;\r\n if (unicode.length()>0) {\r\n sql.delete(index, index+1+unicode.length());\r\n sql.setCharAt(index, new Character((char)Integer.valueOf(unicode.toString(),16).intValue()).charValue());\r\n unicode.delete(0, unicode.length());\r\n }\r\n }\r\n\r\n\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n // remove fks before dropping table!\r\n String table = sql.toString().toUpperCase().replace('\\n',' ').replace('\\r',' ').trim();\r\n table = table.substring(10).trim();\r\n if (table.endsWith(\";\"))\r\n table = table.substring(0,table.length()-1);\r\n ResultSet rset = conn.getMetaData().getExportedKeys(null,vo.getUsername().toUpperCase(),table);\r\n String fkName = null;\r\n String tName = null;\r\n Statement stmt2 = conn.createStatement();\r\n boolean fksFound = false;\r\n while(rset.next()) {\r\n fksFound = true;\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n if (!fksFound &&\r\n !vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.mysql.jdbc.Driver\")\r\n && !vo.getDriverName().equals(\"org.sqlite.JDBC\")) {\r\n // case postgres...\r\n rset = conn.getMetaData().getExportedKeys(null,null,null);\r\n while(rset.next()) {\r\n if (rset.getString(3).toUpperCase().equals(table)) {\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n }\r\n\r\n try {\r\n stmt2.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n } // end if\r\n\r\n if (sql.toString().trim().length()>0) {\r\n String query = sql.toString().substring(0,sql.length() - 1);\r\n System.out.println(\"Execute query: \" + query);\r\n pstmt = conn.prepareStatement(query);\r\n for (int i = 0; i < vals.size(); i++) {\r\n pstmt.setObject(i + 1, vals.get(i));\r\n }\r\n\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n try {\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n//\t\t\t\t\t\t\t\t\tLogger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"Invalid SQL: \" + sql, ex4);\r\n }\r\n else\r\n throw ex4;\r\n }\r\n catch (Exception exx4) {\r\n throw ex4;\r\n }\r\n }\r\n pstmt.close();\r\n }\r\n\r\n sql.delete(0, sql.length());\r\n vals.clear();\r\n }\r\n }\r\n br.close();\r\n\r\n for(int i=0;i<fks.size();i++) {\r\n sql = (StringBuffer)fks.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex4);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n for(int i=0;i<indexes.size();i++) {\r\n sql = (StringBuffer)indexes.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex3) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex3);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n conn.commit();\r\n\r\n }\r\n catch (Throwable ex) {\r\n try {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex);\r\n }\r\n catch (Exception ex2) {\r\n }\r\n throw ex;\r\n }\r\n finally {\r\n try {\r\n if (pstmt!=null)\r\n pstmt.close();\r\n }\r\n catch (SQLException ex1) {\r\n }\r\n }\r\n }", "public static ParserResult loadDatabase(File fileToOpen, String encoding) throws IOException {\n \n Reader reader = getReader(fileToOpen, encoding);\n String suppliedEncoding = null;\n try {\n boolean keepon = true;\n int piv = 0, c;\n while (keepon) {\n c = reader.read();\n if ( (piv == 0 && Character.isWhitespace( (char) c)) ||\n c == GUIGlobals.SIGNATURE.charAt(piv))\n piv++;\n else\n keepon = false;\n found: if (piv == GUIGlobals.SIGNATURE.length()) {\n keepon = false;\n // Found the signature. The rest of the line is unknown, so we skip it:\n while (reader.read() != '\\n');\n // Then we must skip the \"Encoding: \"\n for (int i=0; i<GUIGlobals.encPrefix.length(); i++) {\n if (reader.read() != GUIGlobals.encPrefix.charAt(i))\n break found; // No, it doesn't seem to match.\n }\n // If ok, then read the rest of the line, which should contain the name\n // of the encoding:\n StringBuffer sb = new StringBuffer();\n while ((c = reader.read()) != '\\n')\n sb.append((char)c);\n suppliedEncoding = sb.toString();\n }\n \n }\n } catch (IOException ex) {}\n \n if ((suppliedEncoding != null) && (!suppliedEncoding.equalsIgnoreCase(encoding))) {\n Reader oldReader = reader;\n try {\n // Ok, the supplied encoding is different from our default, so we must make a new\n // reader. Then close the old one.\n reader = getReader(fileToOpen, suppliedEncoding);\n oldReader.close();\n //System.out.println(\"Using encoding: \"+suppliedEncoding);\n } catch (IOException ex) {\n reader = oldReader; // The supplied encoding didn't work out, so we keep our\n // existing reader.\n \n //System.out.println(\"Error, using default encoding.\");\n }\n } else {\n // We couldn't find a supplied encoding. Since we don't know far into the file we read,\n // we start a new reader.\n reader.close();\n reader = getReader(fileToOpen, encoding);\n //System.out.println(\"No encoding supplied, or supplied encoding equals default. Using default encoding.\");\n }\n \n \n //return null;\n \n BibtexParser bp = new BibtexParser(reader);\n \n ParserResult pr = bp.parse();\n pr.setEncoding(encoding);\n \n return pr;\n }", "public String getScriptID(String scriptName) throws MDSException {\r\n\r\n\t\tString scriptID = null;\r\n\t\tString key = scriptName.toUpperCase();\r\n\t\tscriptID = (String) scriptMap.get(key);\r\n\t\tif (scriptID == null || scriptID == \"\") {\r\n\t\t\tscriptID = \"\";\r\n\t\t\t//logger.warn(\"script : \" + scriptName + \" is not loaded !\");\r\n\t\t}\r\n\t\treturn scriptID;\r\n\t}", "public SqlFileParser(String filename) {\n try {\n this.reader = new BufferedReader(new FileReader(filename));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + filename);\n }\n }", "private String readAndProcessSourceFile(String fileName, HashMap<String, String> substitutions) {\r\n try {\r\n // Read the source file packaged as a resource\r\n BufferedReader br = new BufferedReader(new InputStreamReader(\r\n getClass().getClassLoader().getResourceAsStream(fileName)));\r\n StringBuffer sb = new StringBuffer();\r\n try {\r\n String line = null;\r\n while (true) {\r\n line = br.readLine();\r\n if (line == null) {\r\n break;\r\n }\r\n sb.append(line + \"\\n\");\r\n }\r\n }\r\n finally {\r\n br.close();\r\n }\r\n String text = sb.toString();\r\n\r\n // Handle substitutions as key-value pairs where key is a regular expression and value is the substitution\r\n if (substitutions != null) {\r\n for (Entry<String, String> s : substitutions.entrySet()) {\r\n Pattern p = Pattern.compile(s.getKey());\r\n Matcher m = p.matcher(text);\r\n sb = new StringBuffer();\r\n while (m.find()) {\r\n m.appendReplacement(sb, m.group(1) + s.getValue());\r\n }\r\n m.appendTail(sb);\r\n text = sb.toString();\r\n }\r\n }\r\n\r\n return text;\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public void parse() {\n File sourceFile = new File(DEFAULT_DS_FILE_PATH);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory\n .newInstance();\n documentBuilderFactory.setNamespaceAware(true);\n DocumentBuilder builder = null;\n try {\n builder = documentBuilderFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n Document document = null;\n try {\n document = builder.parse(sourceFile);\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n XPathFactory xpathFactory = XPathFactory.newInstance();\n XPath xpath = xpathFactory.newXPath();\n\n //read the database properties and assign to local variables.\n XPathExpression expression = null;\n Node result = null;\n try {\n expression = xpath.compile(DRIVER_CLASS_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n driverClassName = result.getTextContent();\n expression = xpath.compile(CONNECTION_URL_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n connectionUrl = result.getTextContent();\n expression = xpath.compile(USER_NAME_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n userName = result.getTextContent();\n expression = xpath.compile(PASSWORD_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n password = result.getTextContent();\n\n } catch (XPathExpressionException e) {\n e.printStackTrace();\n }\n System.out.println(driverClassName);\n System.out.println(connectionUrl);\n try {\n\t\t\tSystem.out.println(userName.getBytes(\"EUC-JP\"));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(password);\n }", "public String parseVariable(String statement) {\r\n if (Asserts.isNullString(statement)) {\r\n return statement;\r\n }\r\n String[] strs = statement.split(SystemConfiguration.getInstances().getSqlSeparator());\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < strs.length; i++) {\r\n String str = strs[i];\r\n if (str.trim().length() == 0) {\r\n continue;\r\n }\r\n str = strs[i];\r\n if (str.contains(FlinkSQLConstant.FRAGMENTS)) {\r\n String[] strs2 = str.split(FlinkSQLConstant.FRAGMENTS);\r\n if (strs2.length >= 2) {\r\n if (strs2[0].length() == 0) {\r\n throw new ExpressionParserException(\"Illegal variable name.\");\r\n }\r\n String valueString = str.substring(str.indexOf(FlinkSQLConstant.FRAGMENTS) + 2);\r\n this.registerSqlFragment(strs2[0], replaceVariable(valueString));\r\n } else {\r\n throw new ExpressionParserException(\"Illegal variable definition.\");\r\n }\r\n } else {\r\n sb.append(replaceVariable(str));\r\n }\r\n }\r\n return sb.toString();\r\n }", "public static void main(String[] args) {\n QueriesWithDBConnection.connect(args[0], args[1], args[2]);\n try {\n parse(args[3]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n QueriesWithDBConnection.close();\n }", "<T> List<String> generateFindByIdScript(GremlinSource<T> source);", "protected Script getScript(String scriptName, boolean withSrc) {\n \t\tScript s = getConfiguration().getScriptByName(scriptName);\n \t\tFile scriptSrc = new File(getScriptDirectory(), scriptName);\n \t\tif (withSrc) {\n \t\t\ttry {\n \t\t\t\tReader reader = new FileReader(scriptSrc);\n \t\t\t\tString src = IOUtils.toString(reader);\n \t\t\t\ts.setScript(src);\n \t\t\t} catch (IOException e) {\n \t\t\t\tLOGGER.log(Level.SEVERE, \"not able to load sources for script [\" + scriptName + \"]\", e);\n \t\t\t}\n \t\t}\n \t\treturn s;\n \t}", "java.lang.String getSourceFile(int index);", "private static File[] listScripts(File baseDir) {\n\n return baseDir.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n boolean hasJsonFileExtension = \"json\".equals(Files.getFileExtension(name));\n if (!(hasJsonFileExtension || new File(dir, name).isDirectory())) {\n System.err.println(\"Ignoring script \" + name + \". File name must be have .json extension.\");\n return false;\n }\n Integer index = getIndex(name);\n if (index == null) {\n System.err.println(\"Ignoring script \" + name + \". File name must start with an index number followed by an underscore and a description.\");\n return false;\n }\n return true;\n }\n });\n }", "public String FetchDataFromFile(File file) {\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\ttry {\r\n\t\t\tScanner sc=new Scanner(file);\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tsb.append(sc.nextLine());\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String wholePath = pagePath + firstDir + File.separator + secondDir\n + File.separator + fileName;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(wholePath));\n String line = null;\n while((line = reader.readLine()) != null) {\n if (line.equals(\"#ThisURL#\")) {\n url = reader.readLine();\n }\n// else if (line.equals(\"#Length#\")) {\n// length = Integer.parseInt(reader.readLine());\n// }\n else if (line.equals(\"#Title#\")) {\n title = reader.readLine();\n }\n else if (line.equals(\"#Content#\")) {\n content = reader.readLine();\n lowerContent = content.toLowerCase();\n break;\n }\n }\n reader.close();\n if (content == null) {\n return;\n }\n valid = true;\n } catch (IOException e) {\n// System.out.println(\"Parse page \" + id + \" not successful\");\n }\n }", "public void process(String pathname) {\n\t\tFile file = new File( pathname );\n\t\tString filename = file.getName();\n\t\tString source = filename.substring( 5, filename.length()-19 );\n\t\tSQLDataSourceDescriptor dsd = sqlDataSourceHandler.getDataSourceDescriptor(source);\n\t\tif (dsd == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\treturn;\n\t\t}\n\t\tSQLDataSource ds = null;\n\t\tVDXSource vds = null;\n\t\ttry {\n\t\t\tObject ods = dsd.getSQLDataSource();\n\t\t\tif (ods != null) {\n\t\t\t\tds = dsd.getSQLDataSource();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t}\n\t\t\n\t\tint defaultRank = 0;\n\t\tint lineLen1, lineLen2;\n\t\tif ( ds != null ) {\n\t\t\t// This is an SQL DataSource\n\t\t\t\n\t\t\t// Build map of channels\n\t\t\tchannelMap = new HashMap<String, Integer>();\n\t\t\tfor ( Channel ch: ds.defaultGetChannelsList(false) )\n\t\t\t\tchannelMap.put( ch.getCode(), ch.getCID() );\n\t\t\tlogger.info( \"Channels mapped: \" + channelMap.size() );\n\t\t\t\n\t\t\t// Build map of columns\n\t\t\tcolumnMap = new HashMap<String, Integer>();\n\t\t\tfor ( Column col: ds.defaultGetColumns(true,ds.getMenuColumnsFlag()) )\n\t\t\t\tcolumnMap.put( col.name, col.idx );\n\t\t\tlogger.info( \"Columns mapped: \" + columnMap.size() );\n\t\t\t\n\t\t\t// Build map of ranks\n\t\t\trankMap = new HashMap<String, Integer>();\n\t\t\tfor ( String rk: ds.defaultGetRanks() ) {\n\t\t\t\tString rkBits[] = rk.split(\":\");\n\t\t\t\tint id = Integer.parseInt(rkBits[0]);\n\t\t\t\trankMap.put( rkBits[1], id );\n\t\t\t\tif ( rkBits[3].equals(\"1\") )\n\t\t\t\t\tdefaultRank = id;\n\t\t\t}\n\t\t\tlogger.info( \"Ranks mapped: \" + rankMap.size() );\n\t\t\t\n\t\t\t// Set limits on # args per input line\n\t\t\tlineLen1 = 7;\n\t\t\tlineLen2 = 9;\n\t\t\t\n\t\t\t// Build map of supp data types\n\t\t\tsdtypeMap = new HashMap<String, Integer>();\n\t\t\tfor ( SuppDatum sdt: ds.getSuppDataTypes() )\n\t\t\t\tsdtypeMap.put( sdt.typeName, sdt.tid );\n\t\t\tlogger.info( \"Suppdata types mapped: \" + sdtypeMap.size() );\n\t\t\t\n\t\t} else {\n\t\t\t// It isn't a SQL datasource; try it as a Winston datasource\n\t\t\tDataSourceDescriptor vdsd = dataSourceHandler.getDataSourceDescriptor(source);\n\t\t\ttry {\n\t\t\t\tvds = (VDXSource)vdsd.getDataSource();\n\t\t\t\tif ( vds == null ) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (Exception e2) {\n\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Build map of channels\n\t\t\tchannelMap = new HashMap<String, Integer>();\n\t\t\tfor ( gov.usgs.winston.Channel ch: vds.getChannels().getChannels() )\n\t\t\t\tchannelMap.put( ch.getCode(), ch.getSID() );\n\t\t\tlogger.info( \"Channels mapped: \" + channelMap.size() );\n\t\t\t\n\t\t\t// Set limits on # args per input line\n\t\t\tlineLen1 = lineLen2 = 7;\n\n\t\t\t// Build map of supp data types\n\t\t\tsdtypeMap = new HashMap<String, Integer>();\n\t\t\ttry {\n\t\t\t\tfor ( SuppDatum sdt: vds.getSuppDataTypes() )\n\t\t\t\t\tsdtypeMap.put( sdt.typeName, sdt.tid );\n\t\t\t\tlogger.info( \"Suppdata types mapped: \" + sdtypeMap.size() );\n\t\t\t} catch (Exception e3) {\n\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (problem reading supplemental data types)\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Access the input file\n\t\tResourceReader rr = ResourceReader.getResourceReader(pathname);\n\t\tif (rr == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (resource is invalid)\");\n\t\t\treturn;\n\t\t}\n\t\t// move to the first line in the file\n\t\tString line\t\t= rr.nextLine();\n\t\tint lineNumber\t= 0;\n\n\t\t// check that the file has data\n\t\tif (line == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (resource is empty)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tlogger.info(\"importing: \" + filename);\n\t\t\n\t\tSuppDatum sd = new SuppDatum();\n\t\tint success = 0;\n\t\t\n\t\t// we are now at the first row of data. time to import!\n\t\tString[] valueArray = new String[lineLen2];\n\t\twhile (line != null) {\n\t\t\tlineNumber++;\n\t\t\t// Build up array of values in this line\n\t\t\t// First, we split it by quotes\n\t\t\tString[] quoteParts = line.split(\"'\", -1);\n\t\t\tif ( quoteParts.length % 2 != 1 ) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", mismatched quotes\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Next, walk through those parts, splitting those outside of matching quotes by comma\n\t\t\tint valueArrayLength = 0;\n\t\t\tboolean ok = true;\n\t\t\tfor ( int j=0; ok && j<quoteParts.length; j+=2 ) {\n\t\t\t\tString[] parts = quoteParts[j].split(\",\", -1);\n\t\t\t\tint k, k1 = 1, k2 = parts.length-1;\n\t\t\t\tboolean middle = true;\n\t\t\t\tif ( j==0 ) { // section before first quote\n\t\t\t\t\tmiddle = false;\n\t\t\t\t\tif ( parts.length > 1 && parts[0].trim().length() == 0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", leading comma\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tk1 --;\n\t\t\t\t} \n\t\t\t\tif ( j==quoteParts.length-1 ) { // section after last quote\n\t\t\t\t\tmiddle = false;\n\t\t\t\t\tif ( parts.length > 1 && parts[parts.length-1].trim().length() == 0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", trailing comma\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tk2++;\n\t\t\t\t}\n\t\t\t\tif ( middle ) {\n\t\t\t\t\tif ( parts.length == 1 ){\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma between quotes\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( parts[0].trim().length()!=0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma after a quote\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( parts[parts.length-1].trim().length()!=0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma before a quote\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor ( k=k1; ok && k<k2; k++ ) {\n\t\t\t\t\tif ( valueArrayLength == lineLen2 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too many elements\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalueArray[valueArrayLength++] = parts[k];\n\t\t\t\t}\n\t\t\t\tif ( j+1 < quoteParts.length ) {\n\t\t\t\t\tif ( valueArrayLength == lineLen2 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too many elements\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalueArray[valueArrayLength++] = quoteParts[j+1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Line has been parsed; get next one\n\t\t\tline\t= rr.nextLine();\n\t\t\tif ( !ok )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Validate & unmap arguments\n\t\t\tif ( valueArrayLength < lineLen1 ) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too few elements (\" + valueArrayLength + \")\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.cid = channelMap.get( valueArray[3].trim() );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", unknown channel: '\" + valueArray[3] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.st = Double.parseDouble( valueArray[1].trim() );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", invalid start time: '\" + valueArray[1] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tString et = valueArray[2].trim();\n\t\t\t\tif ( et.length() == 0 )\n\t\t\t\t\tsd.et = Double.MAX_VALUE;\n\t\t\t\telse\n\t\t\t\t\tsd.et = Double.parseDouble( et );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", invalid end time: '\" + valueArray[2] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.typeName = valueArray[4].trim();\n\t\t\t\tInteger tid = sdtypeMap.get( sd.typeName );\n\t\t\t\tif ( tid == null ) {\n\t\t\t\t\tsd.color = \"000000\";\n\t\t\t\t\tsd.dl = 1;\n\t\t\t\t\tsd.tid = -1;\n\t\t\t\t} else\n\t\t\t\t\tsd.tid = tid;\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", couldn't create type: '\" + valueArray[4] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ds != null ) {\n\t\t\t\tif ( valueArrayLength > lineLen1 ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsd.colid = columnMap.get( valueArray[7].trim() );\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", unknown column: '\" + valueArray[7] + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ( valueArrayLength < lineLen2 ) {\n\t\t\t\t\t\tsd.rid = defaultRank;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsd.rid = rankMap.get( valueArray[8].trim() );\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", unknown rank: '\" + valueArray[8] + \"'\");\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsd.colid = -1;\n\t\t\t\t\tsd.rid = -1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsd.colid = -1;\n\t\t\t\tsd.rid = -1;\n\t\t\t}\n\t\t\tsd.name = valueArray[5].trim();\n\t\t\tsd.value = valueArray[6].trim();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsd.sdid = Integer.parseInt( valueArray[0] );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", unknown id: '\" + valueArray[0] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Finally, insert/update the data\n\t\t\ttry {\n\t\t\t\tif ( ds != null ) {\n\t\t\t\t\tif ( sd.tid == -1 ) {\n\t\t\t\t\t\tsd.tid = ds.insertSuppDataType( sd );\n\t\t\t\t\t\tif ( sd.tid == 0 ) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", problem inserting datatype\" );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsdtypeMap.put( sd.typeName, sd.tid );\n\t\t\t\t\t\tlogger.info(\"Added supplemental datatype \" + sd.typeName );\n\t\t\t\t\t}\n\t\t\t\t\tint read_sdid = sd.sdid;\n\t\t\t\t\tif ( sd.sdid == 0 ) {\n\t\t\t\t\t\tsd.sdid = ds.insertSuppDatum( sd );\n\t\t\t\t\t} else\n\t\t\t\t\t\tsd.sdid = ds.updateSuppDatum( sd );\n\t\t\t\t\tif ( sd.sdid < 0 ) {\n\t\t\t\t\t\tsd.sdid = -sd.sdid;\n\t\t\t\t\t\tlogger.info(\"For import of line \" + lineNumber + \n\t\t\t\t\t\t\", supp data record already exists as SDID \" + sd.sdid +\n\t\t\t\t\t\t\"; will create xref record\");\n\t\t\t\t\t} else if ( sd.sdid==0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", problem \" + (read_sdid==0 ? \"insert\" : \"updat\") + \"ing supp data\" );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( read_sdid == 0 )\n\t\t\t\t\t\tlogger.info(\"Added supp data record SDID \" + sd.sdid);\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info(\"Updated supp data record SDID \" + sd.sdid);\n\t\t\t\t\tif ( !ds.insertSuppDatumXref( sd ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info( \"Added xref for SDID \" + sd.sdid );\n\t\t\t\t} else {\n\t\t\t\t\tif ( sd.tid == -1 ) {\n\t\t\t\t\t\tsd.tid = vds.insertSuppDataType( sd );\n\t\t\t\t\t\tif ( sd.tid == 0 ) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", problem inserting datatype\" );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsdtypeMap.put( sd.typeName, sd.tid );\n\t\t\t\t\t\tlogger.info(\"Added supplemental datatype \" + sd.typeName );\n\t\t\t\t\t}\n\t\t\t\t\tint read_sdid = sd.sdid;\n\t\t\t\t\tif ( sd.sdid == 0 )\n\t\t\t\t\t\tsd.sdid = vds.insertSuppDatum( sd );\n\t\t\t\t\telse\n\t\t\t\t\t\tsd.sdid = vds.updateSuppDatum( sd );\n\t\t\t\t\tif ( sd.sdid < 0 ) {\n\t\t\t\t\t\tsd.sdid = -sd.sdid;\n\t\t\t\t\t\tlogger.info(\"For import of line \" + lineNumber + \n\t\t\t\t\t\t\", supp data record already exists as SDID \" + sd.sdid +\n\t\t\t\t\t\t\"; will create xref record\");\n\t\t\t\t\t} else if ( sd.sdid==0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", problem \" + (read_sdid==0 ? \"insert\" : \"updat\") + \"ing supp data\" );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( read_sdid == 0 )\n\t\t\t\t\t\tlogger.info(\"Added supp data record SDID \" + sd.sdid);\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info(\"Updated supp data record SDID \" + sd.sdid);\n\t\t\t\t\tif ( !vds.insertSuppDatumXref( sd ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info( \"Added xref for SDID \" + sd.sdid );\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Failed import of line \" + lineNumber + \", db failure: \" + e);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsuccess++;\n\t\t}\n\t\tlogger.info(\"\" + success + \" of \" + lineNumber + \" lines successfully processed\");\n\t}", "String massageFilename(String filename, PigContext pigContext, boolean isLoad) throws IOException, ParseException {\n boolean isMultiQuery = \"true\".equalsIgnoreCase(pigContext.getProperties().getProperty(\"opt.multiquery\",\"true\"));\n if (!isMultiQuery) {\n if (!isLoad) { // stores do not require any change\n return filename;\n }\n\n // Local loads in the hadoop context require copying the\n // file to dfs first.\n if (pigContext.getExecType() != ExecType.LOCAL\n && filename.startsWith(FileLocalizer.LOCAL_PREFIX)) {\n filename = FileLocalizer.hadoopify(filename, pigContext);\n }\n return filename;\n }\n\n String fname;\n\n // If we converted the file name before, we return the old\n // result. This is not done for performance but to make sure\n // we return the same result for relative paths when\n // re-parsing the same script for execution.\n if (null != (fname = fileNameMap.get(filename))) {\n return fname;\n } else {\n fname = filename;\n }\n\n String scheme, path;\n\n if (fname.startsWith(FileLocalizer.LOCAL_PREFIX)) {\n // We don't use hadoop path class to do the parsing,\n // because our syntax of saying 'file:foo' for relative\n // paths on the local FS is not a valid URL.\n scheme = \"file\";\n path = fname.substring(FileLocalizer.LOCAL_PREFIX.length());\n } else {\n // Path implements a custom uri parsing that takes care of\n // unescaped characters (think globs). Using \"new\n // URI(fname)\" would break.\n URI uri = new Path(fname).toUri();\n\n scheme = uri.getScheme();\n if (scheme != null) {\n scheme = scheme.toLowerCase();\n }\n\n path = uri.getPath();\n }\n\n if (scheme == null || scheme.equals(\"file\") || scheme.equals(\"hdfs\")) {\n if (pigContext.getExecType() != ExecType.LOCAL) {\n if (fname.startsWith(FileLocalizer.LOCAL_PREFIX)) {\n if (isLoad) {\n fname = FileLocalizer.hadoopify(fname, pigContext);\n }\n return fname;\n }\n }\n DataStorage dfs = pigContext.getDfs();\n ContainerDescriptor desc = dfs.getActiveContainer();\n ElementDescriptor el = dfs.asElement(desc, path);\n fname = el.toString();\n }\n\n if (!fname.equals(filename)) {\n fileNameMap.put(filename, fname);\n }\n return fname;\n }", "public void createQueryProcessor() throws IOException {\n\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\n\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\n\t\t}\n\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\n\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\"_\",3);\n\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\n\t\t}\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\r\\n\\r\\n\" + \n\t\t\t\t\"import java.io.FileOutputStream;\\r\\n\" + \n\t\t\t\t\"import java.io.IOException;\\r\\n\" + \n\t\t\t\t\"import java.text.DateFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.DecimalFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.SimpleDateFormat;\\r\\n\" + \n\t\t\t\t\"import java.util.ArrayList;\\r\\n\" + \n\t\t\t\t\"import java.util.Calendar;\\r\\n\" + \n\t\t\t\t\"import java.util.HashMap;\\r\\n\");\n\t\tfileData.append(\"\\r\\npublic class QueryProcessor{\\n\");\n\t\tfileData.append(\"\tprivate SalesTable salesTable;\\n\");\n\t\tfileData.append(\"\tprivate ExpTree expTree;\\n\");\n\t\tfileData.append(\"\tprivate Payload payload;\\n\");\n\t\tfileData.append(\"\tprivate Helper helper;\\n\");\n\t\tfileData.append(\"\tprivate ArrayList<HashMap<String,String>> listMapsAggregates;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate HashMap<String, Double> aggregatesMap;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<HashMap<String, ArrayList<InputRow>>> allGroups;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<String>> allGroupKeyStrings;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<InputRow>> allGroupKeyRows;\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic QueryProcessor(SalesTable salesTable, Payload payload){\\n\");\n\t\tfileData.append(\"\t\tthis.aggregatesMap = new HashMap<String, Double>();\\n\");\n\t\tfileData.append(\"\t\tthis.salesTable=salesTable;\\n\");\n\t\tfileData.append(\"\t\tthis.payload=payload;\\n\");\n\t\tfileData.append(\"\t\tthis.expTree=new ExpTree();\\n\");\n\t\tfileData.append(\"\t\tthis.helper=new Helper();\\n\"\n\t\t\t\t\t\t+ \"\t\tthis.allGroupKeyRows = new ArrayList<ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.allGroupKeyStrings = new ArrayList<ArrayList<String>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.listMapsAggregates = new ArrayList<HashMap<String,String>>();\\r\\n\"\t+\n\t\t\t\t\t\t\"\t\tthis.allGroups = new ArrayList<HashMap<String, ArrayList<InputRow>>>();\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> createInputSet(){\\n\");\n\t\tfileData.append(\"\t\tArrayList<InputRow> inputResultSet = new ArrayList<InputRow>();\\n\");\n\t\tfileData.append(\"\t\tfor(SalesTableRow row: salesTable.getResultSet()) {\\n\");\n\t\tfileData.append(\"\t\t\tInputRow ir=new InputRow();\\n\");\n\t\tfor(String var: this.projectionVars) {\n\t\t\tfileData.append(\"\t\t\tir.set\"+varPrefix+var+\"(row.get\"+var+\"());\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\tinputResultSet.add(ir);\\n\");\n\t\tfileData.append(\"\t\t}\\n\");\n\t\tfileData.append(\"\t\treturn inputResultSet;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//OUTPUT ROW CREATION LOGIC\n\t\tfileData.append(\"\\r\\n\tpublic OutputRow convertInputToOutputRow(InputRow inputRow, String str, ArrayList<String> strList){\\n\");\n\t\tfileData.append(\"\t\tString temp=\\\"\\\";\\n\");\n\t\tfileData.append(\"\t\tOutputRow outputRow = new OutputRow();\\n\");\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(inputRow.get\"+varPrefix+select+\"());\\n\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString temp=select;\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\ttemp = prepareClause(inputRow, inputRow, \\\"\"+temp+\"\\\", str, strList);\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.contains(\\\"(\\\")) temp = expTree.execute(temp);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.equals(\\\"discard_invalid_entry\\\")) return null;\\n\");\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(Double.parseDouble(temp));\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\treturn outputRow;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//WHERE CLAUSE EXECUTOR\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> executeWhereClause(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\tint i=0;\\r\\n\" + \n\t\t\t\t\"\t\twhile(i<inputResultSet.size()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString condition=prepareClause(inputResultSet.get(i), inputResultSet.get(i), payload.getWhereClause(), \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))){\\r\\n\" + \n\t\t\t\t\"\t\t\t\tinputResultSet.remove(i);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tcontinue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\ti++;\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn inputResultSet;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//REFINE CLAUSE FOR PROCESSING\n\t\tfileData.append(\"\\r\\n\tpublic String prepareClause(InputRow row, InputRow rowZero, String condition, String str, ArrayList<String> strList) {\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<strList.size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.contains(i+\\\"_\\\")) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tboolean flag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String ag : payload.getaggregate_functions()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!ag.contains(i+\\\"\\\")) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(condition.contains(ag)) flag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tcondition=condition.replaceAll(ag, ag+\\\"_\\\"+strList.get(i));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(flag) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tboolean changeFlag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tfor(String key : aggregatesMap.keySet()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tif(condition.contains(key)) changeFlag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tcondition = condition.replaceAll(key, Double.toString(aggregatesMap.get(key)));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!changeFlag) return \\\"discard_invalid_entry\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tif(condition.contains(\\\".\\\")) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", Integer.toString(row.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\n\");\n\t\t\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", rowZero.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", Integer.toString(rowZero.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\\s+\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\"\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\'\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\treturn condition;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//CREATE GROUPS\t\t\n\t\tfileData.append(\"\\r\\n\tpublic void createListsBasedOnSuchThatPredicate(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> groupKeyStrings = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<InputRow> groupKeyRows = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(InputRow row : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tStringBuilder temp=new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow groupRow = new InputRow();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String group: payload.getGroupingAttributesOfAllGroups().get(i)) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tint col = helper.columnMapping.get(group);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tswitch(col) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tfileData.append(\"\t\t\t\t\t\tcase \"+helper.columnMapping.get(var)+\":\"+\"{temp.append(row.get\"+varPrefix+var+\"()+\\\"_\\\"); groupRow.set\"+varPrefix+ var+ \"(row.get\"+varPrefix+var+\"()); break;}\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\t\t\t}\\n\"+\n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString s=temp.toString();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(s.charAt(s.length()-1)=='_') s=s.substring(0, s.length()-1);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif( !groupKeyStrings.contains(s) ) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyStrings.add(s);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyRows.add(groupRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyRows.add(groupKeyRows);\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyStrings.add(groupKeyStrings);\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tHashMap<String, ArrayList<InputRow>> res = new HashMap<String, ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\"\t\t\tString suchThat = payload.getsuch_that_predicates().get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0;j<allGroupKeyRows.get(i).size();j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow zeroRow = allGroupKeyRows.get(i).get(j);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tArrayList<InputRow> groupMember = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(InputRow salesRow : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tString condition = prepareClause(salesRow, zeroRow, suchThat, \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(Boolean.parseBoolean(expTree.execute(condition))) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tgroupMember.add(salesRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tres.put(allGroupKeyStrings.get(i).get(j), new ArrayList<InputRow>(groupMember));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroups.add(new HashMap<String, ArrayList<InputRow>>(res));\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\t\t\n//GETGROUPING VARIABLE METHOD\n\t\tfileData.append(\"\\r\\n\tpublic String getGroupingVariable(int i, InputRow row) {\\r\\n\" + \n\t\t\t\t\"\t\tswitch(i) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0||helper.columnMapping.get(var)==1||helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return row.get\"+varPrefix+var+\"();\\r\\n\");\n\t\t\telse if(helper.columnMapping.get(var)==7)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return \\\"all\\\"\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return Integer.toString(row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\treturn \\\"__Garbage__\\\";\\r\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//COMPUTE AGGREGATES METHOD\n\t\tfileData.append(\"\\r\\n\tpublic void computeAggregates(ArrayList<InputRow> inputResultSet) {\t\\r\\n\" + \n\t\t\t\t\"\t\tdouble val=0;\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\\\"_\\\",3);\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\"+\n\t\t\t\t\"\t\tint nGroupingVariables=0;\\r\\n\"+\n\t\t\t\t\"\t\taggregatesMap = new HashMap<>();\\r\\n\"+\n\t\t\t\t\"\t\tHashMap<String,Double> tempAggregatesMap;\\r\\n\");\n\t\t\n\t\tfor(int nGroupingVariables=0;nGroupingVariables<=payload.getnumber_of_grouping_variables();nGroupingVariables++) {\n\t\t\tfileData.append(\"\\n\t\tnGroupingVariables=\"+nGroupingVariables+\";\\r\\n\");\n\t\t\tfileData.append(\n\t\t\t\t\t\t\t\"\t\ttempAggregatesMap = new HashMap<String,Double>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\tfor(int i=0;i<allGroupKeyRows.get(nGroupingVariables).size(); i++) {\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\tInputRow zeroRow = allGroupKeyRows.get(nGroupingVariables).get(i);\\r\\n\" );\n\t\t\t\n\t\t\t//MFvsEMF\n\t\t\tif(isGroupMF(nGroupingVariables)) fileData.append(\"\t\t\tfor(InputRow row: allGroups.get(nGroupingVariables).get(allGroupKeyStrings.get(nGroupingVariables).get(i)))\t{\\r\\n\");\n\t\t\telse fileData.append(\"\t\t\tfor(InputRow row: inputResultSet) {\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tString condition = payload.getsuch_that_predicates().get(nGroupingVariables);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tString str = allGroupKeyStrings.get(nGroupingVariables).get(i);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tfor(int j=0;j<=payload.getnumber_of_grouping_variables();j++) strList.add(str);\\r\\n\" +\n\t\t\t\t\t\t\t\"\t\t\t\tcondition= prepareClause(row, zeroRow, condition, str, strList);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\"\n\t\t\t\t\t\t\t);\n\t\t\tString key1 = nGroupingVariables+\"_sum_\"+listMapsAggregates.get(nGroupingVariables).get(\"sum\");\n\t\t\tString key2 = nGroupingVariables+\"_avg_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\tString key3 = nGroupingVariables+\"_min_\"+listMapsAggregates.get(nGroupingVariables).get(\"min\");\n\t\t\tString key4 = nGroupingVariables+\"_max_\"+listMapsAggregates.get(nGroupingVariables).get(\"max\");\n\t\t\tString key5 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"count\");\n\t\t\tString key6 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\tString key1=\\\"\"+key1+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\tString key2=\\\"\"+key2+\"\\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\tString key6=\\\"\"+key6+\"\\\";\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key3=\\\"\"+key3+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key4=\\\"\"+key4+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key5=\\\"\"+key5+\"\\\";\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tfor(String ga: payload.getGroupingAttributesOfAllGroups().get(nGroupingVariables)) {\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\t\tkey1=key1+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey2=key2+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey6=key6+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey3=key3+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey4=key4+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey5=key5+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tfileData.append(\"\t\t\t\t}\\r\\n\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key1, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"sum\\\")), row));\\r\\n\" + \n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key1, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key2, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"avg\\\")), row));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key2, val);\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key6, tempAggregatesMap.getOrDefault(key6, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.min( tempAggregatesMap.getOrDefault(key3, Double.MAX_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"min\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key3, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.max( tempAggregatesMap.getOrDefault(key4, Double.MIN_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"max\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key4, val);\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\")) {\n\t\t\t\tfileData.append(\"\t\t\ttempAggregatesMap.put(key5, tempAggregatesMap.getOrDefault(key5, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\t\t}\\r\\n\");\n\t\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\n\t\t\t\t\"\t\tfor(String key: tempAggregatesMap.keySet()) {\\r\\n\"+\n\t\t\t\t\"\t\t\tif(key.contains(\\\"_avg_\\\"))\\r\\n\"+\n\t\t\t\t\"\t\t\t\ttempAggregatesMap.put(key, tempAggregatesMap.get(key)/tempAggregatesMap.get(key.replace(\\\"_avg_\\\", \\\"_count_\\\")));\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\taggregatesMap.putAll(tempAggregatesMap);\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\"\t}\\n\");\n\n//PREPARE THE RESULTS AND ADD THEM TO A LIST OF OUTPUTROW\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<OutputRow> createOutputResultSet() {\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputRowList = new ArrayList<OutputRow>();\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<allGroupKeyRows.get(0).size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString str=allGroupKeyStrings.get(0).get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] tempStr = str.split(\\\"_\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0; j<=payload.getnumber_of_grouping_variables(); j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString ss = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\tint k=0;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String gz: payload.getgrouping_attributes()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(payload.getGroupingAttributesOfAllGroups().get(j).contains(gz)) ss=ss+tempStr[k++]+\\\"_\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\telse k++;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tstrList.add(ss.substring(0, ss.length()-1));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t//having check\\r\\n\" + \n\t\t\t\t\"\t\t\tif(payload.isHavingClause()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString condition= prepareClause(allGroupKeyRows.get(0).get(i), allGroupKeyRows.get(0).get(i), payload.getHavingClause(), str, strList);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\tOutputRow outputRow= convertInputToOutputRow(allGroupKeyRows.get(0).get(i), str, strList);\\r\\n\"+\n\t\t\t\t\"\t\t\tif(outputRow!=null){\\r\\n\" + \n\t\t\t\t\"\t\t\t\toutputRowList.add(outputRow);\\r\\n\"+\n\t\t\t\t\"\t\t\t}\\r\\n\"+\t\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn outputRowList;\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n//PRINT THE OUTPUT ROW\n\t\tfileData.append(\"\\r\\n\tpublic void printOutputResultSet(ArrayList<OutputRow> outputResultSet) throws IOException{\\r\\n\");\n\t\tfileData.append(\"\t\tCalendar now = Calendar.getInstance();\\r\\n\" + \n\t\t\t\t\"\t\tDateFormat dateFormat = new SimpleDateFormat(\\\"MM/dd/yyyy HH:mm:ss\\\");\\r\\n\" + \n\t\t\t\t\"\t\tStringBuilder fileData = new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\tfileData.append(\\\"TIME (MM/dd/yyyy HH:mm:ss)::::\\\"+dateFormat.format(now.getTime())+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString addDiv = \\\" -------------- \\\";\\r\\n\" + \n\t\t\t\t\"\t\tString divide = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tString header=\\\"\\\";\"+\n\t\t\t\t\"\t\tfor(String select: payload.getselect_variables()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(select.contains(\\\"0_\\\")) select=select.substring(2);\\r\\n\" + \n\t\t\t\t\"\t\t\theader=header+\\\" \\\"+select;\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int i=0;i<14-select.length();i++) header=header+\\\" \\\";\\r\\n\" + \n\t\t\t\t\"\t\t\tdivide=divide+addDiv;\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(header); fileData.append(header+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t//\"\t\tSystem.out.println(); fileData.append(\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString ansString=\\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tDecimalFormat df = new DecimalFormat(\\\"#.####\\\");\\r\\n\");\n\t\tfileData.append(\"\t\tfor(OutputRow outputRow: outputResultSet) {\\r\\n\");\n\t\tfileData.append(\"\t\t\tString answer=\\\"\\\";\\r\\n\");\n\t\t\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tint col = helper.columnMapping.get(select);\n\t\t\t\tif(col==0|| col==1|| col==5) {\n\t\t\t\t\t//string\n\t\t\t\t\tfileData.append(\"\t\t\tansString=outputRow.get\"+varPrefix+select+\"();\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+\\\" \\\"+ansString;\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<14-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//int\n\t\t\t\t\tfileData.append(\"\t\t\tansString = Integer.toString(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//double\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\t\tansString = df.format(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\t\tSystem.out.println(answer); fileData.append(answer+\\\"\\\\r\\\\n\\\");\\r\\n\");\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\tFileOutputStream fos = new FileOutputStream(\\\"queryOutput/\"+payload.fileName+\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tfos.write(fileData.toString().getBytes());\\r\\n\" + \n\t\t\t\t\"\t\tfos.flush();\\r\\n\" + \n\t\t\t\t\"\t\tfos.close();\\r\\n\");\n\t\tfileData.append(\"\t}\\r\\n\");\n\t\t\n\t\t\n//DRIVER METHOD OF THE QUERY PROCESSOR\n\t\tfileData.append(\"\\r\\n\tpublic void process() throws IOException{\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<InputRow> inputResultSet = createInputSet();\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getIsWhereClause()) inputResultSet = executeWhereClause(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getnumber_of_grouping_variables()>0) createListsBasedOnSuchThatPredicate(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tcomputeAggregates(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputResultSet = createOutputResultSet();\\r\\n\" + \n\t\t\t\t\"\t\tprintOutputResultSet(outputResultSet);\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n\t\tfileData.append(\"}\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/QueryProcessor.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}", "public static String getScriptName(final File file)\n\t{\n\t\treturn file.getName().replace(SCRIPT_EXTENSION, \"\");\n\t}", "private SourceFile _parseString(String txt) throws ParseException {\n ACParser p = new ACParser(txt);\n return p.SourceFile();\n }", "public static String getPostScriptHeaderContent() throws AlgorithmExecutionException { \t\r\n\t\tInputStream inStream = null;\r\n \tBufferedReader input = null;\r\n \tString line;\r\n \tString psHeaderContentinString = \"\";\r\n \r\n \ttry {\r\n URLConnection connection = PostScriptOperations.postScriptHeaderFile.openConnection();\r\n connection.setDoInput(true);\r\n inStream = connection.getInputStream();\r\n input = new BufferedReader(new InputStreamReader(inStream, \"UTF-8\"));\r\n \t\t \t\t\r\n \t while (null != (line = input.readLine())) {\r\n \t \tpsHeaderContentinString = psHeaderContentinString.concat(line).concat(\"\\n\");\r\n \t}\r\n \t} catch (IOException e) {\r\n \t\tthrow new AlgorithmExecutionException(e.getMessage(), e);\r\n \t} finally {\r\n \t\ttry {\r\n \t\t\tif (input != null) {\r\n \t\t\t\tinput.close();\r\n \t\t\t}\r\n \t if (inStream != null) { \r\n \t \tinStream.close();\r\n \t }\r\n \t } catch (IOException e) {\r\n \t e.printStackTrace();\r\n \t }\r\n \t}\r\n \t\r\n\t\treturn psHeaderContentinString;\r\n\t}" ]
[ "0.57298696", "0.5491639", "0.532066", "0.5255897", "0.5223246", "0.5161313", "0.5122445", "0.5086835", "0.5073075", "0.49705872", "0.49517143", "0.4916259", "0.49140704", "0.48971093", "0.48928314", "0.48893845", "0.48776266", "0.48504156", "0.48195502", "0.4785944", "0.47801888", "0.47594506", "0.47561768", "0.4750365", "0.47451884", "0.4738375", "0.47019553", "0.46991256", "0.4694629", "0.46865925", "0.4681567", "0.4666693", "0.46500212", "0.46428707", "0.45818725", "0.45592535", "0.4556483", "0.4556368", "0.45348498", "0.45258608", "0.44994026", "0.44836262", "0.44762808", "0.4469444", "0.44386497", "0.44377434", "0.44304022", "0.4416756", "0.4408376", "0.43938652", "0.43928215", "0.4391411", "0.43902236", "0.43780196", "0.4373046", "0.43722358", "0.43702668", "0.4340738", "0.43407032", "0.43341237", "0.43338203", "0.4326962", "0.43193182", "0.43140936", "0.4312654", "0.43120664", "0.43049586", "0.43021807", "0.42926264", "0.42916077", "0.4281825", "0.42801848", "0.4270579", "0.42680633", "0.42561123", "0.4249882", "0.42492247", "0.42416772", "0.42386562", "0.42334723", "0.42294323", "0.42289087", "0.42262015", "0.4218883", "0.42160758", "0.4213792", "0.41861898", "0.41825798", "0.41807324", "0.41782117", "0.4170923", "0.41694295", "0.41631952", "0.4156546", "0.4153809", "0.41497353", "0.41494787", "0.4148233", "0.4147632", "0.41422752" ]
0.4648695
33
Allows recompiling a script when it is already compiled and cached. You may call this method at runtime, but it does not reload or recompile unless scripts are loaded from file.
@CompileStatic public void recompileScript(String scriptName) throws NyException { configurations.getRepositoryRegistry().defaultRepository().reloadScript(scriptName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void compileScript() {\n // find and prepare by extension\n //\n log.info(\"Compiling script...\");\n Timer engineTimer = new Timer();\n \n engine = EngineHelper.findByFileExtension(scriptExtension, dependencyJarFiles != null && !dependencyJarFiles.isEmpty());\n \n if (engine == null) {\n throw new BlazeException(\"Unable to find script engine for file extension \" + scriptExtension + \". Maybe bad file extension or missing dependency?\");\n }\n\n log.debug(\"Using script engine {}\", engine.getClass().getCanonicalName());\n \n if (!engine.isInitialized()) {\n engine.init(context);\n }\n \n script = engine.compile(context);\n \n log.info(\"Compiled script in {} ms\", engineTimer.stop().millis());\n }", "public static void reloadClientScripts() {\n clientizenScripts.clear();\n for (File file : CoreUtilities.listDScriptFiles(clientizenFolder)) {\n String name = CoreUtilities.toLowerCase(file.getName());\n if (clientizenScripts.containsKey(name)) {\n Debug.echoError(\"Multiple script files named '\" + name + \"' found in client-scripts folder!\");\n continue;\n }\n try (FileInputStream stream = new FileInputStream(file)) {\n // TODO: clear comments server-side\n clientizenScripts.put(name, ScriptHelper.convertStreamToString(stream));\n if (CoreConfiguration.debugLoadingInfo) {\n Debug.log(\"Loaded client script: \" + name);\n }\n }\n catch (Exception e) {\n Debug.echoError(\"Failed to load client script file '\" + name + \"', see below stack trace:\");\n Debug.echoError(e);\n }\n }\n scriptsPacket = new SetScriptsPacketOut(clientizenScripts);\n }", "public abstract void recompileRun(int opcode);", "public StaticScript cache(boolean shouldCache) {\n this.shouldCache = shouldCache;\n return this;\n }", "public PyCode compile(String script) {\n return null;\n }", "@Override\r\n\tpublic void reload() {\n\t\tallcode.clear();\r\n\t\tinit();\r\n\t}", "protected void checkCompiled() {\r\n\t\tif (!isCompiled()) {\r\n\t\t\tlogger.debug(\"JdbcUpdate not compiled before execution - invoking compile\");\r\n\t\t\tcompile();\r\n\t\t}\r\n\t}", "private void getScript() {\n\t\tif ((scriptFile != null) && scriptFile.exists()) {\n\t\t\tlong lm = scriptFile.lastModified();\n\t\t\tif (lm > lastModified) {\n\t\t\t\tscript = new PixelScript(scriptFile);\n\t\t\t\tlastModified = lm;\n\t\t\t}\n\t\t}\n\t\telse script = null;\n\t}", "public CompilationBuilder setRecompileGroovySource(boolean recompile) {\n\t\tcompilerConfiguration.setRecompileGroovySource(recompile);\n\t\treturn this;\n\t}", "public void activeCompilerChanged() { }", "public void reload() {\n if ( _build_file != null ) {\n openBuildFile( _build_file );\n }\n }", "public void saveBeforeCompile() { }", "public void saveBeforeCompile() { }", "public Script tryCompile(Node node, ASTInspector inspector) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), inspector, false);\n }", "public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}", "public void reload() {\n\t\tif (file.lastModified() <= fileModified)\n\t\t\treturn;\n\t\n\t\treadFile();\n\t}", "private boolean compilationRequired( String module, File output )\n throws MojoExecutionException\n {\n GwtModule gwtModule = readModule( module );\n if ( gwtModule.getEntryPoints().length == 0 )\n {\n // No entry-point, this is a secondary module : compiling this one will fail\n // with '[ERROR] Module has no entry points defined'\n return false;\n }\n\n if ( force )\n {\n return true;\n }\n\n String modulePath = gwtModule.getPath();\n String outputTarget = modulePath + \"/\" + modulePath + \".nocache.js\";\n\n // Require compilation if no js file present in target.\n if ( !new File( output, outputTarget ).exists() )\n {\n return true;\n }\n\n // js file allreay exists, but may not be up-to-date with project source files\n SingleTargetSourceMapping singleTargetMapping = new SingleTargetSourceMapping( \".java\", outputTarget );\n StaleSourceScanner scanner = new StaleSourceScanner();\n scanner.addSourceMapping( singleTargetMapping );\n\n Collection<File> compileSourceRoots = new HashSet<File>();\n classpathBuilder.addSourcesWithActiveProjects( getProject(), compileSourceRoots, SCOPE_COMPILE );\n classpathBuilder.addResourcesWithActiveProjects( getProject(), compileSourceRoots, SCOPE_COMPILE );\n for ( File sourceRoot : compileSourceRoots )\n {\n if ( !sourceRoot.isDirectory() )\n {\n continue;\n }\n try\n {\n if ( !scanner.getIncludedSources( sourceRoot, output ).isEmpty() )\n {\n getLog().debug( \"found stale source in \" + sourceRoot + \" compared with \" + output );\n return true;\n }\n }\n catch ( InclusionScanException e )\n {\n throw new MojoExecutionException( \"Error scanning source root: \\'\" + sourceRoot + \"\\' \"\n + \"for stale files to recompile.\", e );\n }\n }\n return false;\n }", "public Script tryCompile(Node node) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), false);\n }", "protected boolean requiresRefresh()\r\n/* 27: */ {\r\n/* 28:71 */ return this.scriptFactory.requiresScriptedObjectRefresh(this.scriptSource);\r\n/* 29: */ }", "public void reload() {\n reloading = true;\n }", "public void reload(String filename) throws IOException, RemoteException, Error;", "public boolean getUsePrecompiled();", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public boolean isCompiled() {\r\n\t\treturn this.compiled;\r\n\t}", "void rebuildIfNecessary();", "public void reload() {\n reload(true);\n reload(false);\n }", "void setCompiled(CompilationUnitDeclaration cud,\n Map<String, String> binaryTypeToSourceFileMap) {\n assert (state == State.FRESH || state == State.ERROR);\n this.cud = cud;\n fileNameRefs = computeFileNameRefs(cud, binaryTypeToSourceFileMap);\n state = State.COMPILED;\n }", "public void reload() {\n\t\treload = true;\n\t}", "protected void onLoad() {\n \t\tsuper.onLoad();\n \t\teval(scripts);\n \t}", "protected void onCompileInternal() {\r\n\t}", "public void reloadFiles()\n {\n for (Reloadable rel : reloadables)\n {\n rel.reload();\n }\n }", "protected void reload() {\n runnables.values().stream()\n .filter(Objects::nonNull) //idk how it can be null, but better be prepared\n .map(BungeeF3Runnable::getTask)\n .filter(Objects::nonNull) //fix for NullPointer\n .forEach(ScheduledTask::cancel);\n\n runnables.clear();\n players.clear();\n hookedServers.clear();\n\n checkServers();\n\n try {\n parser = new BungeeConfigParser(this);\n } catch (IOException ex) {\n logger.error(\"Failed to load config file!\", ex);\n return;\n }\n if (!parser.isOnlyAPI()) {\n startRunnables();\n }\n\n if (isHooked(\"LP\")) {\n lpHook = new LuckPermsHook(parser.getF3GroupList());\n }\n }", "void reload();", "void reload();", "void reload();", "public void cache(){\n\t\t\n\t\t/*\n\t\t * second, check if there is a cache file\n\t\t * if yes, then check date\n\t\t * if no, then create a cache file \n\t\t*/\n\t\tif(cacheExist()){\n\t\t\t//check date and decide which file to update\n\t\t\tSystem.out.println(\" hahahaha, cache already there! \");\n\t\t\t\n\t\t\tFile cache = new File(\"./cache.txt\");\n\t\t\tsource = readFile(\"./cache.txt\",source);\n\t\t\tSystem.out.println(\"the size of source hashmap : \"+ source.size());\n\t\t\t\n\t\t\tfor(int i = 1; i < fileList.length;i++){\n\t\t\t\t//if this file need to be updated, write the data to source array\n\t\t\t\tif(needToUpdate(fileList[i], cache)){\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n\t\t\t\t\tSystem.out.println(\"S: \"+ sdf.format(fileList[i].lastModified()) + \" c: \"+ sdf.format(cache.lastModified()));\n\t\t\t\t\tsource = readFile(fileList[i].getPath(), source);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//after checking the whole source file and add the new data to source array\n\t\t\t//then sort the source array and write it to cache\n\t\t\tsort(source);\n\t\t\ttry\n\t\t\t{\n\t\t\t String filename= \"./cache.txt\";\n\t\t\t FileWriter fw = new FileWriter(filename,true); //the true will append the new data\n\t\t\t for(int j = 0; j < writeList.size(); j++){\n\t\t\t\t\tfw.write(writeList.get(j));\n\t\t\t\t}\n\t\t\t fw.close();\n\t\t\t}\n\t\t\tcatch(IOException ioe)\n\t\t\t{\n\t\t\t System.err.println(\"IOException: \" + ioe.getMessage());\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t//there are is no cache, need to create a cache file\n\t\telse{\n\t\t\tSystem.out.println(\" create new cache file !\");\n\t\t\t//create cache file and copy sort the data from source file\n\t\t\t//1. read all the source file and store the data to an arrayList\n\t\t\tfor(int i = 1; i < fileList.length; i++){\n\t\t\t\tsource = readFile(fileList[i].getPath(), source);\t\t\t\n\t\t\t}\n\t\t\tsort(source);\n//\t\t\tSystem.out.println(source);\n\t\t\t\n\t\t\t//2.write the data to the cache file\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(\"cache.txt\", \"UTF-8\");\t\t\t\n\t\t\t\twriter.println(writeList.size());\n\t\t\t\tfor(int j = 0; j < writeList.size(); j++){\n\t\t\t\t\twriter.println(writeList.get(j));\n\t\t\t\t}\n\t\t\t\twriter.close();\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t \n\t\t\n\t}", "public native void compile() /*-{\r\n\t\tvar template = [email protected]::getJsObj()();\r\n\t\ttemplate.compile();\r\n\t}-*/;", "public abstract void compile();", "public void reload();", "public void clearScriptPath() {\r\n loader = null;\r\n }", "@HandleBeforeCreate\n public void scriptValidating(Script script) {\n if (!script.compileScript(script.getBody(), getEngine())){\n logger.warn(\"Script \\\"\" + script.getBody() + \"\\\" compiled unsuccessful\");\n throw new InvalidScriptStateException(\"compiled unsuccessful\");\n } \n }", "public boolean isCompiled() {\n return state == State.COMPILED || state == State.CHECKED\n || state == State.GRAVEYARD;\n }", "public void reload() {\n\n\t}", "public void cmdRecompile(User teller) {\n exit(5, \"Deploying version update at the request of {0}. I''ll be right back!\", teller);\n }", "public void reload() {\n\n\t\tPlayerCache.reloadFile(); // load /save playercache.dat\n\n\t\t// next, update all playercaches\n\n\t\tupdatePlayerCaches();\n\n\n\t}", "public boolean compile(String name, String source) {\n\t return compile(source);\n\t}", "public boolean compile(String source) {\n\t return compile(source, true);\n\t}", "public void updateScripts() {\n\t\tFile file = new File(\"updatedPrescriptions.txt\");\n\t\tBufferedWriter bw;\n\t\ttry {\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tfor (int i = 0; i < scripts.size(); i++) {\n\n\t\t\t\tbw.write(scripts.get(i).toString());\n\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbw.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addScript(String scriptFilename) {\n scriptHistory = new ScriptHistory(scriptFilename);\n }", "public boolean isCachedFile() {\n return true;\n }", "private void clearScript() {\n bitField0_ = (bitField0_ & ~0x00000002);\n script_ = getDefaultInstance().getScript();\n }", "@Override\n\tpublic boolean isCaching() {\n\t\treturn false;\n\t}", "public boolean scriptGenerated() {\n return scriptHistory != null;\n }", "void reloadFromDiskSafe();", "private void addDatedComment(File sassFile) throws MojoExecutionException{\n String sassCacheEvict = \"\\n/* live-deploy sass cache evict \"+new Date().getTime()+\" */\";\n getLog().info(\"Evict file '\"+sassFile.getName()+\"' from SASS cache\");\n try {\n FileWriter writer = new FileWriter(sassFile, true);\n writer.append(sassCacheEvict);\n writer.flush();\n writer.close();\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error while changing '\"+sassFile.getName()+\"' checksum\");\n }\n }", "private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }", "public synchronized void reload() {\n if (this.reloader == null || !this.reloader.isAlive()) {\n this.reloader = new Reloader();\n this.reloader.start();\n }\n }", "void cleanScript();", "public CompilationBuilder setMinimumRecompilationInterval(int time) {\n\t\tcompilerConfiguration.setMinimumRecompilationInterval(time);\n\t\treturn this;\n\t}", "public boolean compiling()\n {\n return this.compiling.get();\n }", "public void removeScript() {\n scriptHistory = null;\n }", "protected void doFile(HttpServletRequest request, HttpServletResponse response, String path, String mimeType, boolean dynamic) throws IOException\n {\n if (!dynamic && isUpToDate(request, path))\n {\n response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);\n return;\n }\n \n String output;\n \n synchronized (scriptCache)\n {\n output = (String) scriptCache.get(path);\n if (output == null)\n {\n StringBuffer buffer = new StringBuffer();\n \n String resource = DwrConstants.PACKAGE + path;\n InputStream raw = getClass().getResourceAsStream(resource);\n if (raw == null)\n {\n throw new IOException(\"Failed to find resource: \" + resource); //$NON-NLS-1$\n }\n \n BufferedReader in = new BufferedReader(new InputStreamReader(raw));\n while (true)\n {\n String line = in.readLine();\n if (line == null)\n {\n break;\n }\n \n if (dynamic)\n {\n if (line.indexOf(PARAM_HTTP_SESSIONID) != -1)\n {\n line = LocalUtil.replace(line, PARAM_HTTP_SESSIONID, request.getSession(true).getId());\n }\n \n if (line.indexOf(PARAM_SCRIPT_SESSIONID) != -1)\n {\n line = LocalUtil.replace(line, PARAM_SCRIPT_SESSIONID, generator.generateId(pageIdLength));\n }\n }\n \n buffer.append(line);\n buffer.append('\\n');\n }\n \n output = buffer.toString();\n \n if (mimeType.equals(MimeConstants.MIME_JS) && scriptCompressed)\n {\n output = JavascriptUtil.compress(output, compressionLevel);\n }\n \n if (!dynamic)\n {\n scriptCache.put(path, output);\n }\n }\n }\n \n response.setContentType(mimeType);\n response.setDateHeader(HttpConstants.HEADER_LAST_MODIFIED, servletContainerStartTime);\n response.setHeader(HttpConstants.HEADER_ETAG, etag);\n \n PrintWriter out = response.getWriter();\n out.println(output);\n out.flush();\n }", "@Override\n\tpublic boolean isScriptable() {\n\t\treturn false;\n\t}", "public boolean mustCompile() {\n return true;\n }", "@Override\n\tpublic boolean isIsCompile() {\n\t\treturn _scienceApp.isIsCompile();\n\t}", "public void setScriptCompressed(boolean scriptCompressed)\n {\n this.scriptCompressed = scriptCompressed;\n }", "@Override\n public boolean isCaching() {\n return false;\n }", "private void setScript(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n script_ = value;\n }", "public void reload() {\n reloading = true;\n notifyObserver();\n if (!testing) {\n if (timerAction.isExpired()) {\n timerAction = runOnce(() -> resetMagazine(), Duration.millis(reloadTimerMilliseconds));\n }\n } else {\n resetMagazine();\n }\n }", "private boolean programIfExists(String compiledPath) {\n\t\tboolean itExists = false;\n\n\t\tif (Files.exists(Paths.get(compiledPath))) {\n\t\t\titExists = true;\n\t\t}\n\n\t\treturn itExists;\n\t}", "boolean supportsScripts();", "public void setClassCaching( boolean cc )\r\n {\r\n useClassCaching = cc;\r\n }", "public synchronized final void compile() throws InvalidDataAccessApiUsageException {\r\n\t\tif (!isCompiled()) {\r\n\t\t\tif (getTableName() == null) {\r\n\t\t\t\tthrow new InvalidDataAccessApiUsageException(\"Table name is required\");\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tthis.jdbcTemplate.afterPropertiesSet();\r\n\t\t\t}\r\n\t\t\tcatch (IllegalArgumentException ex) {\r\n\t\t\t\tthrow new InvalidDataAccessApiUsageException(ex.getMessage());\r\n\t\t\t}\r\n\r\n\t\t\tcompileInternal();\r\n\t\t\tthis.compiled = true;\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"JdbcUpdate for table [\" + getTableName() + \"] compiled\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void invalidateCache( Path project );", "public boolean compile()\n {\n if(this.compiling.get())\n {\n return false;\n }\n\n this.componentEditor.removeAllTemporaryModification();\n\n final String text = this.componentEditor.getText();\n final Matcher matcher = CompilerEditorPanel.PATTERN_CLASS_DECLARATION.matcher(text);\n\n if(!matcher.find())\n {\n this.printMessage(\"No class declaration !\");\n return false;\n }\n\n final String className = matcher.group(1);\n\n if(this.classManager.isResolved(className))\n {\n this.classManager.newClassLoader();\n }\n\n this.compiling.set(true);\n this.actionCompile.setEnabled(false);\n this.printMessage(className);\n this.informationMessage.append(\"\\ncompiling ...\");\n final byte[] data = text.getBytes();\n final ByteArrayInputStream stream = new ByteArrayInputStream(data);\n this.classManager.compileASMs(this.eventManager, stream);\n return true;\n }", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "private void handleAutoCompile() throws MojoExecutionException {\n boolean compileNeeded = true;\n boolean prepareNeeded = true;\n for (String goal : session.getGoals()) {\n if (goal.endsWith(\"quarkus:prepare\")) {\n prepareNeeded = false;\n }\n\n if (POST_COMPILE_PHASES.contains(goal)) {\n compileNeeded = false;\n break;\n }\n if (goal.endsWith(\"quarkus:dev\")) {\n break;\n }\n }\n\n //if the user did not compile we run it for them\n if (compileNeeded) {\n if (prepareNeeded) {\n triggerPrepare();\n }\n triggerCompile();\n }\n }", "private void invalidate() {\n cud = null;\n fileNameRefs = null;\n jsniMethods = null;\n if (exposedCompiledClasses != null) {\n for (CompiledClass compiledClass : exposedCompiledClasses) {\n compiledClass.invalidate();\n }\n exposedCompiledClasses = null;\n }\n }", "public void compile(MindFile f) {\n \t\t\n \t}", "public void doEditScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\treq.getView(this, \"edit.jelly\").forward(req, rsp);\n \t}", "public static void loadScript(String category, String key) {\r\n try {\r\n String lkey = key;\r\n if (!lkey.endsWith(\".js\"))\r\n lkey += \".js\";\r\n if(!\"\".equals(category))\r\n category += \"/\";\r\n Path path = Paths.get(\"./data/scripts/\" + category + lkey);\r\n String script = new String(Files.readAllBytes(path));\r\n ScriptEngine nashorn = scriptEngineManager.getEngineByName(\"nashorn\");\r\n nashorn.eval(script);\r\n loadedScripts.put(lkey, nashorn);\r\n } catch (Exception ex) { ex.printStackTrace(); }\r\n }", "void update(ModuleDef module, CompileDir compileDir, TreeLogger logger)\n throws UnableToCompleteException {\n File moduleDir = new File(launcherDir + \"/\" + module.getName());\n if (!moduleDir.isDirectory()) {\n if (!moduleDir.mkdirs()) {\n logger.log(Type.ERROR, \"Can't create launcher dir for module: \" + moduleDir);\n throw new UnableToCompleteException();\n }\n }\n\n try {\n String stub = generateStubNocacheJs(module.getName(), options);\n\n final File noCacheJs = new File(moduleDir, module.getName() + \".nocache.js\");\n Files.write(stub, noCacheJs, Charsets.UTF_8);\n\n // Remove gz file so it doesn't get used instead.\n // (We may be writing to an existing war directory.)\n final File noCacheJsGz = new File(noCacheJs.getPath() + \".gz\");\n if (noCacheJsGz.exists()) {\n if (!noCacheJsGz.delete()) {\n logger.log(Type.ERROR, \"cannot delete file: \" + noCacheJsGz);\n throw new UnableToCompleteException();\n }\n }\n\n writePublicResources(moduleDir, module, logger);\n\n // Copy the GWT-RPC serialization policies so that the subclass of RemoteServiceServlet\n // can pick it up. (It expects to find policy files in the module directory.)\n // See RemoteServiceServlet.loadSerializationPolicy.\n // (An alternate approach is to set the gwt.codeserver.port environment variable\n // so that the other server downloads policies over HTTP.)\n for (PolicyFile policyFile : compileDir.readRpcPolicyManifest(module.getName())) {\n String filename = policyFile.getName();\n File src = new File(compileDir.getWarDir(), module.getName() + \"/\" + filename);\n File dest = new File(moduleDir, filename);\n Files.copy(src, dest);\n }\n\n } catch (IOException e) {\n logger.log(Type.ERROR, \"Can't update launcher dir\", e);\n throw new UnableToCompleteException();\n }\n }", "private static void doUnloading() {\n stopJit();\n // Do multiple GCs to prevent rare flakiness if some other thread is keeping the\n // classloader live.\n for (int i = 0; i < 5; ++i) {\n Runtime.getRuntime().gc();\n }\n startJit();\n }", "public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}", "public void compileStarted() { }", "public void compileStarted() { }", "public void run() {\n if (!script.compile()) {\n Program.stop(\"ERROR: There was an error while compiling your script.\"\n + \"\\nPlease check your syntax!\", false);\n return;\n }\n commandCounter = script.input.split(\";\").length - 1;\n if (!writeMemory()) {\n Program.stop(\"ERROR: There was a fatal error while \"\n + \"writing the script into the memory!\", false);\n return;\n }\n try {\n startProcessor();\n } catch (NumberFormatException n) {\n Program.stop(\"ERROR: There was a runtime error while executing the script!\", false);\n }\n Program.stop(\"\", true);\n }", "private boolean updateCache(String type) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "private void compileResource(IResource resource, IProgressMonitor monitor) {\n\t\tif (resource instanceof IFile) {\n\n\t\t\tmonitor.subTask(Messages.AssemblyBuilder_Compiling + resource.getName());\n\n\t\t\tICompiler compiler = null;\n\t\t\tdeleteMarkers((IFile) resource);\n\n\t\t\tIPreferenceStore store = new PropertyStore(resource, AssemblyEditorPlugin.getDefault().getPreferenceStore(),\n\t\t\t\t\tAssemblyEditorPlugin.PLUGIN_ID);\n\n\t\t\tString ext = resource.getFileExtension();\n\t\t\tString[] customSettings = getCustomCompileOptions(resource);\n\t\t\tif (EXT_ASM.equalsIgnoreCase(ext) || EXT_INC.equalsIgnoreCase(ext)) {\n\t\t\t\tString compilername = customSettings[0] != null ? customSettings[0]\n\t\t\t\t\t\t: store.getString(PreferenceConstants.P_COMPILER);\n\n\t\t\t\tif (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_64TASS)) {\n\t\t\t\t\tcompiler = new TAssCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_AS65)) {\n\t\t\t\t\tcompiler = new As65Compiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_CA65)) {\n\t\t\t\t\tcompiler = new CA65Compiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_DASM)) {\n\t\t\t\t\tcompiler = new DAsmCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_SNAsm)) {\n\t\t\t\t\tcompiler = new SNAsmCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_TMPX)) {\n\t\t\t\t\tcompiler = new TMPxCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_XA)) {\n\t\t\t\t\tcompiler = new XACompiler();\n\t\t\t\t}\n\t\t\t} else if (EXT_MDC.equalsIgnoreCase(ext)) {\n\t\t\t\tcompiler = new MakeDiskCompiler();\n\t\t\t} else if (EXT_DIS.equalsIgnoreCase(ext)) {\n\t\t\t\tcompiler = new DiskImageBuilder();\n\t\t\t}\n\n\t\t\tif (compiler != null) {\n\t\t\t\tif (!EXT_INC.equalsIgnoreCase(ext)) {\n\t\t\t\t\tcompiler.compile(resource, new AssemblyErrorHandler(), monitor, store, null, customSettings[1]);\n\t\t\t\t\tString postProcessor = customSettings[2] != null ? customSettings[2]\n\t\t\t\t\t\t\t: store.getString(PreferenceConstants.P_POSTPROCESSORPATH);\n\t\t\t\t\tif (postProcessor != null && postProcessor.length() != 0) {\n\t\t\t\t\t\tIResource prg = resource.getParent().findMember(\n\t\t\t\t\t\t\t\tresource.getFullPath().removeFileExtension().addFileExtension(\"prg\").lastSegment());\n\t\t\t\t\t\tif (prg != null) {\n\t\t\t\t\t\t\tnew PostProcessorCompiler().compile(prg, new AssemblyErrorHandler(), monitor, store,\n\t\t\t\t\t\t\t\t\tcustomSettings[2], customSettings[3]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddDependencies(resource, compiler, monitor);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Compile dependent resources\n\t\t\t */\n\t\t\tSet<String> dependencies = ResourceDependencies.getInstance().get(resource);\n\t\t\tif (dependencies != null) {\n\t\t\t\tfor (String dependent : dependencies) {\n\t\t\t\t\tIResource res = resource.getWorkspace().getRoot().findMember(dependent);\n\t\t\t\t\tif (res != null) {\n\t\t\t\t\t\t// System.out.println(\"Compiling dependent resource \"\n\t\t\t\t\t\t// + res.getName());\n\t\t\t\t\t\tthis.compileResource(res, monitor);\n\t\t\t\t\t}\n\t\t\t\t\tif (monitor.isCanceled()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void unsafeEval(final Reader script) {\n this.octaveExec.evalRW(new ReaderWriteFunctor(script), \n\t\t\t getReadFunctor());\n }", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public void registerCompiler(String compilerName, String compilerProgramFile) {\n programName = compilerName;\n ClassLoader classLoader = getClass().getClassLoader();\n program = classLoader.getResourceAsStream(compilerProgramFile);\n }", "protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }", "public static void rewrite(ExecutableReader reader, File file) throws Exception {\n\t\tFileInputStream fis = new FileInputStream(file);\t\t\n\t\treader.exStr = new ExecutableStream(fis);\n\t\treader.read(reader.exStr);\n\t\tfis.close();\n\t}", "public void setScriptRan(boolean isRan) {\n scriptHistory.setRan(isRan);\n }", "public abstract void compute(String execID, boolean recompute);", "@Override\n\tpublic void setIsCompile(boolean isCompile) {\n\t\t_scienceApp.setIsCompile(isCompile);\n\t}", "public interface i {\n\n /* compiled from: MemoryCache */\n public interface a {\n }\n}", "private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }" ]
[ "0.6571201", "0.57201004", "0.56531525", "0.56348723", "0.5550638", "0.54916924", "0.5432828", "0.53761834", "0.531379", "0.52145374", "0.5186513", "0.5136677", "0.5136677", "0.51292974", "0.50235665", "0.5009862", "0.5004944", "0.49912637", "0.49428836", "0.48910552", "0.4887167", "0.4877056", "0.48227438", "0.48114884", "0.47958717", "0.4793641", "0.47544065", "0.47471341", "0.47379678", "0.47360575", "0.47349757", "0.47245273", "0.4712431", "0.4712431", "0.4712431", "0.47029838", "0.4701086", "0.4699566", "0.46544334", "0.4646621", "0.4645855", "0.4644718", "0.46200573", "0.45950347", "0.45930463", "0.45696416", "0.45671728", "0.45649475", "0.45557618", "0.45528555", "0.45398617", "0.45183435", "0.45133942", "0.4508581", "0.45064947", "0.45049495", "0.44992667", "0.44754556", "0.4468261", "0.4447777", "0.44442835", "0.44364908", "0.44164887", "0.44152293", "0.44143832", "0.4403966", "0.4398249", "0.43876138", "0.43731907", "0.4370323", "0.43669978", "0.4366208", "0.43600464", "0.43573505", "0.43551952", "0.4353899", "0.43525556", "0.43486404", "0.43458048", "0.43394285", "0.43382013", "0.4336644", "0.43325123", "0.43217373", "0.43177652", "0.43177652", "0.4312309", "0.43090394", "0.4307172", "0.4305025", "0.43042716", "0.42969587", "0.42870173", "0.42862192", "0.42763588", "0.42754373", "0.4267891", "0.42623213", "0.42601788", "0.42517924" ]
0.7134658
0
Shutdown the nyql engine. This should be called only when your application exits.
public void shutdown() { if (configurations.isRegisterMXBeans()) { JmxConfigurator.get().removeMXBean(this); } configurations.shutdown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shutdown()\r\n\t{\r\n\t\tgraphDb.shutdown();\r\n\t\tSystem.out.println(\"Shutdown-Done!\");\r\n\t}", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}", "public static void shutdown() {\n getSessionFactory().close();\n }", "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "public void shutDown(){\n sequence128db.shutDown();\n }", "public static void shutdown() {\n\t}", "public void shutdown() {\r\n System.exit(0);\r\n }", "public void shutdown() {\r\n \t\tMsg.debugMsg(DB_REGULAR.class, \"Database is shutting down\");\r\n \t\tStatement st;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tst.execute(\"SHUTDOWN\");\r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} finally {\r\n \t\t\tif (conn != null) {\r\n \t\t\t\ttry {\r\n \t\t\t\t\tconn.close();\r\n \t\t\t\t} catch (SQLException e) {\r\n \t\t\t\t\te.printStackTrace();\r\n \t\t\t\t} // if there are no other open connection\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public void shutdown()\n {\n // todo\n }", "public void shutdown()\n\t{\n\t\ttry\n\t\t{\n\t\t\tsave();\n\t\t\tgetPreparedStatement(\"SHUTDOWN\").executeUpdate();\n\t\t\tgetConnection().close();\n\t\t} \n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly shutdown.\", e);\n\t\t}\n\t}", "@AfterClass(alwaysRun = true)\n public void stopGeth() {\n String db = System.getProperty(\"cakeshop.database.vendor\");\n if (db.equalsIgnoreCase(\"hsqldb\")) {\n ((EmbeddedDatabase) embeddedDb).shutdown();\n }\n }", "protected void onExit(){\n conMgr.closeDbDriver();\n }", "public void shutdown() {\n shutdown(false);\n }", "private void processShutdown() throws HsqlException {\n\n int closemode;\n String token;\n\n // HUH? We should *NEVER* be able to get here if session is closed\n if (!session.isClosed()) {\n session.checkAdmin();\n }\n\n closemode = Database.CLOSEMODE_NORMAL;\n token = tokenizer.getSimpleToken();\n\n // fredt - todo - catch misspelt qualifiers here and elsewhere\n if (token.equals(Token.T_IMMEDIATELY)) {\n closemode = Database.CLOSEMODE_IMMEDIATELY;\n } else if (token.equals(Token.T_COMPACT)) {\n closemode = Database.CLOSEMODE_COMPACT;\n } else if (token.equals(Token.T_SCRIPT)) {\n closemode = Database.CLOSEMODE_SCRIPT;\n } else if (token.equals(Token.T_SEMICOLON)) {\n\n // only semicolon is accepted here\n } else if (token.length() != 0) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n database.close(closemode);\n }", "public void shutdown() {\n }", "public void shutdown() {\n\t\t\n\t}", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown();", "@Override\n protected void onDestroy() {\n engine = null;\n\n super.onDestroy();\n }", "public void shutdown() {\n // no-op\n }", "public void shutdown() {\n // For now, do nothing\n }", "public static void shutdown()\n\t{\n\t\tinstance = null;\n\t}", "@Override\n public void shutdown() {\n log.debug(\"Shutting down Ebean ..\");\n\n // TODO: Verificar si es necesario des-registrar el driver\n this.ebeanServer.shutdown(true, false);\n }", "@Override\n public void exit() {\n model.exit();\n }", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "public void Shutdown()\n {\n eventLoopGroup.shutdownGracefully();\n }", "public void shutdown() {\n this.isShutdown = true;\n }", "public void shutdown() {\n try {\n infoServer.stop();\n } catch (Exception e) {\n }\n this.shouldRun = false;\n ((DataXceiveServer) this.dataXceiveServer.getRunnable()).kill();\n try {\n this.storage.closeAll();\n } catch (IOException ie) {\n }\n }", "@Override\n\tpublic void Quit() {\n\t\t\n\t}", "public final void destroy() {\n requestExit();\n }", "public void destroy() {\n closeSqlDbConnections();\n\n\n }", "public static void shutdown() {\n\t\t// Ignore\n\t}", "public void quit() {\n\t\tgetter().quit();\r\n\t}", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }", "public static void shutdown(){\r\n\t//releases the connection to the dB\r\n\t\t try\r\n\t {\r\n\t if (statement != null)\r\n\t {\r\n\t statement.close();\r\n\t }\r\n\t if (connection != null)\r\n\t {\r\n\t DriverManager.getConnection(dbURL + \";shutdown=true\");\r\n\t connection.close();\r\n\t } \r\n\t }\r\n\t catch (SQLException sqle){\r\n\t //there will always be successful shutdown indicating that Derby has shutdown and that there is no connection. \r\n\t }\r\n\t}", "public void shutDown();", "public void shutdown()\r\n {\r\n debug(\"shutdown() the application module\");\r\n\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n // Save Our WatchLists\r\n saveAllVectorData();\r\n // Our Container vectors need to be emptied and clear. \r\n modelVector.removeAllElements();\r\n modelVector = null;\r\n\r\n tableVector.removeAllElements();\r\n tableVector = null;\r\n\r\n // Delete any additional Historic Data that is Serialized to disk\r\n expungeAllHistoricFiles();\r\n\r\n // Shutdown the task that monitors the update tasks\r\n if ( this.monitorTask != null )\r\n {\r\n this.monitorTask.cancel();\r\n this.monitorTask = null;\r\n }\r\n // Null out any reference to this data that may be present\r\n stockData = null;\r\n debug(\"shutdown() the application module - complete\");\r\n\r\n }", "public static void shut () {\r\n if(factory != null) { \t \r\n factory.finalixe(); \r\n }\r\n factory = null ;\r\n }", "@Override\n public void shutDown() {\n }", "@After\n public void destroyDatabase() {\n dbService.closeCurrentSession();\n dbService.getDdlInitializer()\n .cleanDB();\n }", "public void shutdown()\n\t{\n\t\t; // do nothing\n\t}", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "void shutdown() throws SQLException;", "public void shutdownForUpdate();", "public void destroy() {\r\n\t\tsuper.destroy();\r\n\t\tBirtEngine.destroyBirtEngine();\r\n\t}", "@Override\n\t\tpublic void onDestroy() {\n\t\t\tsuper.onDestroy();\n\t\t\tmEngin.stop_engine();\n\t\t}", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "public void shutdown()\n {\n // nothing to do here\n }", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "public void exitProgram() {\n\t\tgoOffline();\n\t\tmainWindow.dispose();\n\t\tif (config_ok)\n\t\t\tsaveConnectionConfiguration();\n\t\tSystem.exit(0);\n\t\t\n\t}", "public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }", "public void shutdownFactory() {\n // TODO(oalexan1) The app does not exit gracefully. Need to understand why.\n m_robot_factory.shutdown();\n m_microphone_factory.shutdown();\n }", "private static void registerShutdownHook() {\r\n\t\t// Registers a shutdown hook for the Neo4j instance so that it\r\n\t // shuts down nicely when the VM exits (even if you \"Ctrl-C\" the\r\n\t // running application).\r\n\t Runtime.getRuntime().addShutdownHook( new Thread()\r\n\t {\r\n\t @Override\r\n\t public void run()\r\n\t {\r\n\t _db.shutdown();\r\n\t }\r\n\t } );\r\n\t\t\r\n\t}", "void shutDown();", "@Override\r\n\tpublic void quit() {\n\t\t\r\n\t}", "public void destroy() {\n\t\ttry {\n\t\t\tdestroy(10000);\n\t\t}\n\t\tcatch(SQLException e) {}\n\t}", "public void dispose() {\n if (systemDbImporter != null && systemDbImporter.isEnabled()) {\n systemDbImporter.shutdown();\n }\n\n if (context instanceof OServerAware) {\n if (((OServerAware) context).getDistributedManager() != null) {\n ((OServerAware) context).getDistributedManager().unregisterLifecycleListener(this);\n }\n }\n\n Orient.instance().removeDbLifecycleListener(this);\n\n if (globalHook != null) {\n globalHook.shutdown(false);\n globalHook = null;\n }\n\n if (retainTask != null) {\n retainTask.cancel();\n }\n\n if (timer != null) {\n timer.cancel();\n }\n }", "public void stop() {\n log.info(\"Stopped\");\n execFactory.shutdown();\n cg.close();\n }", "public static void shutdown() {\n resetCache();\n listeningForChanges = false;\n }", "public void shutdown() {\n for (Entry<String,Session> entry : _sessions.entrySet())\n entry.getValue().disconnect();\n \n writeLine(\"\\nDebugServer shutting down.\");\n close();\n }", "@Override\n\tpublic void shutdown()\n\t{\n\t}", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "public static void destroy() {\n\t}", "public synchronized void shutDown() {\n\t state.shutDown();\n\t}", "public void abnormalShutDown() {\n\t}", "@Override\n\tpublic void destroy() {\n\t\ttry {\n//\t\t\tif(stmt!=null&&!stmt.isClosed()){\n//\t\t\t\tstmt.close();\n//\t\t\t}\n\t\t\tif(conn!=null&&conn.isClosed()){\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tsuper.destroy();\n\t}", "public void shutdown(){\n\t\tAndroidSensorDataManagerSingleton.cleanup();\n\t}", "public void quit() {\n\t\tSystem.exit(0);\n\t}", "private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "protected abstract void shutdown();", "public void shutdown() {\n YbkService.stop(ErrorDialog.this);\r\n System.runFinalizersOnExit(true);\r\n // schedule actual shutdown request on a background thread to give the service a chance to stop on the\r\n // foreground thread\r\n new Thread(new Runnable() {\r\n\r\n public void run() {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n }\r\n System.exit(-1);\r\n }\r\n }).start();\r\n }", "public void disconnect() {\n DatabaseGlobalAccess.getInstance().getEm().close();\n DatabaseGlobalAccess.getInstance().getEmf().close();\n }", "public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }", "@Override\n\tpublic void shutdown() {\n\t\t\n\t}", "@Override\n\tpublic void shutdown() {\n\n\t}", "public void close() {\n\t\tif (this.luaState != 0) {\n\t\t\tLuaStateManager.removeState(stateId);\n\t\t\t_close(luaState);\n\t\t\tthis.luaState = 0;\n\t\t}\n\t}", "private static void exit() {\n dvm.exit();\n stop = true;\n }" ]
[ "0.69123226", "0.67802125", "0.676617", "0.6678767", "0.6652848", "0.6484566", "0.64387023", "0.63985634", "0.6385051", "0.6363448", "0.63599837", "0.6326282", "0.6279192", "0.6275638", "0.6218396", "0.6195369", "0.6177087", "0.61728823", "0.61728823", "0.61728823", "0.61728823", "0.616796", "0.6159417", "0.61434466", "0.6106025", "0.6099944", "0.6092885", "0.605595", "0.6055833", "0.6054756", "0.60521483", "0.6025402", "0.6010302", "0.59831566", "0.5971064", "0.59448695", "0.59253323", "0.5917735", "0.5914995", "0.5912932", "0.590896", "0.5907749", "0.58959574", "0.5880125", "0.5879875", "0.5879266", "0.5872396", "0.586319", "0.5860393", "0.58574605", "0.58574605", "0.58574605", "0.58574605", "0.5851267", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.58279455", "0.5825338", "0.58140206", "0.5803089", "0.5799451", "0.57971233", "0.5787873", "0.57735467", "0.5773206", "0.5764634", "0.5757446", "0.5751817", "0.5750128", "0.57426053", "0.57379526", "0.5735669", "0.5732025", "0.57174814", "0.5717179", "0.5703247", "0.5701588", "0.5701396", "0.5701396", "0.5699867", "0.56990796", "0.56870747", "0.5685791", "0.5681652", "0.56723976", "0.5669017", "0.5665071" ]
0.0
-1
Executes a given file indicated by the script name and returns the final result which was output of the last statement in the script ran. This method will automatically parse the script and execute using internally configured executor.
@SuppressWarnings("unchecked") @CompileStatic public <T> T execute(String scriptName) throws NyException { return (T) execute(scriptName, EMPTY_MAP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void executeScript(Readable script) throws IOException;", "public String execPHP(String scriptName, String param) {\n\n StringBuilder output = new StringBuilder();\n\n try {\n String line;\n\n Process p = Runtime.getRuntime().exec(\"php \" + scriptName + \" \" + param);\n BufferedReader input =\n new BufferedReader\n (new InputStreamReader(p.getInputStream()));\n while ((line = input.readLine()) != null) {\n output.append(line);\n }\n input.close();\n } catch (Exception err) {\n err.printStackTrace();\n }\n return output.toString();\n }", "public String getScriptExecution() {\n StringBuffer script = new StringBuffer(\"#!/bin/bash\\n\");\n script.append(\"if [ $# -ne \" + workflowInputTypeStates.size() + \" ]\\n\\tthen\\n\");\n script\n .append(\"\\t\\techo \\\"\" + workflowInputTypeStates.size() + \" argument(s) expected.\\\"\\n\\t\\texit\\nfi\\n\");\n int in = 1;\n for (TypeNode input : workflowInputTypeStates) {\n script.append(input.getShortNodeID() + \"=$\" + (in++) + \"\\n\");\n }\n script.append(\"\\n\");\n for (ModuleNode operation : moduleNodes) {\n String code = operation.getUsedModule().getExecutionCode();\n if (code == null || code.equals(\"\")) {\n script.append(\"\\\"Error. Tool '\" + operation.getNodeLabel() + \"' is missing the execution code.\\\"\")\n .append(\"\\n\");\n } else {\n for (int i = 0; i < operation.getInputTypes().size(); i++) {\n code = code.replace(\"@input[\" + i + \"]\", operation.getInputTypes().get(i).getShortNodeID());\n }\n for (int i = 0; i < operation.getOutputTypes().size(); i++) {\n code = code.replace(\"@output[\" + i + \"]\", operation.getOutputTypes().get(i).getShortNodeID());\n }\n script.append(code).append(\"\\n\");\n }\n }\n int out = 1;\n for (TypeNode output : workflowOutputTypeStates) {\n script.append(\"echo \\\"\" + (out++) + \". output is: $\" + output.getShortNodeID() + \"\\\"\");\n }\n\n return script.toString();\n }", "private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName, Map<String, Object> data) throws NyException {\n QScript script = null;\n try {\n script = parse(scriptName, data);\n return (T) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script);\n } catch (Exception ex) {\n if (ex instanceof NyException) {\n throw (NyException) ex;\n } else {\n throw new NyScriptExecutionException(\"Ny script execution error!\", ex);\n }\n } finally {\n if (script != null) {\n script.free();\n }\n }\n }", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "public Object executeScript(String command);", "default Value eval(String script) throws Exception {\n return eval(script, false);\n }", "public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }", "@Override\r\n public String evaluateScriptOutput() throws IOException {\r\n return getPythonHandler().getPythonOutput();\r\n }", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "@Override\r\n public void execute(SocketChannel channel) {\r\n File file;\r\n file = new File(fileName);\r\n if (!file.canRead()) {\r\n System.err.println(\"Cant read file \" + fileName + \".\\nScript execution failed.\");\r\n return;\r\n }\r\n try (Scanner fin = new Scanner(file)) {\r\n String str;\r\n Command command;\r\n while (fin.hasNextLine()) {\r\n str = fin.nextLine();\r\n command = parser.parse(str);\r\n if (command != null && !command.getClass().toString().contains(\"ExecuteScriptCommand\")) {\r\n command.execute(channel);\r\n } else if (command != null && command.getClass().toString().contains(\"ExecuteScriptCommand\")) {\r\n String executeFileName = ((ExecuteScriptCommand) command).getFileName();\r\n if (this.parser.getExecutedFiles().contains(executeFileName)) {\r\n System.err.println(\"recursive execute_script_command is unavaliable, \" + executeFileName + \" file was already called.\");\r\n } else {\r\n this.parser.getExecutedFiles().add(fileName);\r\n command.execute(channel);\r\n }\r\n } else {\r\n System.err.println(String.format(\"No such command: %s\", str));\r\n }\r\n\r\n }\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"No such file \" + fileName + \".\\nScript execution failed.\");\r\n } catch (Exception ex) {\r\n System.err.println(ex.getMessage());\r\n System.err.println(\"Script failed\");\r\n }\r\n }", "public StatRes execut() {\n\t\tif (res.getFileName().endsWith(\".xml\") || res.getFileName().endsWith(\".mxml\")) {\n\t\t\tparseLog2();\n\t\t\tres.calcStat();\n\t\t}\n\t\treturn res;\n\t}", "public abstract void runScript() throws Exception;", "default Value eval(String script, String name, boolean literal) throws Exception {\n if (name.endsWith(\".mjs\")) {\n return eval(script, name, \"application/javascript+module\", literal);\n } else {\n return eval(script, name, \"application/javascript\", literal);\n }\n }", "public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }", "private void runScript(String script) throws IOException, InterruptedException, RootToolsException, TimeoutException {\r\n\r\n// File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n//\r\n// File f = new File(tmpFolder, TEMP_SCRIPT);\r\n// f.setExecutable(true);\r\n// f.deleteOnExit();\r\n//\r\n// // Write the script to be executed\r\n// PrintWriter out = new PrintWriter(new FileOutputStream(f));\r\n// if (new File(\"/system/bin/sh\").exists()) {\r\n// out.write(\"#!/system/bin/sh\\n\");\r\n// }\r\n// out.write(script);\r\n// if (!script.endsWith(\"\\n\")) {\r\n// out.write(\"\\n\");\r\n// }\r\n// out.write(\"exit\\n\");\r\n// out.flush();\r\n// out.close();\r\n\r\n Log.d(this.getClass().getSimpleName(), \"Requesting file execution\");\r\n// Process exec = Runtime.getRuntime().exec(\"su -c \" + f.getAbsolutePath());\r\n// int res = exec.waitFor();\r\n// Toast.makeText(ctx, \"result: \" + res, Toast.LENGTH_LONG).show();\r\n \r\n// if (res != 0) {\r\n// ExceptionHandler.handle(this, R.string.error_script_loading, ctx);\r\n// }\r\n \r\n\r\n if (RootTools.isAccessGiven()) {\r\n List<String> output = RootTools.sendShell(script, SCRIPT_MAX_TIMEOUT);\r\n Log.d(\"\" + this, \"\" + output);\r\n }\r\n }", "private Result processScript() throws IOException, HsqlException {\n\n String token = tokenizer.getString();\n ScriptWriterText dsw = null;\n\n session.checkAdmin();\n\n try {\n if (tokenizer.wasValue()) {\n if (tokenizer.getType() != Types.VARCHAR) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n dsw = new ScriptWriterText(database, token, true, true, true);\n\n dsw.writeAll();\n\n return new Result(ResultConstants.UPDATECOUNT);\n } else {\n tokenizer.back();\n\n return DatabaseScript.getScript(database, false);\n }\n } finally {\n if (dsw != null) {\n dsw.close();\n }\n }\n }", "default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }", "@CompileStatic\n public String executeToJSON(String scriptName) throws NyException {\n return executeToJSON(scriptName, new HashMap<>());\n }", "private void getScript() {\n\t\tif ((scriptFile != null) && scriptFile.exists()) {\n\t\t\tlong lm = scriptFile.lastModified();\n\t\t\tif (lm > lastModified) {\n\t\t\t\tscript = new PixelScript(scriptFile);\n\t\t\t\tlastModified = lm;\n\t\t\t}\n\t\t}\n\t\telse script = null;\n\t}", "public Object processScriptResult(Object result) throws ScriptException;", "public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }", "public void execfile(String filename) {\n }", "public DataModel execute(File file) {\n\t\tGlobalEnv env = new GlobalEnv();\n\t\tFileNode fileNode = new FileNode(file);\n\n\t\tfileNode.execute(env); // TODO Consider the returned CONTROL value?\n\t\tenv.finishExecution();\n\t\t\n\t\tDataNode output = env.getCurrentOutput();\n\t\treturn new DataModel(output);\n\t}", "public int execute();", "public int execute() throws IOException {\n\t\tCommandLine commandLine = createCommandLineForExecutable();\n\t\tappendGraphPathParameters(commandLine);\n\t\tappendThreadingParameters(commandLine);\n\t\tappendAlgorithmParameters(commandLine);\n\t\tappendOutputPathParameters(commandLine);\n\n\t\tLOG.debug(\"Starting job with command line: {}\", commandLine.toString());\n\n\t\tExecutor executor = createCommandExecutor();\n\t\texecutor.setStreamHandler(new PumpStreamHandler(System.out));\n\t\texecutor.setExitValue(0);\n\t\treturn executor.execute(commandLine);\n\t}", "public native int execute(String name);", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }", "public void exec();", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "public CompletableFuture<Object> eval(final String script, final Bindings boundVars) {\n return eval(script, null, boundVars);\n }", "void execute(Executable executable);", "public void doRunScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\t// set default selection\n \t\treq.setAttribute(\"currentNode\", \"(master)\");\n \t\treq.getView(this, \"runscript.jelly\").forward(req, rsp);\n \t}", "private void runScriptShell(Interpreter interpreter, String filePath) {\r\n\r\n\t\tint lineNumber = 1;\r\n\r\n\t\tFile file = new File(filePath);\r\n\r\n\t\tSet<String> errorMessages = new HashSet<String>();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tthis.statementScanner = new Scanner(file);\r\n\r\n\t\t\tthis.statementScanner.useDelimiter(\"(?<!\\\\\\\\);\");\r\n\r\n\t\t\twhile (this.statementScanner.hasNext()) {\r\n\r\n\t\t\t\tthis.input = this.statementScanner.next();\r\n\r\n\t\t\t\tthis.statement.parseStatement(this.input);\r\n\r\n\t\t\t\terrorMessages = statement.getErrorMessages();\r\n\r\n\t\t\t\tif (errorMessages.size() > 0) {\r\n\t\t\t\t\tSystem.out.println(\" Error on line number \" + lineNumber + \": \");\r\n\t\t\t\t\tfor (String errorMessage : errorMessages) {\r\n\r\n\t\t\t\t\t\tSystem.out.println(\" \" + errorMessage);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tinterpreter.processStatement(this.statement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlineNumber++;\r\n\t\t\t}\r\n\r\n\t\t\tstatementScanner.close();\r\n\t\t\t/*\r\n\t\t\t * For script input, the file is written to and saved after the script's\r\n\t\t\t * execution is complete.\r\n\t\t\t */\r\n\t\t\tinterpreter.getDisk().writeDataMapToDisk(interpreter.getMemory().getDataMap());\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\tSystem.out.println(\"Could not access the script file: \" + filePath + \"...no changes were made.\");\r\n\t\t}\r\n\r\n\t}", "public String execute() {\n String output = \"\";\n String tempOut = \"\";\n FSElement file;\n ArrayList<FSElement> recfiles;\n for (String fileName : dirArray) {\n file = Traverse.accessFS(fileName, root);\n if (file != null) {\n if (file instanceof File) {\n tempOut = getContent((File) file);\n if (!(output.contains(tempOut))) {\n output += tempOut;\n }\n } else if (subdir) {\n recfiles = Traverse.getAllDirs((Directory) file);\n for (FSElement temp : recfiles) {\n if (temp instanceof File) {\n tempOut = getContent((File) temp);\n if (!(output.contains(tempOut))) {\n output += tempOut;\n }\n }\n }\n }\n } else {\n Output.pathIncorrect(fileName);\n }\n }\n if (!(output.equals(\"\"))) {\n output = output.substring(0, output.length() - 2);\n return output;\n } else {\n Output.NoFilesFound();\n return null;\n }\n }", "public static String execute(File program) throws IOException {\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\texecute(program, new ByteArrayInputStream(\"\".getBytes()), output, null);\n\t\treturn new String(output.toByteArray(), \"UTF-8\");\n\t}", "abstract protected String getResultFileName();", "void eval(Reader reader) throws ScriptRunnerException, IOException;", "public synchronized String execute() throws PowerShellException {\n\t\treturn this.execute(false);\n\t}", "@Override\n public String execute() throws Exception {\n String workingDir = System.getProperty(\"user.dir\");\n File f = new File(workingDir + \"/target/classes/text.txt\");\n fileInputStream = new FileInputStream(f);\n return SUCCESS;\n }", "private String doScript(String node, String scriptTxt) throws IOException, ServletException {\n \n \t\tString output = \"[no output]\";\n \t\tif (node != null && scriptTxt != null) {\n \n \t\t\ttry {\n \n \t\t\t\tComputer comp = Hudson.getInstance().getComputer(node);\n\t\t\t\tif (comp == null) {\n \t\t\t\t\toutput = Messages.node_not_found(node);\n \t\t\t\t} else {\n \t\t\t\t\tif (comp.getChannel() == null) {\n \t\t\t\t\t\toutput = Messages.node_not_online(node);\n\t\t\t\t\t} else {\n \t\t\t\t\t\toutput = RemotingDiagnostics.executeGroovy(scriptTxt, comp.getChannel());\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t} catch (InterruptedException e) {\n \t\t\t\tthrow new ServletException(e);\n \t\t\t}\n \t\t}\n \t\treturn output;\n \n \t}", "R execute();", "public static String execute(File program, String input) throws IOException {\n\t\treturn execute(program, input);\n\t}", "protected void executeScripts(List<Script> scripts) {\n for (Script script : scripts) {\n try {\n // We register the script execution, but we indicate it to be unsuccessful. If anything goes wrong or if the update is\n // interrupted before being completed, this will be the final state and the DbMaintainer will do a from-scratch update the next time\n ExecutedScript executedScript = new ExecutedScript(script, new Date(), false);\n versionSource.registerExecutedScript(executedScript);\n\n logger.info(\"Executing script \" + script.getFileName());\n scriptRunner.execute(script.getScriptContentHandle());\n // We now register the previously registered script execution as being successful\n executedScript.setSuccessful(true);\n versionSource.updateExecutedScript(executedScript);\n\n } catch (UnitilsException e) {\n logger.error(\"Error while executing script \" + script.getFileName(), e);\n throw e;\n }\n }\n }", "protected abstract void parseExecResult(BufferedReader lines) throws IOException;", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "T execute(String jobName) throws Exception;", "public abstract int execute();", "public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }", "NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;", "public String getOutput() throws TavernaException, ProcessException{\n if (outputFile == null){\n return saveOutput();\n }\n try {\n return runner.getOutput();\n } catch (InterruptedException ex) {\n throw new TavernaException (\"Workflow was interrupted.\", ex);\n }\n }", "public void executeFile(String fileName) {\n String file = \"\";\r\n String lign;\r\n try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\r\n while ((lign = br.readLine()) != null) {\r\n file += \" \" + lign;\r\n }\r\n\r\n String[] commands = file.split(\";\");\r\n for (int i = 0; i < commands.length; i++) {\r\n executeUpdate(commands[i]);\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "CommandResult execute(String commandText) throws Exception;", "@CompileStatic\n public String executeToJSON(String scriptName, Map<String, Object> data) throws NyException {\n Object result = execute(scriptName, data);\n if (result == null) {\n return null;\n } else {\n return JsonOutput.toJson(result);\n }\n }", "public Object execute(Script script, ParsedLine parsedLine) throws Exception {\n\t\t\n \tif (parsedLine.numberOfParameters() != 3) {\n throw new EasyAcceptException(script.getFileName(), script\n .getLineNumber(),\n \"Syntax error: equalfiles <fileOK> <fileToTest>\");\n }\n \tParameter [] param = parsedLine.getCommandArgs(); \n \ttry{\n \t\tequalFiles(param[0].getValueAsString(),\n \t\t\t\tparam[1].getValueAsString());\n \t}catch(EasyAcceptException exc){\n \t\tthrow new EasyAcceptException(script.getFileName(), script\n .getLineNumber(), exc.getMessage()); \t\t\n \t}\t\n return \"OK\"; \n\t}", "public T execute() {\n return GraalCompiler.compile(this);\n }", "CommandResult execute();", "@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}", "@CompileStatic\n public QScript parse(String scriptName) throws NyException {\n return parse(scriptName, EMPTY_MAP);\n }", "abstract void exec();", "public abstract void execute();", "public abstract void execute();", "public abstract void execute();", "public NMapRun getResult() {\n\t\tOnePassParser parser = new OnePassParser() ;\n\t\tNMapRun nmapRun = parser.parse(outFilePath, OnePassParser.FILE_NAME_INPUT ) ;\n\t\treturn nmapRun ;\n\t}", "ExecutionResult<Void> execute();", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void execute()\n {\n // Display the dialog and wait for the close action (the user\n // selects the Okay button or the script execution completes\n // and a Cancel button is issued)\n int option = cancelDialog.showMessageDialog(dialog,\n \"<html><b>Script execution in progress...<br><br>\"\n + CcddUtilities.colorHTMLText(\"*** Press </i>Halt<i> \"\n + \"to terminate script execution ***\",\n Color.RED),\n \"Script Executing\",\n JOptionPane.ERROR_MESSAGE,\n DialogOption.HALT_OPTION);\n\n // Check if the script execution was terminated by the user and\n // that the script is still executing\n if (option == OK_BUTTON && scriptThread.isAlive())\n {\n // Forcibly stop script execution. Note: this method is\n // deprecated due to inherent issues that can occur when a\n // thread is abruptly stopped. However, the stop method is\n // the only manner in which the script can be terminated\n // (without additional code within the script itself, which\n // cannot be assumed since the scripts are user-generated).\n // There shouldn't be a potential for object corruption in\n // the application since it doesn't reference any objects\n // created by a script\n scriptThread.stop();\n\n // Set the execution status(es) to indicate the scripts\n // didn't complete\n isBad = new boolean[associations.size()];\n Arrays.fill(isBad, true);\n }\n }", "protected abstract void execute();", "com.google.protobuf.ByteString getScript();", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "public TestResult(File file)\n throws ResultFileNotFoundFault, ReloadFault {\n resultsFile = file;\n reload();\n\n testURL = desc.getRootRelativeURL();\n\n execStatus = Status.parse(PropertyArray.get(props, EXEC_STATUS));\n }", "public BulkItemResponse getExecutionResult() {\n assert assertInvariants(ItemProcessingState.EXECUTED);\n return executionResult;\n }", "@Override\n\tpublic String execute() throws Exception {\n\t\t\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic TestResult execute() {\n\t\ttestResult = new TestResult(\"Aggregated Result\");\n\t\t// before\n\t\ttry {\n\t\t\tbefore();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttestResult.setErrorMessage(\"Error @before! \" + e.getMessage());\n\t\t\ttestResult.setStatus(STATUS.ERROR);\n\t\t\tLOGGER.info(\"Test \" + getTestIdentifier() + \" threw error in before method!\");\n\t\t\tnotifyObservers();\n\t\t\treturn testResult;\n\t\t}\n\n\t\t// run\n\t\ttestResult.setStart(System.currentTimeMillis());\n\t\tTestResult subTestResult = null;\n\t\ttry {\n\t\t\tsubTestResult = runTestImpl();\n\t\t\tLOGGER.info(\"Test \" + getTestIdentifier() + \" finished.\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttestResult.setErrorMessage(\"Error @runTestImpl \" + e.getMessage());\n\t\t\ttestResult.setStatus(STATUS.ERROR);\n\t\t\tLOGGER.info(\"Test \" + getTestIdentifier() + \" threw error in runTestImpl method!\");\n\t\t\tnotifyObservers();\n\t\t\treturn testResult;\n\t\t} finally {\n\t\t\ttestResult.setEnd(System.currentTimeMillis());\n\t\t\tif(subTestResult != null)\n\t\t\t\ttestResult.addSubResult(subTestResult);\n\t\t\t// after\n\t\t\ttry {\n\t\t\t\tafter();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\ttestResult.setErrorMessage(\"Error @after! \" + e.getMessage());\n\t\t\t\ttestResult.setStatus(STATUS.ERROR);\n\t\t\t\tLOGGER.info(\"Test \" + getTestIdentifier() + \" threw error in after method!\");\n\t\t\t}\n\t\t}\n\t\tnotifyObservers();\n\t\treturn testResult;\n\t}", "String execute() throws InterruptedException, FileNotFoundException\n {\n String s = \"This AI does not comprehend '\" + bogusCommand + \"'.\"; \n return s; \n }", "protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }", "@Override\n protected void execute(File file, int offset) throws IOException {\n }", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "public String process() throws Exception\r\n\t{\r\n\t\treturn result;\r\n\t}", "@EventListener\n public void scriptResultWriting(ScriptLaunched scriptLaunched){\n Long id = scriptLaunched.getEventData();\n logger.info(\"script with id: \" + id + \" launched\");\n // run task for script with id\n }", "public static void executeSQLScript(Connection conn, String file) throws Exception{\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\tBufferedInputStream bis=new BufferedInputStream(fis);\n\t\tStringBuffer sb=new StringBuffer(); \n\t\tbyte[] bytes=new byte[1024];\n\t\twhile (bis.available()!=0){\n\t\t\tint length=fis.read(bytes);\n\t\t\tif (length!=1024){\n\t\t\t\tbyte[] smallBytes=new byte[length];\n\t\t\t\tSystem.arraycopy(bytes,0,smallBytes,0,length);\n\t\t\t\tbytes=smallBytes;\n\t\t\t}\t\n\t\t\tsb.append(new String(bytes));\n\t\t}\n\t\tStringTokenizer st = new StringTokenizer(sb.toString(),\";\",false);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString token=st.nextToken().trim();\t\n\t\t\tif (!token.equals(\"\")){\n\t\t\t\tif (token.equalsIgnoreCase(\"commit\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\tDataAccessObject.rollback(conn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (token.equalsIgnoreCase(\"quit\")){\n\t\t\t\t\t//do nothing\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse if (token.substring(0,2).equals(\"--\")){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\texecuteSQLStatement(conn,token);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public IRubyObject runScriptBody(Script script) {\n ThreadContext context = getCurrentContext();\n \n try {\n return script.__file__(context, getTopSelf(), Block.NULL_BLOCK);\n } catch (JumpException.ReturnJump rj) {\n return (IRubyObject) rj.getValue();\n }\n }", "private int executeScript() throws ServerException {\r\n\t\tCGIOutputStreamReader cin = new CGIHandler().sendScript( request );\r\n\t\tBufferedOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tint headerStringLen = cin.getHeaderStringSize();\r\n\t\t\tbyte[] content = cin.readBodyContent();\r\n\t\t\tint contentLength = content.length - headerStringLen;\r\n\t\t\tString headerMessage = createBasicHeaderMessage( ResponseTable.OK ).buildContentLength(\r\n\t\t\t\t\tcontentLength ).toString();\r\n\r\n\t\t\tout = new BufferedOutputStream( outStream );\r\n\t\t\tout.write( headerMessage.getBytes( \"UTF-8\" ) );\r\n\t\t\tout.write( content );\r\n\t\t\tout.flush();\r\n\t\t\treturn ResponseTable.OK;\r\n\r\n\t\t} catch ( IOException ioe ) {\r\n\t\t\tioe.printStackTrace();\r\n\t\t\tthrow new ServerException( ResponseTable.INTERNAL_SERVER_ERROR );\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tcin.close();\r\n\t\t\t} catch ( Exception ioe ) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void execute() {\r\n\t\r\n\t}", "public HttpResponse doDownloadScript(StaplerRequest res, StaplerResponse rsp, @QueryParameter(\"name\") String name,\n \t\t\t@QueryParameter(\"catalog\") String catalogName) throws IOException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tCatalogInfo catInfo = getConfiguration().getCatalogInfo(catalogName);\n \t\tCatalogManager catalogManager = new CatalogManager(catInfo);\n \t\tCatalog catalog = catalogManager.loadCatalog();\n \t\tCatalogEntry entry = catalog.getEntryByName(name);\n \t\tString source = catalogManager.downloadScript(name);\n \n \t\treturn doScriptAdd(res, rsp, name, entry.comment, source);\n \t}", "public void execute() {\n\t\t\n\t}", "public String getScriptName() {\n\t\treturn scriptName;\n\t}" ]
[ "0.56358236", "0.56162703", "0.56118804", "0.54683495", "0.54578555", "0.5437819", "0.5275453", "0.52336234", "0.5218904", "0.51983637", "0.51867", "0.516004", "0.51226526", "0.5113415", "0.51120377", "0.507147", "0.50635743", "0.5056763", "0.50380135", "0.50310975", "0.4991082", "0.49686787", "0.494453", "0.49439618", "0.4923029", "0.49199194", "0.49123538", "0.4875835", "0.48642144", "0.48584878", "0.4826506", "0.4826506", "0.4826506", "0.4826506", "0.4798422", "0.47842395", "0.47777614", "0.47723448", "0.47707838", "0.4770493", "0.47672686", "0.4765701", "0.4751355", "0.47499162", "0.47438398", "0.4739287", "0.4729933", "0.47274837", "0.47211507", "0.47190362", "0.47190362", "0.47190362", "0.47190362", "0.47190362", "0.47190362", "0.47190362", "0.47166163", "0.46969113", "0.46937996", "0.46891734", "0.46797702", "0.46739706", "0.46712112", "0.4669331", "0.46677694", "0.46637028", "0.46526298", "0.46450114", "0.4625804", "0.46200433", "0.4603384", "0.4603384", "0.4603384", "0.45975503", "0.45972097", "0.45809075", "0.45761266", "0.45734632", "0.45558074", "0.45558074", "0.45558074", "0.45461178", "0.4526452", "0.4524766", "0.4522312", "0.45023173", "0.4499394", "0.44943395", "0.44850433", "0.44850433", "0.44850433", "0.44761577", "0.44645545", "0.44638705", "0.446349", "0.44555604", "0.4453348", "0.44495064", "0.44451115", "0.44407392" ]
0.62665015
0
Executes a given file indicated by the script name using given set of variables and returns the final result which was output of the last statement in the script ran. This method will automatically parse the script and execute using internally configured executor. Note: You should pass all parameter values required for the query execution.
@SuppressWarnings("unchecked") @CompileStatic public <T> T execute(String scriptName, Map<String, Object> data) throws NyException { QScript script = null; try { script = parse(scriptName, data); return (T) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script); } catch (Exception ex) { if (ex instanceof NyException) { throw (NyException) ex; } else { throw new NyScriptExecutionException("Ny script execution error!", ex); } } finally { if (script != null) { script.free(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName) throws NyException {\n return (T) execute(scriptName, EMPTY_MAP);\n }", "void executeScript(Readable script) throws IOException;", "public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }", "public Object executeScript(String command);", "private Result processScript() throws IOException, HsqlException {\n\n String token = tokenizer.getString();\n ScriptWriterText dsw = null;\n\n session.checkAdmin();\n\n try {\n if (tokenizer.wasValue()) {\n if (tokenizer.getType() != Types.VARCHAR) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n dsw = new ScriptWriterText(database, token, true, true, true);\n\n dsw.writeAll();\n\n return new Result(ResultConstants.UPDATECOUNT);\n } else {\n tokenizer.back();\n\n return DatabaseScript.getScript(database, false);\n }\n } finally {\n if (dsw != null) {\n dsw.close();\n }\n }\n }", "public static void executeSQLScript(Connection conn, String file) throws Exception{\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\tBufferedInputStream bis=new BufferedInputStream(fis);\n\t\tStringBuffer sb=new StringBuffer(); \n\t\tbyte[] bytes=new byte[1024];\n\t\twhile (bis.available()!=0){\n\t\t\tint length=fis.read(bytes);\n\t\t\tif (length!=1024){\n\t\t\t\tbyte[] smallBytes=new byte[length];\n\t\t\t\tSystem.arraycopy(bytes,0,smallBytes,0,length);\n\t\t\t\tbytes=smallBytes;\n\t\t\t}\t\n\t\t\tsb.append(new String(bytes));\n\t\t}\n\t\tStringTokenizer st = new StringTokenizer(sb.toString(),\";\",false);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString token=st.nextToken().trim();\t\n\t\t\tif (!token.equals(\"\")){\n\t\t\t\tif (token.equalsIgnoreCase(\"commit\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\tDataAccessObject.rollback(conn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (token.equalsIgnoreCase(\"quit\")){\n\t\t\t\t\t//do nothing\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse if (token.substring(0,2).equals(\"--\")){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\texecuteSQLStatement(conn,token);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;", "R execute();", "public void runScript(String sqlScript) throws DataAccessLayerException {\n Session session = null;\n Transaction trans = null;\n Connection conn = null;\n\n Statement stmt = null;\n try {\n session = getSession(true);\n trans = session.beginTransaction();\n conn = session.connection();\n stmt = conn.createStatement();\n } catch (SQLException e) {\n throw new DataAccessLayerException(\n \"Unable to create JDBC statement\", e);\n }\n boolean success = true;\n String[] scriptContents = sqlScript.split(\";\");\n for (String line : scriptContents) {\n if (!line.isEmpty()) {\n try {\n stmt.addBatch(line + \";\");\n\n } catch (SQLException e1) {\n logger.warn(\"Script execution failed. Rolling back transaction\");\n trans.rollback();\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e2) {\n logger.error(\"Cannot close database connection!!\", e2);\n }\n if (session.isOpen()) {\n session.close();\n }\n throw new DataAccessLayerException(\n \"Cannot execute SQL statement: \" + line, e1);\n }\n }\n }\n try {\n stmt.executeBatch();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Error executing script.\", e1);\n }\n\n try {\n stmt.close();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Unable to close JDBC statement!\", e1);\n }\n\n if (success) {\n trans.commit();\n }\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e) {\n logger.error(\"Cannot close database connection!!\", e);\n }\n if (session.isOpen()) {\n session.close();\n }\n }", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "public String execPHP(String scriptName, String param) {\n\n StringBuilder output = new StringBuilder();\n\n try {\n String line;\n\n Process p = Runtime.getRuntime().exec(\"php \" + scriptName + \" \" + param);\n BufferedReader input =\n new BufferedReader\n (new InputStreamReader(p.getInputStream()));\n while ((line = input.readLine()) != null) {\n output.append(line);\n }\n input.close();\n } catch (Exception err) {\n err.printStackTrace();\n }\n return output.toString();\n }", "String execute(String... parameters);", "public int execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }", "abstract public void execute(Parameters p);", "public abstract void runScript() throws Exception;", "public CompletableFuture<Object> eval(final String script, final Bindings boundVars) {\n return eval(script, null, boundVars);\n }", "private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }", "protected void executeScripts(List<Script> scripts) {\n for (Script script : scripts) {\n try {\n // We register the script execution, but we indicate it to be unsuccessful. If anything goes wrong or if the update is\n // interrupted before being completed, this will be the final state and the DbMaintainer will do a from-scratch update the next time\n ExecutedScript executedScript = new ExecutedScript(script, new Date(), false);\n versionSource.registerExecutedScript(executedScript);\n\n logger.info(\"Executing script \" + script.getFileName());\n scriptRunner.execute(script.getScriptContentHandle());\n // We now register the previously registered script execution as being successful\n executedScript.setSuccessful(true);\n versionSource.updateExecutedScript(executedScript);\n\n } catch (UnitilsException e) {\n logger.error(\"Error while executing script \" + script.getFileName(), e);\n throw e;\n }\n }\n }", "public void executeFile(String fileName) {\n String file = \"\";\r\n String lign;\r\n try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\r\n while ((lign = br.readLine()) != null) {\r\n file += \" \" + lign;\r\n }\r\n\r\n String[] commands = file.split(\";\");\r\n for (int i = 0; i < commands.length; i++) {\r\n executeUpdate(commands[i]);\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }", "CommandResult execute();", "public static void main(String[] args) throws IOException, QizxException {\n int min = 0;\n int max = Integer.MAX_VALUE;\n //fichero para recoger cada script XQuery de consulta\n File scriptFile;\n //objeto file 'directorioGrupo' apuntando a la ruta del Library Group\n File directorioGrupo = new File(directorioGrupoRoot);\n // Conexión o apertura del gestor del grupo\n LibraryManager bdManager = Configuration.openLibraryGroup(directorioGrupo);\n //Conexión a la BD\n Library bd = bdManager.openLibrary(bdNombre);\n\n try {\n //Para cada script con consulta XQuery\n for (int i = 0; i < scriptNombre.length; ++i) {\n //recoge la ruta del fichero de script con consulta XQuery\n scriptFile = new File(directorioScriptsRoot + scriptNombre[i]);\n //mensaje indicando el script XQuery que se ejecutará\n System.out.println(\"Ejecutando '\" + scriptFile + \"'...\");\n\n //carga el contenido del script XQuery en una cadena\n String consultaXquery = cargaScript(scriptFile);\n //imprime la expresión de consulta XQuery\n System.out.println(\"---\\n\" + consultaXquery + \"\\n---\");\n\n //compila la consulta, almacenado resultado en expr\n Expression expr = compileExpression(bd, consultaXquery);\n //evalúa la consulta para mostrar resultados en el rango [min, max]\n evaluarExpression(expr, min, max);\n }\n } finally {\n //cierra conexión con BD\n cerrar(bd, bdManager);\n }\n }", "public native int execute(String name);", "public String getScriptExecution() {\n StringBuffer script = new StringBuffer(\"#!/bin/bash\\n\");\n script.append(\"if [ $# -ne \" + workflowInputTypeStates.size() + \" ]\\n\\tthen\\n\");\n script\n .append(\"\\t\\techo \\\"\" + workflowInputTypeStates.size() + \" argument(s) expected.\\\"\\n\\t\\texit\\nfi\\n\");\n int in = 1;\n for (TypeNode input : workflowInputTypeStates) {\n script.append(input.getShortNodeID() + \"=$\" + (in++) + \"\\n\");\n }\n script.append(\"\\n\");\n for (ModuleNode operation : moduleNodes) {\n String code = operation.getUsedModule().getExecutionCode();\n if (code == null || code.equals(\"\")) {\n script.append(\"\\\"Error. Tool '\" + operation.getNodeLabel() + \"' is missing the execution code.\\\"\")\n .append(\"\\n\");\n } else {\n for (int i = 0; i < operation.getInputTypes().size(); i++) {\n code = code.replace(\"@input[\" + i + \"]\", operation.getInputTypes().get(i).getShortNodeID());\n }\n for (int i = 0; i < operation.getOutputTypes().size(); i++) {\n code = code.replace(\"@output[\" + i + \"]\", operation.getOutputTypes().get(i).getShortNodeID());\n }\n script.append(code).append(\"\\n\");\n }\n }\n int out = 1;\n for (TypeNode output : workflowOutputTypeStates) {\n script.append(\"echo \\\"\" + (out++) + \". output is: $\" + output.getShortNodeID() + \"\\\"\");\n }\n\n return script.toString();\n }", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "protected abstract void execute();", "private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\r\n Date start = new Date();\r\n LOGGER.info(\"job.execute.start:\" + SDF.format(start));\r\n try {\r\n if (args.length == 0) {\r\n throw new RuntimeException(\"I have nothing to execute,\"\r\n + \" Please input your SQL behind execution command as first argument!!\");\r\n }\r\n OptionsParser parser = new OptionsParser(args);\r\n final String sqlArg = parser.getOptionValue(SubmitOption.SQL);\r\n String runner = parser.getOptionValue(SubmitOption.RUNNER);\r\n\r\n String sql = new String(Base64.getDecoder().decode(sqlArg), StandardCharsets.UTF_8).trim();\r\n LOGGER.info(\"Your SQL is '{}'\", sql);\r\n //list tables or databases from meta-data\r\n //if (sql.toUpperCase().startsWith(\"SHOW\") || sql.toUpperCase().startsWith(\"DESC\")) {\r\n // //ShowDbHandler.dealSql(sql);\r\n // return;\r\n //}\r\n DdlOperation ddlOperation = DdlFactory.getDdlOperation(getSqlType(sql));\r\n if (null != ddlOperation) {\r\n ddlOperation.execute(sql);\r\n return;\r\n }\r\n QueryTables tables = SqlUtil.parseTableName(sql);\r\n List<String> tableNames = tables.tableNames;\r\n\r\n if (tables.isDml()) {\r\n runner = \"SPARK\";\r\n }\r\n\r\n welcome();\r\n long latestTime = System.currentTimeMillis();\r\n LOGGER.info(\"Parsing table names has finished, {}\",\r\n tableNames.isEmpty() ? \"it's a non-table query.\"\r\n : \"you will query tables: \" + tableNames);\r\n\r\n if (tryToExecuteQueryDirectly(sql, tableNames, runner)) {\r\n System.out.printf(\"(%.2f sec)\", ((double) (System.currentTimeMillis() - latestTime) / 1000));\r\n return;\r\n }\r\n\r\n Builder builder = SqlRunner.builder()\r\n .setAcceptedResultsNum(100)\r\n .setTransformRunner(RunnerType.value(runner));\r\n\r\n String schema = loadSchemaForTables(tableNames);\r\n QueryProcedure procedure = new QueryProcedureProducer(schema, builder).createQueryProcedure(sql);\r\n\r\n AbstractPipeline pipeline = ((DynamicSqlRunner) builder.ok()).chooseAdaptPipeline(procedure);\r\n Date sqlPased = new Date();\r\n LOGGER.info(\"SQL.parsed:\" + SDF.format(sqlPased));\r\n if (pipeline instanceof JdbcPipeline && isPointedToExecuteByJdbc(runner)) {\r\n jdbcExecuter(sql, tableNames, procedure, sqlPased, start);\r\n return;\r\n }\r\n LOGGER.info(\"It's a complex query, we need to setup computing engine, waiting...\");\r\n Date apply = new Date();\r\n LOGGER.info(\"apply.resource:\" + SDF.format(apply));\r\n ProcessExecClient.createProcessClient(pipeline, parser, builder).exec();\r\n Date executed = new Date();\r\n LOGGER.info(\"job.execute.final:\" + SDF.format(executed));\r\n LOGGER.info(\"SQL.parsed.time:\" + String.valueOf(sqlPased.getTime() - start.getTime()));\r\n LOGGER.info(\"resource.apply.time:\" + String.valueOf(apply.getTime() - sqlPased.getTime()));\r\n LOGGER.info(\"job.query.time:\" + String.valueOf(executed.getTime() - apply.getTime()));\r\n System.exit(0);\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n LOGGER.error(\"execution.error:\" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "public abstract int execute();", "private void runScript(String script) throws IOException, InterruptedException, RootToolsException, TimeoutException {\r\n\r\n// File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n//\r\n// File f = new File(tmpFolder, TEMP_SCRIPT);\r\n// f.setExecutable(true);\r\n// f.deleteOnExit();\r\n//\r\n// // Write the script to be executed\r\n// PrintWriter out = new PrintWriter(new FileOutputStream(f));\r\n// if (new File(\"/system/bin/sh\").exists()) {\r\n// out.write(\"#!/system/bin/sh\\n\");\r\n// }\r\n// out.write(script);\r\n// if (!script.endsWith(\"\\n\")) {\r\n// out.write(\"\\n\");\r\n// }\r\n// out.write(\"exit\\n\");\r\n// out.flush();\r\n// out.close();\r\n\r\n Log.d(this.getClass().getSimpleName(), \"Requesting file execution\");\r\n// Process exec = Runtime.getRuntime().exec(\"su -c \" + f.getAbsolutePath());\r\n// int res = exec.waitFor();\r\n// Toast.makeText(ctx, \"result: \" + res, Toast.LENGTH_LONG).show();\r\n \r\n// if (res != 0) {\r\n// ExceptionHandler.handle(this, R.string.error_script_loading, ctx);\r\n// }\r\n \r\n\r\n if (RootTools.isAccessGiven()) {\r\n List<String> output = RootTools.sendShell(script, SCRIPT_MAX_TIMEOUT);\r\n Log.d(\"\" + this, \"\" + output);\r\n }\r\n }", "CommandResult execute(String commandText) throws Exception;", "public abstract void execute();", "public abstract void execute();", "public abstract void execute();", "private void runScriptShell(Interpreter interpreter, String filePath) {\r\n\r\n\t\tint lineNumber = 1;\r\n\r\n\t\tFile file = new File(filePath);\r\n\r\n\t\tSet<String> errorMessages = new HashSet<String>();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tthis.statementScanner = new Scanner(file);\r\n\r\n\t\t\tthis.statementScanner.useDelimiter(\"(?<!\\\\\\\\);\");\r\n\r\n\t\t\twhile (this.statementScanner.hasNext()) {\r\n\r\n\t\t\t\tthis.input = this.statementScanner.next();\r\n\r\n\t\t\t\tthis.statement.parseStatement(this.input);\r\n\r\n\t\t\t\terrorMessages = statement.getErrorMessages();\r\n\r\n\t\t\t\tif (errorMessages.size() > 0) {\r\n\t\t\t\t\tSystem.out.println(\" Error on line number \" + lineNumber + \": \");\r\n\t\t\t\t\tfor (String errorMessage : errorMessages) {\r\n\r\n\t\t\t\t\t\tSystem.out.println(\" \" + errorMessage);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tinterpreter.processStatement(this.statement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlineNumber++;\r\n\t\t\t}\r\n\r\n\t\t\tstatementScanner.close();\r\n\t\t\t/*\r\n\t\t\t * For script input, the file is written to and saved after the script's\r\n\t\t\t * execution is complete.\r\n\t\t\t */\r\n\t\t\tinterpreter.getDisk().writeDataMapToDisk(interpreter.getMemory().getDataMap());\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\tSystem.out.println(\"Could not access the script file: \" + filePath + \"...no changes were made.\");\r\n\t\t}\r\n\r\n\t}", "public void runScriptFile(String scriptUrl, boolean mainScript, Hashtable vars) throws Throwable {\n testResults = new Vector();\n testKeys = new Hashtable();\n \n if (vars != null) {\n definedVars = vars;\n } else {\n // Set predefined variables\n definedVars = new Hashtable();\n }\n \n // Add more variables (platform independent)\n if (devInfo.getDeviceRole() == DeviceInfo.DeviceRole.TABLET) {\n definedVars.put(\"devicetype\", \"table\");\n } else {\n definedVars.put(\"devicetype\", \"phone\");\n }\n \n long startTime = System.currentTimeMillis();\n try {\n runScriptFileI(scriptUrl, mainScript);\n } finally {\n long endTime = System.currentTimeMillis();\n dumpResults(startTime, endTime);\n }\n }", "protected void executeSQLScript(SQLiteDatabase database, String assetName) {\n /*\n * variables locales para manejar la lectura del archivo de scripts\n */\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n byte buf[] = new byte[1024];\n int len;\n AssetManager assetManager = context.getAssets();\n InputStream inputStream = null;\n\n try {\n /*\n * obtenemos el asset y lo convertimos a string\n */\n inputStream = assetManager.open(assetName);\n while ((len = inputStream.read(buf)) != -1) {\n outputStream.write(buf, 0, len);\n }\n outputStream.close();\n inputStream.close();\n\n /*\n * desencriptamos el archivo\n */\n String sqlClear = Cypher.decrypt(SD, outputStream.toString());\n // String sqlClear = outputStream.toString();\n\n /*\n * separamos la cadena por el separador de sentencias\n */\n String[] createScript = sqlClear.split(\";\");\n\n /*\n * por cada sentencia del archivo ejecutamos la misma en la base de\n * datos\n */\n for (int i = 0; i < createScript.length; i++) {\n String sqlStatement = createScript[i].trim();\n\n if (sqlStatement.startsWith(\"--\")) {\n continue;\n }\n\n if (sqlStatement.length() > 0) {\n Log.i(CsTigoApplication.getContext().getString(\n CSTigoLogTags.DATABASE.getValue()),\n CsTigoApplication.getContext().getString(\n R.string.database_exec_sql)\n + sqlStatement);\n\n try {\n database.execSQL(sqlStatement + \";\");\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }\n }\n\n } catch (IOException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_read_asset)\n + e.getMessage());\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }", "public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }", "abstract protected void execute();", "public static String pickQueryFromResources(String migrateVersion) throws SQLException, APIManagementException, IOException {\n String databaseType = getDatabaseDriverName();\n String queryTobeExecuted = null;\n String resourcePath;\n\n if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_9)) {\n //pick from 18to19Migration/sql-scripts\n resourcePath = \"/18to19Migration/sql-scripts/\";\n\n } else if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_8)) {\n //pick from 17to18Migration/sql-scripts\n resourcePath = \"/17to18Migration/sql-scripts/\";\n } else if (migrateVersion.equalsIgnoreCase(Constants.VERSION_1_7)) {\n //pick from 16to17Migration/sql-scripts\n resourcePath = \"/16to17Migration/sql-scripts/\";\n } else {\n throw new APIManagementException(\"No query picked up for the given migrate version. Please check the migrate version.\");\n }\n\n if (!resourcePath.equals(\"\")) {\n InputStream inputStream;\n try {\n if (databaseType.equalsIgnoreCase(\"MYSQL\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"mysql.sql\");\n } else if (databaseType.equalsIgnoreCase(\"MSSQL\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"mssql.sql\");\n } else if (databaseType.equalsIgnoreCase(\"H2\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"h2.sql\");\n } else if (databaseType.equalsIgnoreCase(\"ORACLE\")) {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"oracle.sql\");\n } else {\n inputStream = ResourceUtil.class.getResourceAsStream(resourcePath + \"postgresql.sql\");\n }\n\n queryTobeExecuted = IOUtils.toString(inputStream);\n\n } catch (IOException e) {\n throw new IOException(\"Error occurred while accessing the sql from resources. \" + e);\n }\n }\n return queryTobeExecuted;\n }", "default Value eval(String script) throws Exception {\n return eval(script, false);\n }", "static void executeShellScript(String scriptName, String value1, String value2,\n File workDirectory) throws IOSException {\n try {\n File tempFile = createTempFile(scriptName);\n\n if (value1 == null) {\n value1 = \"\";\n }\n\n if (value2 == null) {\n value2 = \"\";\n }\n\n ProcessBuilder processBuilder = new ProcessBuilder(\"sh\", tempFile.getAbsoluteFile().toString(), value1,\n value2);\n\n processBuilder.directory(workDirectory);\n CommandHelper.performCommand(processBuilder);\n } catch (IOException e) {\n e.printStackTrace();\n throw new IOSException(e);\n }\n }", "public Object processScriptResult(Object result) throws ScriptException;", "default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }", "protected abstract void parseExecResult(BufferedReader lines) throws IOException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "Object eval(String script, int keyCount, String... params);", "@Override\r\n public void execute(SocketChannel channel) {\r\n File file;\r\n file = new File(fileName);\r\n if (!file.canRead()) {\r\n System.err.println(\"Cant read file \" + fileName + \".\\nScript execution failed.\");\r\n return;\r\n }\r\n try (Scanner fin = new Scanner(file)) {\r\n String str;\r\n Command command;\r\n while (fin.hasNextLine()) {\r\n str = fin.nextLine();\r\n command = parser.parse(str);\r\n if (command != null && !command.getClass().toString().contains(\"ExecuteScriptCommand\")) {\r\n command.execute(channel);\r\n } else if (command != null && command.getClass().toString().contains(\"ExecuteScriptCommand\")) {\r\n String executeFileName = ((ExecuteScriptCommand) command).getFileName();\r\n if (this.parser.getExecutedFiles().contains(executeFileName)) {\r\n System.err.println(\"recursive execute_script_command is unavaliable, \" + executeFileName + \" file was already called.\");\r\n } else {\r\n this.parser.getExecutedFiles().add(fileName);\r\n command.execute(channel);\r\n }\r\n } else {\r\n System.err.println(String.format(\"No such command: %s\", str));\r\n }\r\n\r\n }\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"No such file \" + fileName + \".\\nScript execution failed.\");\r\n } catch (Exception ex) {\r\n System.err.println(ex.getMessage());\r\n System.err.println(\"Script failed\");\r\n }\r\n }", "public ResultSet executeQuery(String sql) throws Exception {\n\n\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t// stmt.close();\n\t\treturn rs;\n\t}", "protected String doExecute() throws SystemException \n\t{\n\t\tDatabase db = CastorDatabaseService.getDatabase();\n\t\t\n\t\ttry \n\t\t{\n\t\t\t//now restore the value and list what we get\n\t\t\tFile file = FileUploadHelper.getUploadedFile(ActionContext.getContext().getMultiPartRequest());\n\t\t\tif(file == null || !file.exists())\n\t\t\t{\n\t\t\t\tString filePath = ActionContext.getContext().getMultiPartRequest().getParameter(\"filePath\");\n\t\t\t\tlogger.info(\"filePath:\" + filePath);\n\t\t\t\tif(filePath != null)\n\t\t\t\t{\n\t\t\t\t\tfile = new File(filePath);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthrow new SystemException(\"The file upload must have gone bad as no file reached the import utility.\");\n\t\t\t}\n\t\t\t\n\t\t\tif(file.getName().endsWith(\".zip\"))\n\t\t\t\treturn importV3(file);\n\t\t\t\n\t\t\tString encoding = \"UTF-8\";\n\t\t\tint version = 1;\n\t\t\t\n\t\t\t//Looking up what kind of dialect this is.\n\t \n\t\t\tFileInputStream fisTemp = new FileInputStream(file);\n InputStreamReader readerTemp = new InputStreamReader(fisTemp, encoding);\n BufferedReader bufferedReaderTemp = new BufferedReader(readerTemp);\n String line = bufferedReaderTemp.readLine();\n int index = 0;\n while(line != null && index < 50)\n {\n \tlogger.info(\"line:\" + line + '\\n');\n \tif(line.indexOf(\"contentTypeDefinitionId\") > -1)\n \t{\n \t\tlogger.info(\"This was a new export...\");\n \t\tversion = 2;\n \t\tbreak;\n \t}\n \tline = bufferedReaderTemp.readLine();\n \tindex++;\n }\n \n bufferedReaderTemp.close();\n readerTemp.close();\n fisTemp.close();\n\n Mapping map = new Mapping();\n\t\t\tif(version == 1)\n\t\t\t{\n\t logger.info(\"MappingFile:\" + CastorDatabaseService.class.getResource(\"/xml_mapping_site.xml\").toString());\n\t\t\t\tmap.loadMapping(CastorDatabaseService.class.getResource(\"/xml_mapping_site.xml\").toString());\n\t\t\t}\n\t\t\telse if(version == 2)\n\t\t\t{\n\t\t\t logger.info(\"MappingFile:\" + CastorDatabaseService.class.getResource(\"/xml_mapping_site_2.5.xml\").toString());\n\t\t\t map.loadMapping(CastorDatabaseService.class.getResource(\"/xml_mapping_site_2.5.xml\").toString());\t\n\t\t\t}\n\n\t\t\t// All ODMG database access requires a transaction\n\t\t\tdb.begin();\n\t\t\t\n\t\t\tMap contentIdMap = new HashMap();\n\t\t\tMap siteNodeIdMap = new HashMap();\n\t\t\tList allContentIds = new ArrayList();\n\n\t\t\tMap<String,String> replaceMap = new HashMap<String,String>();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tboolean isUTF8 = false;\n\t\t\t\tboolean hasUnicodeChars = false;\n\t\t\t\tif(replacements.indexOf((char)65533) > -1)\n\t\t\t\t\tisUTF8 = true;\n\t\t\t\t\n\t\t\t\tfor(int i=0; i<replacements.length(); i++)\n\t\t\t\t{\n\t\t\t\t\tint c = (int)replacements.charAt(i);\n\t\t\t\t\tif(c > 255 && c < 65533)\n\t\t\t\t\t\thasUnicodeChars = true;\n\t\t\t\t}\n\n\t\t\t\tif(!isUTF8 && !hasUnicodeChars)\n\t\t\t\t{\n\t\t\t\t\tString fromEncoding = CmsPropertyHandler.getUploadFromEncoding();\n\t\t\t\t\tif(fromEncoding == null)\n\t\t\t\t\t\tfromEncoding = \"iso-8859-1\";\n\t\t\t\t\t\n\t\t\t\t\tString toEncoding = CmsPropertyHandler.getUploadToEncoding();\n\t\t\t\t\tif(toEncoding == null)\n\t\t\t\t\t\ttoEncoding = \"utf-8\";\n\t\t\t\t\t\n\t\t\t\t\tif(replacements.indexOf(\"å\") == -1 && \n\t\t\t\t\t replacements.indexOf(\"ä\") == -1 && \n\t\t\t\t\t replacements.indexOf(\"ö\") == -1 && \n\t\t\t\t\t replacements.indexOf(\"Å\") == -1 && \n\t\t\t\t\t replacements.indexOf(\"Ä\") == -1 && \n\t\t\t\t\t replacements.indexOf(\"Ö\") == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\treplacements = new String(replacements.getBytes(fromEncoding), toEncoding);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tProperties properties = new Properties();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tproperties.load(new ByteArrayInputStream(replacements.getBytes(\"ISO-8859-1\")));\n\t\t\t\t\n\t\t\t\tIterator propertySetIterator = properties.keySet().iterator();\n\t\t\t\twhile(propertySetIterator.hasNext())\n\t\t\t\t{\n\t\t\t\t\tString key = (String)propertySetIterator.next();\n\t\t\t\t\tString value = properties.getProperty(key);\n\t\t\t\t\treplaceMap.put(key, value);\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t logger.error(\"Error loading properties from string. Reason:\" + e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tImportController.getController().importRepository(db, map, file, encoding, version, onlyLatestVersions, false, contentIdMap, siteNodeIdMap, allContentIds, replaceMap, mergeExistingRepositories);\n\t\t\t\n\t\t\tdb.commit();\n\t\t\tdb.close();\n\t\t\t\n\t\t\tIterator allContentIdsIterator = allContentIds.iterator();\n\t\t\twhile(allContentIdsIterator.hasNext())\n\t\t\t{\n\t\t\t\tInteger contentId = (Integer)allContentIdsIterator.next();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tdb = CastorDatabaseService.getDatabase();\n\t\t\t\t\tdb.begin();\n\t\n\t\t\t\t\tContent content = ContentController.getContentController().getContentWithId(contentId, db);\n\t\t\t\t\tImportController.getController().updateContentVersions(content, contentIdMap, siteNodeIdMap, onlyLatestVersions, new HashMap());\n\t\t\t\t\t//updateContentVersions(content, contentIdMap, siteNodeIdMap);\n\t\n\t\t\t\t\tdb.commit();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tdb.rollback();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e2) { e2.printStackTrace(); }\n\t logger.error(\"An error occurred when updating content version for content: \" + e.getMessage(), e);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tdb.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\tcatch ( Exception e) \n\t\t{\n\t\t\ttry\n {\n db.rollback();\n db.close();\n } \n\t\t\tcatch (Exception e1)\n {\n logger.error(\"An error occurred when importing a repository: \" + e.getMessage(), e);\n \t\t\tthrow new SystemException(\"An error occurred when importing a repository: \" + e.getMessage(), e);\n }\n\t\t\t\n\t\t\tlogger.error(\"An error occurred when importing a repository: \" + e.getMessage(), e);\n\t\t\tthrow new SystemException(\"An error occurred when importing a repository: \" + e.getMessage(), e);\n\t\t}\n\t\t\n\t\treturn \"success\";\n\t}", "protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }", "public abstract ExecuteResult<T> execute() throws SQLException;", "public void runScript(StringBuffer sqlScript)\n throws DataAccessLayerException {\n runScript(sqlScript.toString());\n }", "private int executeScript() throws ServerException {\r\n\t\tCGIOutputStreamReader cin = new CGIHandler().sendScript( request );\r\n\t\tBufferedOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tint headerStringLen = cin.getHeaderStringSize();\r\n\t\t\tbyte[] content = cin.readBodyContent();\r\n\t\t\tint contentLength = content.length - headerStringLen;\r\n\t\t\tString headerMessage = createBasicHeaderMessage( ResponseTable.OK ).buildContentLength(\r\n\t\t\t\t\tcontentLength ).toString();\r\n\r\n\t\t\tout = new BufferedOutputStream( outStream );\r\n\t\t\tout.write( headerMessage.getBytes( \"UTF-8\" ) );\r\n\t\t\tout.write( content );\r\n\t\t\tout.flush();\r\n\t\t\treturn ResponseTable.OK;\r\n\r\n\t\t} catch ( IOException ioe ) {\r\n\t\t\tioe.printStackTrace();\r\n\t\t\tthrow new ServerException( ResponseTable.INTERNAL_SERVER_ERROR );\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tcin.close();\r\n\t\t\t} catch ( Exception ioe ) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void executeQuery(String q) throws HiveQueryExecutionException;", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "protected void execute() {}", "public Float consultarScript(Indicador indicador){\n Connection con = ConexaoCliente.getConexao();\n Float resultadoConsulta=null;\n try {\n Statement statement = con.createStatement();\n //Executa o Script do Indicador\n ResultSet result = statement.executeQuery(indicador.getScript());\n\n while(result.next()){\n // CONFIGURAR PARÂMETRO CONFORME O SCRIPT ******\n resultadoConsulta=result.getFloat(1);\n }\n\n statement.close();\n\n } catch (SQLException ex) {\n Logger.getLogger(IndicadorDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"IndicadorDao.consultarScript. \\n\"+ex.toString());\n ex.printStackTrace();\n }finally{\n try{\n con.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n Logger.getLogger(IndicadorDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"IndicadorDao.consultarScript. fechar conexão\\n\"+ex.toString());\n }\n\n }\n\n Calendar calendar = new GregorianCalendar();\n Date data = new Date();\n calendar.setTime(data);\n \n try{\n Movimentacao mov = new Movimentacao();\n //Atribui valores para gravar na tabela [ tb_movimentacao ]\n mov.setDataMovimentacao(calendar.getTime());\n mov.setIdIndicador(mov.getIdIndicador());\n mov.setStatus(\"T\");\n mov.setValorRetorno(mov.getValorRetorno());\n\n MovimentacaoDao movDao = new MovimentacaoDao();\n movDao.gravarMovimentacao(mov);\n\n }catch(Exception e){\n e.printStackTrace();\n }\n \n return resultadoConsulta;\n }", "public static void main(String [] filenames) throws Exception {\n for(String filename : filenames) {\n Files.lines(Paths.get(filename)).forEach(LanguageModel::parseDocument);\n }\n\n // Read user queries\n Scanner input = new Scanner(System.in);\n while(true) {\n System.out.print(\"Enter a query (exit to quit): \");\n String query = input.nextLine();\n\n if(\"exit\".equals(query)) {\n break;\n } else {\n executeQuery(query);\n }\n }\n }", "Result execute(String sql) {\n\n Result result;\n String token;\n int cmd;\n\n JavaSystem.gc();\n\n result = null;\n cmd = Token.UNKNOWNTOKEN;\n\n try {\n tokenizer.reset(sql);\n\n while (true) {\n tokenizer.setPartMarker();\n session.setScripting(false);\n\n token = tokenizer.getSimpleToken();\n\n if (token.length() == 0) {\n session.endSchemaDefinition();\n\n break;\n }\n\n cmd = Token.get(token);\n\n if (cmd == Token.SEMICOLON) {\n session.endSchemaDefinition();\n\n continue;\n }\n\n result = executePart(cmd, token);\n\n if (result.isError()) {\n session.endSchemaDefinition();\n\n break;\n }\n\n if (session.getScripting()) {\n database.logger.writeToLog(session,\n tokenizer.getLastPart());\n }\n }\n } catch (Throwable t) {\n try {\n if (session.isSchemaDefintion()) {\n HsqlName schemaName = session.getSchemaHsqlName(null);\n\n database.schemaManager.dropSchema(schemaName.name, true);\n database.logger.writeToLog(session,\n Token.T_DROP + ' '\n + Token.T_SCHEMA + ' '\n + schemaName.statementName\n + ' ' + Token.T_CASCADE);\n database.logger.synchLog();\n session.endSchemaDefinition();\n }\n } catch (HsqlException e) {}\n\n result = new Result(t, tokenizer.getLastPart());\n }\n\n return result == null ? Session.emptyUpdateCount\n : result;\n }", "public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }", "public ResultSet execute(String query)\n\t{\n\t\tResultSet resultSet = null;\n\t\ttry {\n\t\tStatement statement = this.connection.createStatement();\n\t\tresultSet = statement.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error while executing query.\" +e.getMessage());\n\t\t}\n\t\treturn resultSet;\n\t}", "public void doRunScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\t// set default selection\n \t\treq.setAttribute(\"currentNode\", \"(master)\");\n \t\treq.getView(this, \"runscript.jelly\").forward(req, rsp);\n \t}", "public void execute() {\n\t\t\n\t}", "protected abstract void execute() throws Exception;", "public void execfile(String filename) {\n }", "public DataModel execute(File file) {\n\t\tGlobalEnv env = new GlobalEnv();\n\t\tFileNode fileNode = new FileNode(file);\n\n\t\tfileNode.execute(env); // TODO Consider the returned CONTROL value?\n\t\tenv.finishExecution();\n\t\t\n\t\tDataNode output = env.getCurrentOutput();\n\t\treturn new DataModel(output);\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "public void execute() {\r\n\t\r\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\t\n\t\treturn super.execute();\n\t}", "private static void\r\n interactiveJsh(List<Class<?>> thrownExceptions, List<String> defaultImports, @Nullable String optionalEncoding)\r\n throws IOException {\n StatementEvaluator se = new StatementEvaluator();\r\n\r\n se.setDefaultImports(defaultImports.toArray(new String[defaultImports.size()]));\r\n\r\n System.err.println(\"Welcome, stranger, and speak!\");\r\n\r\n for (;;) {\r\n\r\n System.err.print(\"> \");\r\n System.err.flush();\r\n\r\n // Scan, parse, compile and load one statement.\r\n try {\r\n se.cook(\"stdin\", System.in, optionalEncoding);\r\n } catch (CompileException ce) {\r\n System.err.println(ce.getLocalizedMessage());\r\n continue;\r\n }\r\n\r\n // Evaluate script with actual parameter values.\r\n try {\r\n se.execute();\r\n } catch (Exception e) {\r\n System.out.flush();\r\n System.err.println(e.getLocalizedMessage());\r\n continue;\r\n }\r\n\r\n System.out.flush();\r\n }\r\n }", "public String executeDBQuery(TestStepRunner testStepRunner,\n\t\t\tString returnVariable, String parameterList) throws AFTException {\n\n\t\tString connIdentifier, sqlQuery, dbInstanceIdentifier = null;\n\t\tString returnValue = null;\n\n\t\tLOGGER.trace(\"Executing [executeDBQuery] for sql query [\"\n\t\t\t\t+ parameterList + \"]\");\n\n\t\t// if user has not passed any parameter\n\t\tif (parameterList == null\n\t\t\t\t|| (parameterList != null && parameterList.isEmpty())) {\n\t\t\terrorMessage = \"No sql query passed. \"\n\t\t\t\t\t+ \"Please refer to wiki on how to use [executeDBQuery]\";\n\t\t\tLOGGER.error(errorMessage);\n\t\t\tthrow new AFTException(errorMessage);\n\t\t}\n\n\t\tboolean selectQuery = false;\n\n\t\tString[] paramArray = parameterList\n\t\t\t\t.split(Constants.DBFIXTUREPARAMDELIMITER);\n\n\t\t// if user has not passed an identifier\n\t\tif (paramArray.length < 2) {\n\t\t\tLOGGER.info(\"No connection identifier passed. \"\n\t\t\t\t\t+ \"Getting connection from AFT_LastDBConnection\");\n\n\t\t\tconnIdentifier = Variable.getInstance().generateSysVarName(\n\t\t\t\t\tSystemVariables.AFT_LASTDBCONNECTION);\n\n\t\t\tsqlQuery = paramArray[0];\n\n\t\t} else {\n\t\t\tconnIdentifier = paramArray[0].trim();\n\n\t\t\tsqlQuery = paramArray[1];\n\t\t}\n\n\t\t// check if it is select or update query type\n\t\tif (sqlQuery.trim().toLowerCase().startsWith(\"select\")) {\n\t\t\tselectQuery = true;\n\t\t}\n\n\t\t// get the actual value if using AFT_LastDBConnection\n\t\tdbInstanceIdentifier = Helper.getInstance().getActionValue(\n\t\t\t\ttestStepRunner.getTestSuiteRunner(), connIdentifier);\n\n\t\t// if identifier does not exists\n\t\tif (dbInstanceIdentifier == null\n\t\t\t\t|| dbInstanceIdentifier.isEmpty()\n\t\t\t\t|| !DatabaseInstanceManager.getInstance()\n\t\t\t\t\t\t.checkDBInstanceExists(dbInstanceIdentifier)) {\n\t\t\terrorMessage = \"No open DB connection is available\";\n\t\t\t// log the error message and throw the exception.\n\t\t\tlogException(testStepRunner);\n\t\t}\n\n\t\t// get the database instance\n\t\tDatabaseInstance dbInstance = DatabaseInstanceManager.getInstance()\n\t\t\t\t.getDBInstance(dbInstanceIdentifier);\n\t\t// String[] id = DatabaseInstanceManager.getInstance()\n\t\t// .getDBInstanceParameters(dbInstanceIdentifier);\n\t\tStatement objStatement = null;\n\t\tResultSet objResultSet = null;\n\t\tString updateQueryResult = null;\n\t\tint rowCount = 0;\n\t\tString[][] arrayResults = null;\n\t\tString printMsg = null;\n\n\t\ttry {\n\n\t\t\tif (dbInstance.getConnectionObject().isClosed()) {\n\t\t\t\terrorMessage = \"Cannot execute the query as DB connection is closed. \"\n\t\t\t\t\t\t+ \"Please open a new connection and execute the query\";\n\t\t\t\tLOGGER.info(\"No open DB connection is available\");\n\t\t\t\t// log the error message and throw the exception.\n\t\t\t\tlogException(testStepRunner);\n\n\t\t\t}\n\t\t\tLOGGER.info(\"Executing the query [\" + sqlQuery\n\t\t\t\t\t+ \"] with Connection [\" + dbInstanceIdentifier + \"]\");\n\t\t\tobjStatement = dbInstance.getConnectionObject().createStatement(\n\t\t\t\t\tResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY);\n\t\t\twhile (dbInstanceIdentifier != null) {\n\t\t\t\ttry {\n\t\t\t\t\tif (selectQuery) {\n\t\t\t\t\t\tobjResultSet = objStatement.executeQuery(sqlQuery);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trowCount = objStatement.executeUpdate(sqlQuery);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLSyntaxErrorException se) {\n\t\t\t\t\tLOGGER.error(\"Sql Syntax Exception::\", se);\n\t\t\t\t\tthrow new AFTException(se);\n\t\t\t\t} catch (SQLWarning sw) {\n\t\t\t\t\tLOGGER.error(\"SQL Warning Exception::\", sw);\n\t\t\t\t\tthrow new AFTException(sw);\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\tLOGGER.error(\"SQL Exception::\", s);\n\t\t\t\t\tLOGGER.info(\"Network Connection has been lost...\");\n\t\t\t\t\tint counter = testStepRunner.getTestSuiteRunner()\n\t\t\t\t\t\t\t.getDbConnCounter();\n\t\t\t\t\tif (counter == 0) {\n\t\t\t\t\t\tdbInstanceIdentifier = retryDbConnection(testStepRunner);\n\t\t\t\t\t\t// get the database instance\n\t\t\t\t\t\tdbInstance = DatabaseInstanceManager.getInstance()\n\t\t\t\t\t\t\t\t.getDBInstance(dbInstanceIdentifier);\n\t\t\t\t\t\tobjStatement = dbInstance.getConnectionObject()\n\t\t\t\t\t\t\t\t.createStatement(\n\t\t\t\t\t\t\t\t\t\tResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\t\t\t\tResultSet.CONCUR_READ_ONLY);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOGGER.error(\"Exception::\", e);\n\t\t\t\t\tthrow new AFTException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tLOGGER.info(\"Query [\" + sqlQuery\n\t\t\t\t\t+ \"] has been executed successfully\");\n\n\t\t\tif ((selectQuery)\n\t\t\t\t\t&& (objResultSet == null || !objResultSet.isBeforeFirst())) {\n\t\t\t\terrorMessage = \"Empty result set returned by query [\"\n\t\t\t\t\t\t+ sqlQuery\n\t\t\t\t\t\t+ \"]. Please check the query and execute again\";\n\t\t\t\tLOGGER.error(errorMessage);\n\t\t\t\tthrow new AFTException(errorMessage);\n\t\t\t}\n\n\t\t\tif (selectQuery) {\n\t\t\t\tarrayResults = convertResultSetToArray(objResultSet);\n\t\t\t\t// store the number of records retrieved\n\t\t\t\treturnValue = String.valueOf(resultsetRowCount);\n\t\t\t\tprintMsg = \"number of rows retrieved\";\n\n\t\t\t} else {\n\t\t\t\tupdateQueryResult = Integer.toString(rowCount);\n\t\t\t\t// store the number of records updated\n\t\t\t\treturnValue = updateQueryResult;\n\t\t\t\tprintMsg = \"number of records modified\";\n\t\t\t}\n\n\t\t} catch (DataTruncation d) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.warn(\"Data Truncation Exception::\", d);\n\t\t\tthrow new AFTException(d);\n\t\t} catch (SQLWarning sw) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.warn(\"Sql Warnings Exception::\", sw);\n\t\t\tthrow new AFTException(sw);\n\t\t} catch (SQLException s) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.error(\"SQL Exception::\", s);\n\t\t\tthrow new AFTException(s);\n\t\t} catch (Exception e) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.error(\"Exception::\", e);\n\t\t\tthrow new AFTException(e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (objResultSet != null) {\n\t\t\t\t\tobjResultSet.close();\n\t\t\t\t}\n\t\t\t\tif (objStatement != null) {\n\t\t\t\t\tobjStatement.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// set onDbErrorValue\n\t\t\t\tsetOnDbErrorValue(testStepRunner);\n\t\t\t\tLOGGER.warn(\"Exception while closing statement and resultset objects\");\n\t\t\t\tthrow new AFTException(e);\n\t\t\t}\n\t\t}\n\n\t\t// if user has provided returnVariable\n\t\tif (returnVariable != null && !returnVariable.isEmpty()\n\t\t\t\t&& !returnVariable.equalsIgnoreCase(\"novalue\")) {\n\t\t\tif (selectQuery) {\n\t\t\t\tLOGGER.info(\"Storing query result[array] in user passed return variable [\"\n\t\t\t\t\t\t+ returnVariable + \"]\");\n\t\t\t\tVariable.getInstance().setArrayVariableValue(\n\t\t\t\t\t\ttestStepRunner.getTestSuiteRunner(),\n\t\t\t\t\t\tConstants.DBARRAYTYPE, returnVariable, arrayResults);\n\t\t\t} else {\n\t\t\t\tLOGGER.info(\"Storing \" + printMsg + \" [\" + returnValue\n\t\t\t\t\t\t+ \"] in user passed return variable [\" + returnVariable\n\t\t\t\t\t\t+ \"]\");\n\t\t\t\tVariable.getInstance().setVariableValue(\n\t\t\t\t\t\ttestStepRunner.getTestSuiteRunner(), \"executeDBQuery\",\n\t\t\t\t\t\treturnVariable, false, updateQueryResult);\n\t\t\t}\n\t\t} else {\n\t\t\tLOGGER.info(\"No return variable passed by user.\");\n\t\t}\n\n\t\t// store the result in AFT_LastDBResult by default\n\t\tLOGGER.info(\"Storing \" + printMsg + \" [\" + returnValue\n\t\t\t\t+ \"] in system variable [AFT_LastDBResult] by default\");\n\t\tVariable.getInstance().setVariableValue(\n\t\t\t\tVariable.getInstance().generateSysVarName(\n\t\t\t\t\t\tSystemVariables.AFT_LASTDBRESULT), true, returnValue);\n\n\t\treturn returnValue;\n\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void execute()\n {\n // Display the dialog and wait for the close action (the user\n // selects the Okay button or the script execution completes\n // and a Cancel button is issued)\n int option = cancelDialog.showMessageDialog(dialog,\n \"<html><b>Script execution in progress...<br><br>\"\n + CcddUtilities.colorHTMLText(\"*** Press </i>Halt<i> \"\n + \"to terminate script execution ***\",\n Color.RED),\n \"Script Executing\",\n JOptionPane.ERROR_MESSAGE,\n DialogOption.HALT_OPTION);\n\n // Check if the script execution was terminated by the user and\n // that the script is still executing\n if (option == OK_BUTTON && scriptThread.isAlive())\n {\n // Forcibly stop script execution. Note: this method is\n // deprecated due to inherent issues that can occur when a\n // thread is abruptly stopped. However, the stop method is\n // the only manner in which the script can be terminated\n // (without additional code within the script itself, which\n // cannot be assumed since the scripts are user-generated).\n // There shouldn't be a potential for object corruption in\n // the application since it doesn't reference any objects\n // created by a script\n scriptThread.stop();\n\n // Set the execution status(es) to indicate the scripts\n // didn't complete\n isBad = new boolean[associations.size()];\n Arrays.fill(isBad, true);\n }\n }", "public void executeDsl();", "ExecutionResult<Void> execute();", "public Object execute(String commandName, Map<String, ?> parameters) {\n Response response;\n\n if (parameters == null || parameters.isEmpty()) {\n response = driver.execute(commandName, ImmutableMap.of());\n } else {\n response = driver.execute(commandName, parameters);\n }\n\n return response.getValue();\n }", "public StatRes execut() {\n\t\tif (res.getFileName().endsWith(\".xml\") || res.getFileName().endsWith(\".mxml\")) {\n\t\t\tparseLog2();\n\t\t\tres.calcStat();\n\t\t}\n\t\treturn res;\n\t}", "public void exec();", "protected void execSQL(String sql) throws Exception {\n\t\tPreparedStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tPersistenceUtils.closeStatement(statement);\n\t\t}\n\n\t}", "public void execute(){\n\t\t\n\t}", "abstract protected String getResultFileName();", "@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}", "abstract void exec();", "public ProcessRest startProcess(Context context, String scriptName, List<MultipartFile> files) throws SQLException,\n IOException, AuthorizeException, IllegalAccessException, InstantiationException {\n String properties = requestService.getCurrentRequest().getServletRequest().getParameter(\"properties\");\n List<DSpaceCommandLineParameter> dSpaceCommandLineParameters =\n processPropertiesToDSpaceCommandLineParameters(properties);\n ScriptConfiguration scriptToExecute = scriptService.getScriptConfiguration(scriptName);\n if (scriptToExecute == null) {\n throw new DSpaceBadRequestException(\"The script for name: \" + scriptName + \" wasn't found\");\n }\n if (!scriptToExecute.isAllowedToExecute(context)) {\n throw new AuthorizeException(\"Current user is not eligible to execute script with name: \" + scriptName);\n }\n EPerson user = context.getCurrentUser();\n RestDSpaceRunnableHandler restDSpaceRunnableHandler = new RestDSpaceRunnableHandler(user,\n scriptToExecute.getName(), dSpaceCommandLineParameters, context.getSpecialGroups(),\n context.getCurrentLocale());\n List<String> args = constructArgs(dSpaceCommandLineParameters);\n runDSpaceScript(files, context, user, scriptToExecute, restDSpaceRunnableHandler, args);\n return converter.toRest(restDSpaceRunnableHandler.getProcess(context), utils.obtainProjection());\n }", "public void execute() {\n execute0();\n }" ]
[ "0.5861774", "0.5777596", "0.5543217", "0.5485425", "0.54599714", "0.54148763", "0.5405965", "0.53908426", "0.53657246", "0.5361534", "0.53075457", "0.5256155", "0.5197114", "0.5175415", "0.5175415", "0.5175415", "0.5175415", "0.5175415", "0.5175415", "0.5175415", "0.5166928", "0.51491946", "0.5138955", "0.5135167", "0.51229304", "0.5121952", "0.5119656", "0.511819", "0.50950074", "0.5092762", "0.5060291", "0.5056685", "0.50462717", "0.50462717", "0.50462717", "0.50462717", "0.5024614", "0.50239503", "0.49928206", "0.49615613", "0.49485737", "0.49471542", "0.49309936", "0.49309936", "0.49309936", "0.49236855", "0.4896967", "0.48881832", "0.48763317", "0.48655555", "0.48465616", "0.4833579", "0.4822201", "0.47922695", "0.47877634", "0.47840858", "0.47655958", "0.47655958", "0.47655958", "0.47380587", "0.47359425", "0.47320393", "0.47221214", "0.47161227", "0.4710246", "0.47017708", "0.46765736", "0.46757725", "0.46709982", "0.46702215", "0.4662885", "0.46622753", "0.46278724", "0.45943645", "0.459191", "0.45848444", "0.45805964", "0.45756382", "0.45740876", "0.45732173", "0.45647547", "0.45647547", "0.45647547", "0.45646313", "0.45641026", "0.45607704", "0.45546457", "0.45489568", "0.45480388", "0.4545253", "0.45426098", "0.4540422", "0.45392674", "0.45367053", "0.45354387", "0.4532957", "0.45324105", "0.45315439", "0.45114842", "0.451053" ]
0.53213245
10
Executes the given select query and fetches subset of result each has rows size of pageSize. This query will run only once in the server and the result rows are paginated. Caution: This execution is NOT equivalent to the db cursors, but this is a JDBC level pagination which makes easier for developers to iterate subset of results efficiently from code rather not loading all result rows into the application memory at once.
@SuppressWarnings("unchecked") @CompileStatic public Iterable<NyQLResult> paginate(String scriptName, int pageSize, Map<String, Object> data) throws NyException { QScript script = new QPagedScript(parse(scriptName, data), pageSize); try { return (Iterable<NyQLResult>) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script); } catch (Exception ex) { if (ex instanceof NyException) { throw (NyException) ex; } else { throw new NyScriptExecutionException("Ny script execution error!", ex); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<T> getAllByPaging(Integer size, Integer page) {\n PageHelper.startPage(page, size);\n return mapper.selectAll();\n }", "List<Commodity> selectAll(@Param(\"beginRow\") int beginRow,@Param(\"pageSize\") int pageSize);", "private void processResult(String sql, Consumer<ResultSet> resultSetConsumer, Predicate<Integer> selector, final int fetchSize, final int fetchDirn) throws SQLException {\n connectionCheck();\n blankStringCheck(sql, \"DB : Cannot execute blank SQL.\");\n try (PreparedStatement stmt = connection.prepareStatement(sql)) {\n stmt.setFetchSize(fetchSize);\n stmt.setFetchDirection(fetchDirn);\n ResultSet results = stmt.executeQuery();\n\n int count = 0;\n while (results.next() && selector.test(count)) {\n resultSetConsumer.accept(results);\n count++;\n }\n }\n }", "@Override\r\n\tpublic List<?> queryByPage(String hql, int offset, int pageSize) {\n\t\tTransaction tx = null;\r\n List<?> list = null;\r\n try{\r\n \tSession session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();\r\n tx = session.beginTransaction();\r\n Query query = session.createQuery(hql).setFirstResult(offset).setMaxResults(pageSize);\r\n list = query.list();\r\n tx.commit();\r\n return list;\r\n }catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}finally{\r\n\t\t\tif(tx!=null){\r\n\t\t\t\ttx=null;\r\n\t\t\t}\r\n\t\t\t//HibernateUtil.closeSession(session);\r\n\t\t}\r\n \r\n\t}", "@Options(fetchSize = Integer.MIN_VALUE)\n @Select(\"SELECT * FROM USERS\")\n Cursor<User> listUsersWithFetchSize();", "public ArrayList<Customer> getSubsetOfCustomers(int limit, int offset){\n ArrayList<Customer> customers = new ArrayList<>();\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer LIMIT ? , ?\");\n preparedStatement.setInt(1, offset);\n preparedStatement.setInt(2,limit);\n\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n customers.add(\n new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n ));\n\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customers;\n }", "@Override\n public List<Ares2ClusterDO> selectByQuery(Ares2ClusterQuery query, int size) {\n query.setPageNo(1);\n query.setPageSize(size);\n return this.selectByQuery(query);\n }", "@Override\n public ResultSet getResultsForAllPaged(String onyen, String assignment, String type, String course, String section, String year, String season, int page, int pageSize) throws SQLException {\n StringBuilder statement = new StringBuilder();\n int count = 0;\n statement.append(\"SELECT * FROM (\\n\");\n if (onyen != null && !onyen.isEmpty()) {\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE user_uid IN (SELECT uid FROM user WHERE onyen = ?))\");\n }\n if (assignment != null && !assignment.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE name = ?))\");\n }\n if (type != null && !type.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE assignment_type_id IN (SELECT id FROM assignment_type WHERE name = ?)))\");\n }\n if (course != null && !course.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE name = ?)))\");\n }\n if (section != null && !section.isEmpty()) {\n count++;\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE section = ?)))\");\n }\n if (year != null && !year.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE year = ?))))\");\n }\n if (season != null && !season.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE season = ?))))\");\n }\n if (count > 0) {\n statement.append(\")\\n AS result GROUP BY id HAVING count(*) = \").append(count);\n } else {\n statement.setLength(0);\n statement.append(\"SELECT * FROM result\");\n }\n statement.append(\"\\nORDER BY date DESC\");\n statement.append(\"\\nLIMIT \").append(pageSize);\n if(page > 0) {\n statement.append(\"\\nOFFSET \").append(page * pageSize);\n }\n statement.append(\";\");\n //System.out.println(statement.toString());\n PreparedStatement pstmt = connection.prepareStatement(statement.toString());\n int i = 1;\n if (onyen != null && !onyen.isEmpty()) {\n pstmt.setString(i++, onyen);\n }\n if (assignment != null && !assignment.isEmpty()) {\n pstmt.setString(i++, assignment);\n }\n if (type != null && !type.isEmpty()) {\n pstmt.setString(i++, type);\n }\n if (course != null && !course.isEmpty()) {\n pstmt.setString(i++, course);\n }\n if (section != null && !section.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(section));\n }\n if (year != null && !year.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(year));\n }\n if (season != null && !season.isEmpty()) {\n pstmt.setString(i, season);\n }\n //System.out.println(pstmt.toString());\n return pstmt.executeQuery();\n }", "@Override\n\tpublic List<Goods> selectPage(int page, int rows) {\n\t\tString sql=\"select g.g_id gid,g.gt_id gtid,g.g_name gname,g.g_date gdate,g.g_picture gpicture,g.g_price gprice,g.g_star gstar,g.g_info ginfo ,gt.gt_name gtname from goods g,goodstype gt where g.gt_id=gt.gt_id limit ?,?\";\n\t\treturn queryAll(sql,Goods.class,new Object[]{(page-1)*rows,rows});\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T extends BaseEntity> List<T> select(String hql, Object[] param, Integer page, Integer rows) {\n\n int start = 0;\n int limit = DEFAULT_LIMIT;\n\n if (rows != null && rows > 0) {\n limit = rows.intValue();\n }\n if (page != null && page > 0) {\n start = (page - 1) * limit;\n }\n\n Query q = this.getCurrentSession().createQuery(hql);\n if (param != null && param.length > 0) {\n for (int i = 0; i < param.length; i++) {\n q.setParameter(i, param[i]);\n }\n }\n return q.setFirstResult(start).setMaxResults(limit).list();\n }", "@Override\n\tpublic Map<String, Object> selectPage(String whereSql, int currentPage, int pageSize) throws Exception {\n\t\treturn null;\n\t}", "@NotNull\n List<Result> executeQueryWithRaisingLimits(LimitedQuery limitedQuery, int offset, Integer limit);", "public void setFetchSize(int rows) throws SQLException {\n\r\n }", "public Result sqlQueryByPage(String sql,Page page,Object... params);", "private void queryFlat(int columnCount, ResultTarget result, long limitRows) {\n if (limitRows > 0 && offsetExpr != null) {\r\n int offset = offsetExpr.getValue(session).getInt();\r\n if (offset > 0) {\r\n limitRows += offset;\r\n }\r\n }\r\n int rowNumber = 0;\r\n prepared.setCurrentRowNumber(0);\r\n int sampleSize = getSampleSizeValue(session);\r\n while (topTableFilter.next()) {\r\n prepared.setCurrentRowNumber(rowNumber + 1);\r\n if (condition == null ||\r\n Boolean.TRUE.equals(condition.getBooleanValue(session))) {\r\n Value[] row = new Value[columnCount];\r\n for (int i = 0; i < columnCount; i++) {\r\n Expression expr = expressions.get(i);\r\n row[i] = expr.getValue(session);\r\n }\r\n result.addRow(row);\r\n rowNumber++;\r\n if ((sort == null) && limitRows > 0 &&\r\n result.getRowCount() >= limitRows) {\r\n break;\r\n }\r\n if (sampleSize > 0 && rowNumber >= sampleSize) {\r\n break;\r\n }\r\n }\r\n }\r\n }", "List<RiceCooker> getPerPage(long startRow, long maxRows);", "@Override\r\n\tpublic PageInfo<User> selects(String username, Integer page, Integer pageSize) {\n\t\tPageMethod.startPage(page, pageSize);\r\n\t\tList<User> list = um.selects(username);\r\n\t\treturn new PageInfo<User>(list);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T extends BaseEntity> List<T> select(String hql, List<Object> param, Integer page, Integer rows) {\n\n int start = 0;\n int limit = DEFAULT_LIMIT;\n\n if (rows != null && rows > 0) {\n limit = rows.intValue();\n }\n if (page != null && page > 0) {\n start = (page - 1) * limit;\n }\n\n Query q = this.getCurrentSession().createQuery(hql);\n if (param != null && param.size() > 0) {\n for (int i = 0; i < param.size(); i++) {\n q.setParameter(i, param.get(i));\n }\n }\n return q.setFirstResult(start).setMaxResults(limit).list();\n }", "public static <T extends DBObject> Page<T> fetchPage(\n final QueryRunner qRunner,\n final String sqlCountRows,\n final String sqlFetchRows,\n int pageNo,\n int pageSize,\n final ResultSetHandler<List<T>> objectListHandler,\n final Object... params) throws DBException{\n try {\n\n // determine how many rows are available\n final int rowCount = ((Long) qRunner.query(sqlCountRows,\n new ScalarHandler(), params)).intValue();\n\n // calculate the number of pages\n int pageCount = rowCount / pageSize;\n if (rowCount > pageSize * pageCount || pageCount == 0) {\n pageCount++;\n }\n\n if (pageNo > pageCount)\n pageNo = pageCount;\n\n // create the page object\n final Page<T> page = new Page<T>();\n page.setPageNumber(pageNo);\n page.setPagesAvailable(pageCount);\n page.setPageSize(pageSize);\n page.setTotal(rowCount);\n\n // fetch a single page of results\n // Mysql sql\n final int startRow = (pageNo - 1) * pageSize;\n String mySqlFetch = sqlFetchRows + \" LIMIT \" + startRow + \" , \" + pageSize;\n\n List<T> objects = qRunner.query(\n mySqlFetch,\n objectListHandler, params);\n\n //page.getPageItems().addAll(objects);\n page.setPageItems(objects);\n return page;\n } catch (SQLException sqlEx) {\n sqlEx.printStackTrace();\n// return new Page<T>();\n throw new DBException(sqlEx.getMessage());\n }\n\n }", "private void processResult(String sql, Consumer<ResultSet> resultSetConsumer, final int maxCount, final int fetchSize, final int fetchDirn) throws SQLException {\n processResult(sql, resultSetConsumer, (x) -> x < maxCount, fetchSize, fetchDirn);\n }", "@Override\n\tpublic IDBResultSet selectByLimit(ITableDBContext context, Table table, IDBFilter filter, long startRow, int count)\n\t\t\tthrows Throwable {\n\t\tthrow new Warning(\"not impl\");\n\t}", "public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;", "@Override\n\tpublic List<FqcInspectionTemplateL> myselect(IRequest requestContext, FqcInspectionTemplateL dto, int page,\n\t\t\tint pageSize) {\n\t\tPageHelper.startPage(page, pageSize);\n\t\treturn fqcInspectionTemplateLMapper.myselect(dto);\n\t}", "public ResultSet fetchSelectAllParkLots() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_PARKLOT_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "@Override\n public PageResult<Ares2ClusterDO> selectByQueryWithPage(Ares2ClusterQuery query) {\n PageResult<Ares2ClusterDO> result = new PageResult<Ares2ClusterDO>();\n result.setPageSize(query.getPageSize());\n result.setPageNo(query.getPageNo());\n result.setTotalCount(this.countByQuery(query));\n result.setResult(this.selectByQuery(query));\n return result;\n }", "public ResultSet getResultSetFromGivenQuery(Connection connection, String selectQuery) throws SQLException {\n\t\t stmt = connection.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t resultSet = stmt.executeQuery (selectQuery); \n\n\t\treturn resultSet;\n\t}", "private void limitRows()\n {\n paginate(currentPage, getResultsPerPage());\n }", "List<E> findAll(int page, int size);", "public List<Person> queryAllByPage(int pageNo, int pageSize, DalHints hints) throws SQLException {\n\t\thints = DalHints.createIfAbsent(hints);\n\n\t\tSelectSqlBuilder builder = new SelectSqlBuilder();\n\t\tbuilder.selectAll().atPage(pageNo, pageSize).orderBy(\"PeopleID\", ASC);\n\n\t\treturn client.query(builder, hints);\n\t}", "public List<Triplet> selectAll(boolean isSystem, int limit, int start) throws DAOException;", "Results setRowsPerPage(FilterSpecifier.ListBy listBy, int rowsPerPage) throws SearchServiceException;", "public List<Triplet> selectAll(boolean isSystem, int limit) throws DAOException;", "final int queryPage(Connection conn, String sql, int start, int rowsPerPage,\r\n Class beanCls, List results)throws SQLException {\r\n Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,\r\n ResultSet.CONCUR_READ_ONLY);\r\n\r\n try {\r\n ResultSet rs = stmt.executeQuery(new String(sql));\r\n\r\n rs.setFetchSize(50); //set the fetch size; maybe the 50 is not the best value.\r\n\r\n int count = 0;\r\n //rs.absolute(start) may return false, if the Result Set have be changed since the\r\n //previous countRows(...) operation;\r\n if (rs.absolute(start)) {\r\n ObjectHelper oh = helperFactory.getObjectHelper(beanCls);\r\n do {\r\n Object obj = oh.populate(rs, this);\r\n results.add(obj);\r\n } while ((rs.next() && (++count) < rowsPerPage));\r\n }\r\n rs.close();\r\n return count;\r\n } finally {\r\n stmt.close();\r\n }\r\n }", "public DataPage<CustomerBean> fetchPage(int startRow, int pageSize) {\n return getDataPage(startRow, pageSize);\r\n }", "String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);", "private void executeQuery1(PersistenceManager pm) {\n Query query = pm.newQuery(Book.class, \"pages > 300\");\n Collection results = (Collection)query.execute();\n printCollection(\"Books with more than 300 pages:\", results.iterator());\n query.closeAll();\n }", "public SQLBuffer toSelect(SQLBuffer selects, JDBCFetchConfiguration fetch,\r\n SQLBuffer from, SQLBuffer where, SQLBuffer group,\r\n SQLBuffer having, SQLBuffer order,\r\n boolean distinct, boolean forUpdate, long start, long end,\r\n int expectedResultCount) {\r\n String forUpdateString = getForUpdateClause(fetch,forUpdate);\r\n SQLBuffer selString = toOperation(getSelectOperation(fetch), \r\n selects, from, where,\r\n group, having, order, distinct,\r\n forUpdate, start, end,forUpdateString);\r\n return selString;\r\n }", "public List<?> query(String jql, int offset, int size) {\r\n\t\treturn query(jql, offset, size, new Object[0]);\r\n\t}", "public void setFetchSize(int rows) throws SQLException {\n currentPreparedStatement.setFetchSize(rows);\n }", "public List<Statistic> queryPageData(Integer startIndex, Integer pagesize) {\n\t\tString sql=\"select * from statistics order by creat_date desc limit ?,? \";\n\t\treturn getList(sql,startIndex,pagesize);\n\t}", "protected void appendSelectRange(SQLBuffer buf, long start, long end) {\n buf.append(\" FETCH FIRST \").append(Long.toString(end)).\r\n append(\" ROWS ONLY\");\r\n }", "@Override\r\n\tpublic List<TUsers> queryByPage(int page, QueryUser query) {\n\t\t\r\n\t\tint start=(page-1)*contests.PAGECONT+1;\r\n\t\tint end=page*contests.PAGECONT;\r\n\t\tquery.setStart(start);\r\n\t\tquery.setEnd(end);\r\n\t\treturn dao.queryByPage(query);\r\n\t}", "public void processLargeResultSet(String sql, Consumer<ResultSet> resultSetConsumer) throws SQLException {\n connectionCheck();\n blankStringCheck(sql, \"DB : Cannot execute blank SQL.\");\n try (PreparedStatement stmt = connection.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)) {\n stmt.setFetchSize(AppConstants.DEFAULT_FETCH_SIZE);\n stmt.setFetchDirection(AppConstants.DEFAULT_FETCH_DIRN);\n ResultSet results = stmt.executeQuery();\n\n while (results.next()) {\n resultSetConsumer.accept(results);\n }\n }\n }", "private <E> List<E> pageQuery(Invocation invocation,BoundSql boundSql) {\n MappedStatement mappedStatement = (MappedStatement)invocation.getArgs()[0];\n Object parameter = invocation.getArgs()[1];\n RowBounds rowBounds = (RowBounds)invocation.getArgs()[2];\n ResultHandler resultHandler = (ResultHandler)invocation.getArgs()[3];\n Executor executor = (Executor)invocation.getTarget();\n CacheKey cacheKey = executor.createCacheKey(mappedStatement, parameter, rowBounds, mappedStatement.getBoundSql(parameter));\n createParamMappingToBoundSql(mappedStatement,boundSql,cacheKey);\n createParamObjectToBoundSql(mappedStatement,boundSql);\n String pageSql = getPageSql(boundSql);\n //创建新的BoundSql对象\n BoundSql newboundSql = new BoundSql(mappedStatement.getConfiguration(), pageSql, boundSql.getParameterMappings(), boundSql.getParameterObject());\n List<E> result = null;\n try {\n boundSqlAdditionalParameterCopy(newboundSql,boundSql);\n result = executor.query(mappedStatement, parameter, rowBounds, resultHandler, cacheKey, newboundSql);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n }\n return result;\n }", "public PageObject findAll(String jdzyId,String enterpriseCode,final int... rowStartIdxAndCount);", "public void setFetchSize(int rows) throws SQLException\n {\n m_rs.setFetchSize(rows);\n }", "OResultSet fetchNext(int n);", "public <T> List<T> query(String jql, Class<T> clazz, int offset, int size, Object... params) {\r\n\t\treturn query(jql, clazz, false, offset, size, params);\r\n\t}", "public <T> List<T> query(Class<T> clazz, int offset, int size, Object... params) {\r\n\t\treturn query(null, clazz, offset, size, params);\r\n\t}", "public <T> List<T> query(Class<T> clazz, int offset, int size) {\r\n\t\treturn query(clazz, offset, size, new Object[0]);\r\n\t}", "@Override\n public BaseListDto<GoodsNameDto> selectPage(Map<String, Object> params) throws Exception {\n int currentPage = Integer.parseInt(params.getOrDefault(\"currentPage\", 1).toString());\n int pageSize = Integer.parseInt(params.getOrDefault(\"pageSize\", 10).toString());\n QueryWrapper<GoodsName> qw = new QueryWrapper<>();\n DaoUtil.parseGenericQueryWrapper(qw, params, GoodsName.class);\n IPage<GoodsName> pages = goodsNameMapper.selectPage((Page<GoodsName>) DaoUtil.queryPage(currentPage, pageSize), qw);\n List<GoodsNameDto> list = pages.getRecords().stream().map(entity -> entity2Dto(entity)).collect(Collectors.toList());\n return new BaseListDto<GoodsNameDto>(list, (int) pages.getTotal());\n }", "public List<?> query(String jql, int offset, int size, Object... params) {\r\n\t\treturn query(jql, Object.class, offset, size, params);\r\n\t}", "List<Activity> findAllPageable(int page, int size);", "public ResultSet executeFetch(String sql, int fetchSize, int fetchDirn) throws SQLException {\n connectionCheck();\n blankStringCheck(sql, \"DB : Cannot execute blank SQL.\");\n\n Statement stmt = connection.prepareStatement(sql);\n stmt.setFetchSize(fetchSize);\n stmt.setFetchDirection(fetchDirn);\n return stmt.getResultSet();\n }", "public List<?> query(String jql, int offset, int size, Map<String, Object> params) {\r\n\t\treturn query(jql, Object.class, offset, size, params);\r\n\t}", "public void select(int first, int pageSize, String sortField, Object filterValue) throws SQLException, NamingException, IOException {\n\t\n\t \t\tContext initContext = new InitialContext(); \n\t \tDataSource ds = (DataSource) initContext.lookup(JNDI);\n\t \t\tcon = ds.getConnection();\n\t \t//Reconoce la base de datos de conección para ejecutar el query correspondiente a cada uno\n\t \t\tDatabaseMetaData databaseMetaData = con.getMetaData();\n\t \t\tproductName = databaseMetaData.getDatabaseProductName();//Identifica la base de datos de conección\n\n\t \t\t\n\t \t\tString query = \"\";\n\t \t\t \t\n\t \t\tif(pcodcia==null){\n\t \t\t\tpcodcia = \" - \";\n\t }\n\t if(pcodcia==\"\"){\n\t \tpcodcia = \" - \";\n\t }\n\t \n\t \n\t \t\t//String[] veccodcia = pcodcia.split(\"\\\\ - \", -1);\n\t \n\t switch ( productName ) {\n\t case \"Oracle\":\n\t \t//Consulta paginada\n\t \tquery = \" select * from \";\n\t \tquery += \" ( select query.*, rownum as rn from\";\n\t\t \t\tquery += \" ( SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), a.cedula, trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and a.grupo = '\" + grupo + \"'\";\n\t\t \t\tquery += \" order by \" + sortField.replace(\"v\", \"\") + \") query\";\n\t\t query += \" ) where rownum <= \" + pageSize ;\n\t\t query += \" and rn > (\" + first + \")\";\n\n\t break;\n\t case \"PostgreSQL\":\n\t \t//Consulta paginada\n\t\t \t\tquery = \"SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), CAST(a.cedula AS text), trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and CAST(a.grupo AS text) = '\" + grupo + \"'\";\n\t\t query += \" order by \" + sortField.replace(\"v\", \"\") ;\n\t\t query += \" LIMIT \" + pageSize;\n\t\t query += \" OFFSET \" + first;\n\t break; \t\t \n\t \t\t}\n\t\n\t \t\t\n\t \t\t\n\t \t\t\n\t\n\t\n\t \n\t pstmt = con.prepareStatement(query);\n\t //System.out.println(query);\n\t \t\t\n\t ResultSet r = pstmt.executeQuery();\n\t \n\t \n\t while (r.next()){\n\t \tRegistros select = new Registros();\n\t \tselect.setVpcodcia(r.getString(1));\n\t select.setVpcodciadescia(r.getString(2) + \" - \" + r.getString(1));\n\t select.setVcedula(r.getString(4));\n\t select.setVcoduser(r.getString(3));\n\t select.setVcluser(r.getString(5));\n\t select.setVmail(r.getString(6));\n\t select.setPcodcia(r.getString(2));\n\t select.setVnbr(r.getString(7));\n\t select.setVcodrol(r.getString(8));\n\t select.setVgrupo(r.getString(9));\n\t \t//Agrega la lista\n\t \tlist.add(select);\n\t }\n\t //Cierra las conecciones\n\t pstmt.close();\n\t con.close();\n\t r.close();\n\t \n\t \t}", "@Override\r\n\tpublic List findAll(PageBean pagebean) {\n\t\tList list=bankcardMapper.selectByExample(null,new RowBounds(pagebean.getOffset(), pagebean.getLimit()));\r\n\t\tint count=bankcardMapper.countByExample(null);\r\n\t\tpagebean.setCount(count);\t\r\n\t\treturn list;\r\n\t}", "GroupQueryBuilder page(int firstResult, int maxResults) throws UnsupportedQueryCriterium;", "List<Product> getProductPage(int pageNumber, int pageSize);", "@Override\n public PageResult<BorrowDO> selectByQueryWithPage(BorrowQuery query) {\n PageResult<BorrowDO> result = new PageResult<BorrowDO>();\n result.setPageSize(query.getPageSize());\n result.setPageNo(query.getPageNo());\n result.setTotalCount(this.countByQuery(query));\n result.setResult(this.selectByQuery(query));\n return result;\n }", "public <T> List<T> query(String jql, Class<T> clazz, int offset, int size, Map<String, Object> params) {\r\n\t\treturn query(jql, clazz, false, offset, size, params);\r\n\t}", "List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);", "@Override\n\tpublic List<?> selectPage(Map<String, Object> params) {\n\t\treturn this.tableConfigDao.selectPage(params);\n\t}", "private void fetchMoreRows() throws SQLException {\n/* 370 */ if (this.lastRowFetched) {\n/* 371 */ this.fetchedRows = new ArrayList<ResultSetRow>(0);\n/* */ \n/* */ return;\n/* */ } \n/* 375 */ synchronized (this.owner.connection.getConnectionMutex()) {\n/* 376 */ boolean oldFirstFetchCompleted = this.firstFetchCompleted;\n/* */ \n/* 378 */ if (!this.firstFetchCompleted) {\n/* 379 */ this.firstFetchCompleted = true;\n/* */ }\n/* */ \n/* 382 */ int numRowsToFetch = this.owner.getFetchSize();\n/* */ \n/* 384 */ if (numRowsToFetch == 0) {\n/* 385 */ numRowsToFetch = this.prepStmt.getFetchSize();\n/* */ }\n/* */ \n/* 388 */ if (numRowsToFetch == Integer.MIN_VALUE)\n/* */ {\n/* */ \n/* 391 */ numRowsToFetch = 1;\n/* */ }\n/* */ \n/* 394 */ this.fetchedRows = this.mysql.fetchRowsViaCursor(this.fetchedRows, this.statementIdOnServer, this.metadata, numRowsToFetch, this.useBufferRowExplicit);\n/* */ \n/* 396 */ this.currentPositionInFetchedRows = -1;\n/* */ \n/* 398 */ if ((this.mysql.getServerStatus() & 0x80) != 0) {\n/* 399 */ this.lastRowFetched = true;\n/* */ \n/* 401 */ if (!oldFirstFetchCompleted && this.fetchedRows.size() == 0) {\n/* 402 */ this.wasEmpty = true;\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "SelectQueryBuilder selectAll();", "@Override\r\n\tpublic List<User> selectAllUser(int pageNumber,int pageSize) {\n\t\tList<User> result = null;\r\n\t\tresult = userMapper.selectAllUser(pageNumber,pageSize);\r\n\t\treturn null == result ? new ArrayList<User>() : result;\r\n\t}", "public PageBox selectByExampleWithPaging(ScOrgSeqExample example, int pageSize, int pageNum) {\n return selectByExampleWithPaging(example, pageSize, pageNum, null);\n }", "public List<Goods> selectByDate(int page,int maxResults);", "public List<TransferObject> select(WhereStatement whereClause){\r\n\t long start, end;\r\n\t start = (new java.util.Date()).getTime(); \r\n\t String tableName = this.getTableName();\r\n\t List<TransferObject> items = new ArrayList<TransferObject>();\r\n\t Cursor c = null;\r\n\t StatementArguments arguments = new StatementArguments(tableName);\r\n\t \r\n\t arguments.setWhereClause(whereClause.createWhereStatement().toString());\r\n\t SelectStatement sql = new SelectStatement(arguments);\r\n\t\ttry {\r\n\t\t\tc = getDb().rawQuery(sql.createStatement().toString(), whereClause.getArguments());\r\n\t\t\tLog.i(\"GPA\", sql.createStatement().toString());\r\n\t c.moveToFirst(); \r\n\t while(!c.isAfterLast()){ \r\n\t \tTransferObject bean = this.fill(c);\r\n\t \titems.add( bean ); \r\n\t \tc.moveToNext(); \r\n\t } \r\n\t c.close();\r\n\t return items;\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"GPALOG\" , e.getMessage(),e); \r\n\t\t}finally{\r\n\t\t\t if(c!=null){c.close();}\r\n\t end = (new java.util.Date()).getTime();\r\n\t Log.i(\"GPALOG\", \"Time to query: \" + (end - start) + \" ms\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String paging(String sql) {\n\t\treturn null;\r\n\t}", "protected void generateSelect( SQLQueryModel query, LogicalModel model, DatabaseMeta databaseMeta,\n List<Selection> selections, boolean disableDistinct, int limit, boolean group, String locale,\n Map<LogicalTable, String> tableAliases, Map<String, String> columnsMap, Map<String, Object> parameters,\n boolean genAsPreparedStatement ) {\n query.setDistinct( !disableDistinct && !group );\n query.setLimit( limit );\n for ( int i = 0; i < selections.size(); i++ ) {\n // In some database implementations, the \"as\" name has a finite length;\n // for instance, oracle cannot handle a name longer than 30 characters.\n // So, we map a short name here to the longer id, and replace the id\n // later in the resultset metadata.\n String alias = null;\n if ( columnsMap != null ) {\n alias = databaseMeta.generateColumnAlias( i, selections.get( i ).getLogicalColumn().getId() );\n columnsMap.put( alias, selections.get( i ).getLogicalColumn().getId() );\n alias = databaseMeta.quoteField( alias );\n } else {\n alias = databaseMeta.quoteField( selections.get( i ).getLogicalColumn().getId() );\n }\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, selections.get( i ), tableAliases, parameters, genAsPreparedStatement,\n databaseMeta, locale );\n query.addSelection( sqlAndTables.getSql(), alias );\n }\n }", "public CachedRowSet executeQueryLimitRows(T databaseConnection, String query, int limit, Connection connection) throws SQLException {\n query = this.removeIllegalCharactersForSingleQuery(databaseConnection, query);\n query = refactorLimitAndOffset(query);\n // query = prepareQuery(query);\n\n Statement statement = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY,\n ResultSet.CONCUR_READ_ONLY);\n statement.setMaxRows(limit);\n\n log.info(databaseConnection.getConnectionURL() + \":\" + query);\n ResultSet rs = statement.executeQuery(query);\n CachedRowSet crs = RowSetProvider.newFactory().createCachedRowSet();\n crs.populate(rs);\n rs.close();\n\n statement.close();\n\n return crs;\n }", "public PageList<Hoppy> getPageList(Hoppy hoppy, int pageSize, int pageNum) throws DataAccessException;", "public FeatureCursor queryFeaturesForChunk(boolean distinct,\n BoundingBox boundingBox, Projection projection, int limit,\n long offset) {\n return queryFeaturesForChunk(distinct, boundingBox, projection,\n getPkColumnName(), limit, offset);\n }", "@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }", "public <T> List<T> query(Class<T> clazz, int offset, int size, Map<String, Object> params) {\r\n\t\treturn query(null, clazz, offset, size, params);\r\n\t}", "long getPageSize();", "long getPageSize();", "long getPageSize();", "@Override\r\n\tpublic String select() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(numPerPage*(pageIndex-1));\r\n\t\tparamList.add(numPerPage);\r\n\t\tthis.setResultMesg(adminDao.doCount(), adminDao.doSelect(paramList));\r\n\t\treturn SUCCESS;\r\n\t}", "public PaginationDTO list(Integer page, Integer size) {\n\t\tPaginationDTO paginationDTO=new PaginationDTO();\n\t\tInteger totalPage;\n\t\tInteger totalCount = (int) testMapper.countByExample(new TestExample());\n\t\tif (totalCount % size == 0) {\n totalPage = totalCount / size;\n } else {\n totalPage = totalCount / size + 1;\n }\n\n if (page < 1) {\n page = 1;\n }\n if (page > totalPage) {\n page = totalPage;\n }\n paginationDTO.setPagination(totalPage, page);\n Integer offset = page < 1 ? 0 : size * (page - 1);\n TestExample testExample =new TestExample();\n testExample.setOrderByClause(\"start_time asc\");\n List<Test> tests = testMapper.selectByExampleWithRowbounds(testExample, new RowBounds(offset,size));\n List<TestDTO> testDTOList = new ArrayList<>();\n for (Test test : tests) {\n TestDTO testDTO = new TestDTO();\n BeanUtils.copyProperties(test, testDTO);\n testDTOList.add(testDTO);\n }\n paginationDTO.setData(testDTOList);\n\t\treturn paginationDTO;\n\t}", "@Test\n public void queryByPage() {\n List<Album> albums = albumDao.SelectByPage(1, 5);\n for (Album album : albums) {\n System.out.println(album);\n }\n }", "public Map searchToPage(String sql, Integer pageIndex, Integer pageSize,\n\t\t\tObject[] param) {\n\t\treturn this.rsDAO.searchToPage(sql, pageIndex, pageSize, param);\n\t}", "public ResultSet getCurrentPage() throws SQLException{\n Statement stmt = conn.createStatement();\n\n ResultSet rs = stmt.executeQuery(sql);\n\n return rs;\n\n }", "public abstract ArrayList<T> findAll(int limit, int offset);", "@CrossOrigin(origins = \"http://localhost:3000\")\n @RequestMapping(value = \"/get\", method = RequestMethod.GET, produces = \"application/json\")\n Page<Student> getStudentsByPagination(@RequestParam(value = \"page\", required = false) int page,\n @RequestParam(value = \"size\", required = false) int size){\n page = page <0 ? PAGINATION_DEFAULT_PAGE : page;\n size = (size <0) ? PAGINATION_DEFAULT_SIZE: size;\n return studentService.findAllByPaging(PageRequest.of(page, size));\n }", "@Override\n\tpublic int doStartTag() throws JspTagException {\n\t\tApplicationContext aContext = WebApplicationContextUtils.getWebApplicationContext(this.pageContext.getServletContext());\n\t\tJdbcTemplate aTemplate = new JdbcTemplate((DataSource) aContext.getBean(\"dataSource\"));\n\t\tList rset = null;\n\n\t\tif (id == null) {\n\t\t\tid = \"\";\n\t\t}\n\n\t\tpageContext.setAttribute(\"__\" + id + \"_MaxRows\", maxRows);\n\n\t\ttry {\n\t\t\tgrabAll = false;\n\t\t\tif (maxRows == 0) {\n\t\t\t\trset = aTemplate.queryForList(sqlStatement);\n\t\t\t\tgrabAll = true;\n\t\t\t} else {\n\t\t\t\trset = aTemplate.queryForList(sqlStatement + \" LIMIT \" + startOffset + \",\" + maxRows);\n\t\t\t}\n\t\t\tif (rset != null && rset.size() > 0) {\n\t\t\t\tint rowc = getRowCount( aTemplate);\n\n\t\t\t\tListIterator aIt = rset.listIterator();\n\t\t\t\tpageContext.setAttribute(\"__\" + id + \"_data\", aIt);\n\t\t\t\tpageContext.setAttribute(\"__\" + id + \"_ShowTableRownum\", rowc);\n\t\t\t\treturn EVAL_BODY_BUFFERED;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error( \"doStartTag (sql: \" + sqlStatement + \")\", e);\n\t\t\tAgnUtils.sendExceptionMail(\"sql: \" + sqlStatement, e);\n\t\t\tthrow new JspTagException(\"Error: \" + e);\n\t\t}\n\t\treturn SKIP_BODY;\n\t}", "@Override\n public void setFetchSize(int rows) throws SQLException {\n if( (rows <= 0) || (rows >= this.getMaxRows ()) ) {\n throw new SQLException ( \"Condition 0 <= rows <= \" + \n \"this.getMaxRows() is not satisfied\");\n }\n fetchsize = rows; \n }", "protected abstract List<Long> readIds(ResultSet resultSet, int loadSize) throws SQLException;", "public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }", "private void advance(final ResultSet rs, final RowSelection selection)\n \t\t\tthrows SQLException {\n \n-\t\tfinal int firstRow = getFirstRow( selection );\n+\t\tfinal int firstRow = LimitHelper.getFirstRow( selection );\n \t\tif ( firstRow != 0 ) {\n \t\t\tif ( getFactory().getSettings().isScrollableResultSetsEnabled() ) {\n \t\t\t\t// we can go straight to the first required row\n \t\t\t\trs.absolute( firstRow );\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// we need to step through the rows one row at a time (slow)\n \t\t\t\tfor ( int m = 0; m < firstRow; m++ ) rs.next();\n \t\t\t}\n \t\t}\n \t}", "@Override\r\n\tpublic PageData<Food> queryFoods(int page, int pageSize) {\n\t\tString sql=\"select * from food\";\r\n\t\tPageData<Food> pd= BaseDao.getPage(sql, page, pageSize, Food.class);\r\n\t\treturn pd;\r\n\t}", "@Override\r\n\tpublic DeptBean[] findByDynamicWhereByPage(String whereSql, int page,\r\n\t\t\tint rows, Object[] array) throws SQLException {\n\t\tList<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();\r\n\t\tdeptConn = this.getConnection();\r\n\t\t// construct the SQL statement\r\n\t\tfinal String SQL = SQL_SELECT + \" WHERE 1=1 \" + whereSql;\r\n\t\r\n\t\tresultList = this.queryByPage(deptConn, SQL, page, rows, array);\r\n\t\t\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn MapToObject(resultList);\r\n\r\n\t}", "public FeatureCursor queryFeaturesForChunk(boolean distinct, int limit,\n long offset) {\n return queryFeaturesForChunk(distinct, getPkColumnName(), limit,\n offset);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Result sqlQueryByPage(String sql,Page page,HashMap entities,HashMap joins,Object... params);", "@Override\n public int getFetchSize() throws SQLException {\n return fetchsize;\n }", "public List<Categories> selectAllCates(int pageNow, int pageSize) {\r\n\t\tList<Categories> list = new ArrayList<Categories>();\r\n\t\t\r\n\t\tExecutorService a = Executors.newFixedThreadPool(3);\r\n\t\tFuture f1 = a.submit(new GetList(list, 10, 1, categoriesDao));\r\n\t\tFuture f2 = a.submit(new GetList(list, 10, 2, categoriesDao));\r\n\t\tFuture f3 = a.submit(new GetList(list, 10, 3, categoriesDao));\r\n\t\twhile (!f1.isDone() || !f2.isDone() || !f3.isDone()) {\r\n\t\t\t\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public PageList<User> getUserPageList(User user, int pageSize, int pageNum) throws DataAccessException;", "public Map searchToPageBySql(String sql, Integer pageIndex,\n\t\t\tInteger pageSize, Object[] param) {\n\t\treturn this.rsDAO.searchToPageBySql(sql, pageIndex, pageSize, param) ;\n\t}", "public FeatureCursor queryFeaturesForChunk(boolean distinct,\n String[] columns, BoundingBox boundingBox, Projection projection,\n int limit, long offset) {\n return queryFeaturesForChunk(distinct, columns, boundingBox, projection,\n getPkColumnName(), limit, offset);\n }" ]
[ "0.62167794", "0.6031788", "0.5973129", "0.58790696", "0.58410853", "0.5798064", "0.57837224", "0.5773251", "0.56702244", "0.56234765", "0.5605759", "0.55984914", "0.5578193", "0.5564428", "0.5557462", "0.5539346", "0.5535211", "0.5516377", "0.5515151", "0.5514338", "0.5496757", "0.54646564", "0.5441637", "0.5412038", "0.54039407", "0.5370494", "0.5362242", "0.53533524", "0.53246176", "0.5314301", "0.530539", "0.5283295", "0.52700526", "0.52668107", "0.5262003", "0.5248013", "0.52427524", "0.5234995", "0.52184373", "0.52094376", "0.5201576", "0.5200581", "0.5200449", "0.51888907", "0.51824445", "0.5168521", "0.51614445", "0.51582366", "0.5154005", "0.51489365", "0.51460713", "0.5144104", "0.5140987", "0.5136769", "0.512493", "0.51235366", "0.51225346", "0.5113724", "0.5109156", "0.5103566", "0.5099963", "0.50997066", "0.5086367", "0.50850683", "0.5073669", "0.5073297", "0.50731313", "0.50661814", "0.50645125", "0.5058214", "0.50562257", "0.5051012", "0.504953", "0.50323236", "0.50234187", "0.5019755", "0.50128007", "0.50128007", "0.50128007", "0.50100756", "0.50090533", "0.5005566", "0.50010073", "0.5000256", "0.49938452", "0.4989787", "0.49882442", "0.49862343", "0.49691358", "0.49664414", "0.49623016", "0.4956915", "0.49533477", "0.49519658", "0.49409258", "0.49379158", "0.49349958", "0.4932139", "0.49300662", "0.49249414" ]
0.4927643
99
Executes the given script and returns the result as a json string. If you still want to parse the json again, use the other execute method execute(String, Map).
@CompileStatic public String executeToJSON(String scriptName, Map<String, Object> data) throws NyException { Object result = execute(scriptName, data); if (result == null) { return null; } else { return JsonOutput.toJson(result); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@CompileStatic\n public String executeToJSON(String scriptName) throws NyException {\n return executeToJSON(scriptName, new HashMap<>());\n }", "public Object executeScript(String command);", "@Override\n public String runOperation(CallingContext context, RaptureScript script, String ctx, Map<String, Object> params) {\n try {\n ScriptEngine engine = engineRef.get();\n CompiledScript cScript = getOperationScript(engine, script);\n addStandardContext(context, engine);\n engine.put(PARAMS, params);\n engine.put(CTX, ctx);\n Kernel.getKernel().getStat().registerRunScript();\n return JacksonUtil.jsonFromObject(cScript.eval());\n } catch (ScriptException e) {\n Kernel.writeAuditEntry(EXCEPTION, 2, e.getMessage());\n throw RaptureExceptionFactory.create(HttpURLConnection.HTTP_INTERNAL_ERROR, \"Error running script \" + script.getName(), e);\n }\n }", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "void executeScript(Readable script) throws IOException;", "public void executeCommand(String text) {\r\n JsonParser parser = new JsonParser();\r\n try {\r\n JsonObject o = (JsonObject) parser.parse(text);\r\n interpretJson(o);\r\n } catch (JsonSyntaxException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName, Map<String, Object> data) throws NyException {\n QScript script = null;\n try {\n script = parse(scriptName, data);\n return (T) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script);\n } catch (Exception ex) {\n if (ex instanceof NyException) {\n throw (NyException) ex;\n } else {\n throw new NyScriptExecutionException(\"Ny script execution error!\", ex);\n }\n } finally {\n if (script != null) {\n script.free();\n }\n }\n }", "public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "public Object processScriptResult(Object result) throws ScriptException;", "InternalResponseBehavior executeScript(ResourceConfig config, Map<String, Object> bindings);", "Object eval(String script, int keyCount, String... params);", "public CompletableFuture<Object> eval(final String script, final Bindings boundVars) {\n return eval(script, null, boundVars);\n }", "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName) throws NyException {\n return (T) execute(scriptName, EMPTY_MAP);\n }", "public String execute(){\r\n\t\t\r\n\t\tString resultHtml = null;\r\n\t\tdebug(1,\"jsrpc start...\"+screenName+\" \"+rpcid); \r\n\t\tHashMap hm = jsrpcProcessBL(screenName);\r\n\t\tJSONObject jobj = new JSONObject(hm);\r\n\t\tresultHtml = jobj.toString();\r\n\t\tdebug(1,\"json result:\"+resultHtml);\r\n\t\tinputStream = new StringBufferInputStream(resultHtml);\r\n\t\treturn SUCCESS;\r\n\t}", "public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }", "com.google.protobuf.ByteString getScript();", "private static Object executeJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing javascript: \" + script);\n return ((JavascriptExecutor) driver).executeScript(script);\n }", "@CompileStatic\n public QScript parse(String scriptName, Map<String, Object> data) throws NyException {\n QSession qSession = QSession.create(configurations, scriptName);\n if (data != null) {\n qSession.getSessionVariables().putAll(data);\n }\n return configurations.getRepositoryRegistry().defaultRepository().parse(scriptName, qSession);\n }", "default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }", "private Result processScript() throws IOException, HsqlException {\n\n String token = tokenizer.getString();\n ScriptWriterText dsw = null;\n\n session.checkAdmin();\n\n try {\n if (tokenizer.wasValue()) {\n if (tokenizer.getType() != Types.VARCHAR) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n dsw = new ScriptWriterText(database, token, true, true, true);\n\n dsw.writeAll();\n\n return new Result(ResultConstants.UPDATECOUNT);\n } else {\n tokenizer.back();\n\n return DatabaseScript.getScript(database, false);\n }\n } finally {\n if (dsw != null) {\n dsw.close();\n }\n }\n }", "default Value eval(String script) throws Exception {\n return eval(script, false);\n }", "public String parse(String jsonLine) throws JSONException {\n JSONObject jsonObject = new JSONObject(jsonLine);\n jsonObject = new JSONObject(jsonObject.getString(\"output\"));\n String result = jsonObject.getString(\"result\");\n return result;\n }", "<T> T runGroovyScript(String name, Map<String, Object> context);", "@Override\n public void execute(final ExecutionParameters parameters) {\n logger.info(\"About to execute Groovy code\");\n\n // contains action's configuration\n final JsonObject configuration = parameters.getConfiguration();\n\n // access the value of the mapped value into name field of the in-metadata\n final JsonString code = configuration.getJsonString(\"code\");\n if (code == null) {\n throw new IllegalStateException(\"Code is required\");\n }\n final Binding binding = new Binding();\n binding.setProperty(\"parameters\", parameters);\n binding.setProperty(\"logger\", logger);\n\n final ImportCustomizer importCustomizer = new ImportCustomizer();\n importCustomizer.addStarImports(\n \"io.elastic.api\",\n \"org.slf4j\",\n \"javax.json\",\n \"javax.ws.rs.client\",\n \"javax.ws.rs.core\"\n );\n\n final CompilerConfiguration compilerConfiguration = new CompilerConfiguration();\n compilerConfiguration.addCompilationCustomizers(importCustomizer);\n\n final GroovyShell shell = new GroovyShell(getClass().getClassLoader(), binding, compilerConfiguration);\n\n final Script script = shell.parse(new StringReader(code.getString()));\n\n final Object result = script.run();\n\n if (result instanceof Message) {\n\n logger.info(\"Emitting data\");\n\n // emitting the message to the platform\n parameters.getEventEmitter().emitData((Message) result);\n }\n }", "public String getScriptAsString() {\n return this.script;\n }", "@Override\r\n public void asyncExecute(String script)\r\n {\n\r\n }", "@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}", "public abstract void runScript() throws Exception;", "R execute();", "private int executeScript() throws ServerException {\r\n\t\tCGIOutputStreamReader cin = new CGIHandler().sendScript( request );\r\n\t\tBufferedOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tint headerStringLen = cin.getHeaderStringSize();\r\n\t\t\tbyte[] content = cin.readBodyContent();\r\n\t\t\tint contentLength = content.length - headerStringLen;\r\n\t\t\tString headerMessage = createBasicHeaderMessage( ResponseTable.OK ).buildContentLength(\r\n\t\t\t\t\tcontentLength ).toString();\r\n\r\n\t\t\tout = new BufferedOutputStream( outStream );\r\n\t\t\tout.write( headerMessage.getBytes( \"UTF-8\" ) );\r\n\t\t\tout.write( content );\r\n\t\t\tout.flush();\r\n\t\t\treturn ResponseTable.OK;\r\n\r\n\t\t} catch ( IOException ioe ) {\r\n\t\t\tioe.printStackTrace();\r\n\t\t\tthrow new ServerException( ResponseTable.INTERNAL_SERVER_ERROR );\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tcin.close();\r\n\t\t\t} catch ( Exception ioe ) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic JsonElement execute(String json) throws ServerInvalidRequestException {\n\t\treturn null;\n\t}", "@Override\r\n public String evaluateScriptOutput() throws IOException {\r\n return getPythonHandler().getPythonOutput();\r\n }", "@Override\r\n public void syncExecute(String script)\r\n {\n\r\n }", "void loadScript(URL url) throws IOException, ScriptRunnerException;", "@Override\n\t\tpublic String execute(String line) {\n\t\t\tString[] command = line.split(\" \"); \n\t\t\tJCommander.newBuilder()\n\t\t\t .addObject(settings)\n\t\t\t .build()\n\t\t\t .parse(command);\n\t\t\t\n\t\t\treturn settings.execute();\n\t\t}", "public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }", "public static Analytic pyEval(Script script) throws ScriptException {\n List<Analytic> analytics = Lists.newArrayListWithCapacity(1);\n PySystemState engineSys = new PySystemState();\n PyObject builtins = engineSys.getBuiltins();\n builtins.__setitem__(\"_script\", Py.java2py(script));\n builtins.__setitem__(\"_analytics\", Py.java2py(analytics));\n Py.setSystemState(engineSys);\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new PyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"python\");\n Bindings bindings = new SimpleBindings();\n engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n\n return analytics.get(0);\n }", "public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }", "private String getCreateRunScript(ActionURL url, boolean isOutput)\n {\n return DataRegion.getJavaScriptObjectReference(getDataRegionName()) +\n \".getSelected({success: \" + getSelectedScript(url, isOutput) + \"});\";\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void execute(JobExecutionContext context)\n\t\t\tthrows JobExecutionException {\n\t\tJobDataMap map = context.getJobDetail().getJobDataMap();\n\t\tString json = map.getString(getArg());\n\t\tif(json==null){\n\t\t\techo(\"json is null\");\n\t\t\treturn ;\n\t\t}\n\t\tMsg = JSON.parseObject(json, Map.class);\n\t\t\t\t\n\t\tSendEmail();\n\t}", "public IRubyObject runScriptBody(Script script) {\n ThreadContext context = getCurrentContext();\n \n try {\n return script.__file__(context, getTopSelf(), Block.NULL_BLOCK);\n } catch (JumpException.ReturnJump rj) {\n return (IRubyObject) rj.getValue();\n }\n }", "public static Analytic rubyEval(Script script) throws ScriptException {\n System.setProperty(\"org.jruby.embed.localcontext.scope\", \"singleton\");\n System.setProperty(\"org.jruby.embed.compat.version\", \"JRuby1.9\");\n // keep local variables around between calls to eval\n System.setProperty(\"org.jruby.embed.localvariable.behavior\", \"persistent\");\n // make sure object hashing is consistent across all JVM instances, PR #640\n System.setProperty(\"jruby.consistent.hashing\", \"true\");\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new RubyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"jruby\");\n Bindings bindings = new SimpleBindings();\n bindings.put(\"$SCRIPT\", script);\n return (Analytic) engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n }", "private String executeRequest(URL url, String json, boolean post) throws IOException{\n\t\tURLConnection urlConnection = url.openConnection();\n\t\turlConnection.setDoOutput(post); //false if post\n\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\turlConnection.connect();\n\t\tOutputStream outputStream = urlConnection.getOutputStream();\n\t\toutputStream.write((json).getBytes(\"UTF-8\"));\n\t\toutputStream.flush();\n\t\t\n\t\t//Get Response\n InputStream in = urlConnection.getInputStream();\n BufferedReader rd = new BufferedReader(new InputStreamReader(in));\n String line;\n StringBuffer response = new StringBuffer();\n while((line = rd.readLine()) != null) {\n response.append(line);\n response.append('\\r');\n }\n rd.close();\n return response.toString();\n\t}", "Script createScript();", "private static Object executeAsyncJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing Async javascript: \" + script);\n return ((JavascriptExecutor) driver).executeAsyncScript(script);\n }", "private void runScript(String script) throws IOException, InterruptedException, RootToolsException, TimeoutException {\r\n\r\n// File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n//\r\n// File f = new File(tmpFolder, TEMP_SCRIPT);\r\n// f.setExecutable(true);\r\n// f.deleteOnExit();\r\n//\r\n// // Write the script to be executed\r\n// PrintWriter out = new PrintWriter(new FileOutputStream(f));\r\n// if (new File(\"/system/bin/sh\").exists()) {\r\n// out.write(\"#!/system/bin/sh\\n\");\r\n// }\r\n// out.write(script);\r\n// if (!script.endsWith(\"\\n\")) {\r\n// out.write(\"\\n\");\r\n// }\r\n// out.write(\"exit\\n\");\r\n// out.flush();\r\n// out.close();\r\n\r\n Log.d(this.getClass().getSimpleName(), \"Requesting file execution\");\r\n// Process exec = Runtime.getRuntime().exec(\"su -c \" + f.getAbsolutePath());\r\n// int res = exec.waitFor();\r\n// Toast.makeText(ctx, \"result: \" + res, Toast.LENGTH_LONG).show();\r\n \r\n// if (res != 0) {\r\n// ExceptionHandler.handle(this, R.string.error_script_loading, ctx);\r\n// }\r\n \r\n\r\n if (RootTools.isAccessGiven()) {\r\n List<String> output = RootTools.sendShell(script, SCRIPT_MAX_TIMEOUT);\r\n Log.d(\"\" + this, \"\" + output);\r\n }\r\n }", "public String getScript() {\n return script;\n }", "private String executeRequest(String url) throws Exception {\n\t\t//final String METHODNAME = \"executeRequest\";\n\t\tString responseString = null;\n\t\t\n\t\tHttpURLConnection conn = null;\n\t\ttry{\n\t\t\tif(url != null){\n\t\t\t\tURL jsonURL = new URL(url);\n\t\t\t\tconn = (HttpURLConnection)jsonURL.openConnection();\n\t\t\t\tconn.setConnectTimeout(2000);\n\t\t\t\tconn.setReadTimeout(2000);\n\t\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\t\t\n\t\t\t\tInputStream in = new BufferedInputStream(conn.getInputStream());\n\t\t\t\tresponseString = org.apache.commons.io.IOUtils.toString(in, \"UTF-8\");\n\t\t\t}\n\t\t}\n\t\tcatch(IOException io){\n\t\t\tio.printStackTrace();\n\t\t\tlog.severe(\"Failed calling json service IO Error: \" + url + \" - \" + io.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Failed calling json service: \" + url + \" - \" + e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.disconnect();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn responseString;\n\t}", "public static String executeScript(WebDriver driver, String script) {\n\t JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;\n\t return (String) jsExecutor.executeScript(script);\n\t }", "protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }", "String getScript() throws Exception {\n StringBuilder script = new StringBuilder();\n script.append(\"node('\" + remote.getNodeName() + \"') {\\n\");\n script.append(String.format(\"currentBuild.result = '%s'\\n\", this.result));\n script.append(\"step ([$class: 'CoberturaPublisher', \");\n script.append(\"coberturaReportFile: '**/coverage.xml', \");\n script.append(String.format(\"onlyStable: %s, \", this.onlyStable.toString()));\n script.append(String.format(\"failUnhealthy: %s, \", this.failUnhealthy.toString()));\n script.append(String.format(\"failUnstable: %s, \", this.failUnstable.toString()));\n if (this.lineCoverage != null) {\n script.append(String.format(\"lineCoverageTargets: '%s', \", this.lineCoverage));\n }\n if (this.branchCoverage != null) {\n script.append(String.format(\"conditionalCoverageTargets: '%s', \", this.branchCoverage));\n }\n if (this.fileCoverage != null) {\n script.append(String.format(\"fileCoverageTargets: '%s', \", this.fileCoverage));\t\t\t\t\n }\n if (this.packageCoverage != null) {\n script.append(String.format(\"packageCoverageTargets: '%s', \", this.packageCoverage));\t\t\t\t\n }\n if (this.classCoverage != null) {\n script.append(String.format(\"classCoverageTargets: '%s', \", this.classCoverage));\t\t\t\t\n }\n if (this.methodCoverage != null) {\n script.append(String.format(\"methodCoverageTargets: '%s', \", this.methodCoverage));\t\t\t\t\n }\n script.append(\"sourceEncoding: 'ASCII'])\\n\");\n script.append(\"}\");\n return script.toString();\n }", "public String getScriptExecution() {\n StringBuffer script = new StringBuffer(\"#!/bin/bash\\n\");\n script.append(\"if [ $# -ne \" + workflowInputTypeStates.size() + \" ]\\n\\tthen\\n\");\n script\n .append(\"\\t\\techo \\\"\" + workflowInputTypeStates.size() + \" argument(s) expected.\\\"\\n\\t\\texit\\nfi\\n\");\n int in = 1;\n for (TypeNode input : workflowInputTypeStates) {\n script.append(input.getShortNodeID() + \"=$\" + (in++) + \"\\n\");\n }\n script.append(\"\\n\");\n for (ModuleNode operation : moduleNodes) {\n String code = operation.getUsedModule().getExecutionCode();\n if (code == null || code.equals(\"\")) {\n script.append(\"\\\"Error. Tool '\" + operation.getNodeLabel() + \"' is missing the execution code.\\\"\")\n .append(\"\\n\");\n } else {\n for (int i = 0; i < operation.getInputTypes().size(); i++) {\n code = code.replace(\"@input[\" + i + \"]\", operation.getInputTypes().get(i).getShortNodeID());\n }\n for (int i = 0; i < operation.getOutputTypes().size(); i++) {\n code = code.replace(\"@output[\" + i + \"]\", operation.getOutputTypes().get(i).getShortNodeID());\n }\n script.append(code).append(\"\\n\");\n }\n }\n int out = 1;\n for (TypeNode output : workflowOutputTypeStates) {\n script.append(\"echo \\\"\" + (out++) + \". output is: $\" + output.getShortNodeID() + \"\\\"\");\n }\n\n return script.toString();\n }", "@Test\n public void CloudScriptServer()\n {\n PlayFabServerModels.LoginWithServerCustomIdRequest customIdReq = new PlayFabServerModels.LoginWithServerCustomIdRequest();\n customIdReq.CreateAccount = true;\n customIdReq.ServerCustomId = PlayFabSettings.BuildIdentifier;\n PlayFabResult<PlayFabServerModels.ServerLoginResult> loginRes = PlayFabServerAPI.LoginWithServerCustomId(customIdReq);\n assertNotNull(loginRes.Result);\n PlayFabServerModels.ExecuteCloudScriptServerRequest hwRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n hwRequest.FunctionName = \"helloWorld\";\n hwRequest.PlayFabId = loginRes.Result.PlayFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> hwResult = PlayFabServerAPI.ExecuteCloudScript(hwRequest);\n assertNotNull(hwResult.Result.FunctionResult);\n Map<String, String> arbitraryResults = (Map<String, String>)hwResult.Result.FunctionResult;\n assertEquals(arbitraryResults.get(\"messageValue\"), \"Hello \" + loginRes.Result.PlayFabId + \"!\");\n }", "public interface ScriptBinding\n{\n /**\n * Returns the list of variables this ScriptBinding provides, mapped by variable name.\n * @return The list of variables, or null if no variable is provided.\n */\n public Map<String, Object> getVariables();\n \n /**\n * Returns the list of variables descriptions, mapped by variable name.\n * This list does not have to match the getVariables return value, but the description is used to inform the user of the existence and usability of each variable.\n * @return The list of variables descriptions, or null if no description is provided.\n */\n public Map<String, I18nizableText> getVariablesDescriptions();\n\n /**\n * Allows clean up of variables created during the getVariables call.\n * @param variables The map of variables.\n */\n public void cleanVariables(Map<String, Object> variables);\n \n /**\n * Returns the JavaScript functions to inject at the start of the script, in the form of a single String prepended to the script.\n * @return The functions text, or null if no function is provided.\n */\n public String getFunctions();\n \n /**\n * Returns the list of functions descriptions, mapped by function name.\n * This list does not have to match the functions returned by getFunctions, but the description is used to inform the user of the existence and usability of each function.\n * @return The list of functions descriptions, or null if no description is provided.\n */\n public Map<String, I18nizableText> getFunctionsDescriptions();\n \n /**\n * Process the script result if there are any specificities for this console data.\n * @param result The result\n * @return The result processed, or null if this console data does not have any processing to do. \n * @throws ScriptException If a processing error occurs.\n */\n public Object processScriptResult(Object result) throws ScriptException;\n}", "private String js() throws IOException {\n String outputLine;\n File path = new File(\"src/main/resources/app.js\");\n FileReader fileReader = new FileReader(path);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n outputLine = \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/javascript \\r\\n\"\n + \"\\r\\n\";\n String inputLine;\n while ((inputLine=bufferedReader.readLine()) != null){\n outputLine += inputLine + \"\\n\";\n }\n return outputLine;\n }", "private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }", "public String execute() {\n\t\t\n\t\tjobs = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> job = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n\t\tjob = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n \n\t\treturn \"SUCCESS\";\n \n\t}", "@Test\r\n\tpublic void jsopathTest() {\r\n\t\tSystem.err.println(\"Execute: \" + expression);\r\n\t\tString value = (String) executeScript(\"return \" + expression);\r\n\t\tassertThat(value, is(\"Downloads\"));\r\n\t\tSystem.err.println(\"Result value: \" + value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getScript() {\n return script_;\n }", "public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }", "public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}", "String getJson();", "String getJson();", "String getJson();", "ExecutionResult<Void> execute();", "public interface ExecuteScriptCallback extends CallbackBase {\n\n /**\n * Override this method with the code you want to run after executing script service\n *\n * @param data Result to script\n * @param e NCMBException from NIFTY Cloud mobile backend\n */\n void done(byte[] data, NCMBException e);\n}", "@Override\n protected String doInBackground(Void... params) {\n\n try {\n URL url = new URL(\"http://web-app.usc.edu/maps/all_map_data2.js\");\n HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // connection\n\n conn.setRequestMethod(\"GET\"); // Get method\n\n int responseCode = conn.getResponseCode(); // get response code\n Log.e(\"responseCode\", Integer.toString(responseCode));\n\n InputStreamReader tmp = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n\n // TODO: not found check\n BufferedReader reader = new BufferedReader(tmp);\n StringBuilder builder = new StringBuilder();\n String str;\n while ((str = reader.readLine()) != null) {\n builder.append(str + \"\\n\");\n }\n\n Log.e(\"jsonStr\", builder.toString());\n return builder.toString();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }", "default Value eval(String script, String name, boolean literal) throws Exception {\n if (name.endsWith(\".mjs\")) {\n return eval(script, name, \"application/javascript+module\", literal);\n } else {\n return eval(script, name, \"application/javascript\", literal);\n }\n }", "@CompileStatic\n public QScript parse(String scriptName) throws NyException {\n return parse(scriptName, EMPTY_MAP);\n }", "protected Object execScript(String call) {\r\n if (call==null||call.length()==0)\r\n return null;\r\n Desktop desktop = getDesktop();\r\n Object client = desktop.getClient();\r\n Doc doc = desktop.getDoc();\r\n \r\n int left = call.indexOf('(');\r\n String name = call.substring(0, left);\r\n String args = call.substring(left+1, call.length()-1);\r\n \r\n try {\r\n Object[] params;\r\n if (args.trim().length()==0)\r\n params = null;\r\n else\r\n params = Doc.parseParameters(doc, this, args);\r\n Method m = Doc.findMethod(client, name, params);\r\n return Doc.invokeMethod(m, client, params);\r\n } catch (OxyException e) {\r\n Desktop.warn(\"error invoking method \"+name+\" with args: \"+args, e);\r\n return null;\r\n }\r\n }", "String getJSON();", "private Map<String, String> populate(Map<String, String> argsMap) throws IOException, TaskExecutionException {\n\n SimpleHttpClient httpClient = SimpleHttpClient.builder(argsMap).build();\n try {\n String url = UrlBuilder.builder(argsMap).path(argsMap.get(\"location\")).build();\n Response response = httpClient.target(url).get();\n String responseBody = response.string();\n String header = response.getHeader(\"Content-Type\");\n\n Map<String, String> resultMap = null;\n if (header != null && header.contains(\"application/json\")) {\n resultMap = parsePlusStatsResult(responseBody);\n } else if (header != null && header.contains(\"text/plain\")) {\n resultMap = parseStubStatsResults(responseBody);\n } else {\n logger.error(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n throw new TaskExecutionException(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n }\n return resultMap;\n } finally {\n httpClient.close();\n }\n }", "public StaticScript script(String script) {\n this.script = script;\n return this;\n }", "@Override\n public void execute(String commandText) throws Exception {\n parse(commandText);\n }", "public abstract boolean execute(Condition condition, Map<String, String> executionParameterMap, Grant grant);", "public CompletableFuture<Object> eval(final String script, final String language, final Bindings boundVars, final LifeCycle lifeCycle) {\n final String lang = Optional.ofNullable(language).orElse(\"gremlin-groovy\");\n\n if (logger.isDebugEnabled()) {\n logger.debug(\"Preparing to evaluate script - {} - in thread [{}]\", script, Thread.currentThread().getName());\n }\n\n final Bindings bindings = new SimpleBindings();\n bindings.putAll(globalBindings);\n bindings.putAll(boundVars);\n\n // override the timeout if the lifecycle has a value assigned. if the script contains with(timeout)\n // options then allow that value to override what's provided on the lifecycle\n final Optional<Long> timeoutDefinedInScript = GremlinScriptChecker.parse(script).getTimeout();\n final long scriptEvalTimeOut = timeoutDefinedInScript.orElse(\n lifeCycle.getEvaluationTimeoutOverride().orElse(evaluationTimeout));\n\n final CompletableFuture<Object> evaluationFuture = new CompletableFuture<>();\n final FutureTask<Void> evalFuture = new FutureTask<>(() -> {\n try {\n lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);\n\n logger.debug(\"Evaluating script - {} - in thread [{}]\", script, Thread.currentThread().getName());\n\n final Object o = gremlinScriptEngineManager.getEngineByName(lang).eval(script, bindings);\n\n // apply a transformation before sending back the result - useful when trying to force serialization\n // in the same thread that the eval took place given ThreadLocal nature of graphs as well as some\n // transactional constraints\n final Object result = lifeCycle.getTransformResult().isPresent() ?\n lifeCycle.getTransformResult().get().apply(o) : o;\n\n // a mechanism for taking the final result and doing something with it in the same thread, but\n // AFTER the eval and transform are done and that future completed. this provides a final means\n // for working with the result in the same thread as it was eval'd\n if (lifeCycle.getWithResult().isPresent()) lifeCycle.getWithResult().get().accept(result);\n\n lifeCycle.getAfterSuccess().orElse(afterSuccess).accept(bindings);\n\n // the evaluationFuture must be completed after all processing as an exception in lifecycle events\n // that must raise as an exception to the caller who has the returned evaluationFuture. in other words,\n // if it occurs before this point, then the handle() method won't be called again if there is an\n // exception that ends up below trying to completeExceptionally()\n evaluationFuture.complete(result);\n } catch (Throwable ex) {\n final Throwable root = null == ex.getCause() ? ex : ExceptionUtils.getRootCause(ex);\n\n // thread interruptions will typically come as the result of a timeout, so in those cases,\n // check for that situation and convert to TimeoutException\n if (root instanceof InterruptedException\n || root instanceof TraversalInterruptedException\n || root instanceof InterruptedIOException) {\n lifeCycle.getAfterTimeout().orElse(afterTimeout).accept(bindings, root);\n evaluationFuture.completeExceptionally(new TimeoutException(\n String.format(\"Evaluation exceeded the configured 'evaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]: %s\", scriptEvalTimeOut, script, root.getMessage())));\n } else {\n lifeCycle.getAfterFailure().orElse(afterFailure).accept(bindings, root);\n evaluationFuture.completeExceptionally(root);\n }\n }\n\n return null;\n });\n\n final WeakReference<CompletableFuture<Object>> evaluationFutureRef = new WeakReference<>(evaluationFuture);\n final Future<?> executionFuture = executorService.submit(evalFuture);\n if (scriptEvalTimeOut > 0) {\n // Schedule a timeout in the thread pool for future execution\n final ScheduledFuture<?> sf = scheduledExecutorService.schedule(() -> {\n if (executionFuture.cancel(true)) {\n final CompletableFuture<Object> ef = evaluationFutureRef.get();\n if (ef != null) {\n ef.completeExceptionally(new TimeoutException(\n String.format(\"Evaluation exceeded the configured 'evaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]\", scriptEvalTimeOut, script)));\n }\n }\n }, scriptEvalTimeOut, TimeUnit.MILLISECONDS);\n\n // Cancel the scheduled timeout if the eval future is complete or the script evaluation failed with exception\n evaluationFuture.handleAsync((v, t) -> {\n if (!sf.isDone()) {\n logger.debug(\"Killing scheduled timeout on script evaluation - {} - as the eval completed (possibly with exception).\", script);\n sf.cancel(true);\n }\n\n // no return is necessary - nothing downstream is concerned with what happens in here\n return null;\n }, scheduledExecutorService);\n }\n\n return evaluationFuture;\n }", "public Script build() {\n return new Script(scriptLanguage, scriptText);\n }", "public void createScript(final Script script, final String scriptName)\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName(\"nashorn\");\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (scriptEngine != null)\n\t\t\t{\n\t\t\t\tscript.setName(scriptName);\t\t\t\n\t\t\t\tscript.setStatusAndNotify(ScriptRunningState.NOT_STARTED);\n\t\t\t\tscript.setScriptEngine(scriptEngine);\t\t\n\t\t\t\t\n\t\t\t\tpopulateEngineVariables(script);\n\t\t\t\n//\t\t\tfinal MqttScriptIO scriptIO = new MqttScriptIO(connection, eventManager, script, executor); \n//\t\t\t//script.setScriptIO(scriptIO);\n//\t\t\t\n//\t\t\tfinal Map<String, Object> scriptVariables = new HashMap<String, Object>();\n//\t\t\t\n//\t\t\t// This should be considered deprecated\n//\t\t\tscriptVariables.put(\"mqttspy\", scriptIO);\n//\t\t\t// This should be used for general script-related actions\n//\t\t\tscriptVariables.put(\"spy\", scriptIO);\n//\t\t\t// Going forward, this should only have mqtt-specific elements, e.g. pub/sub\n//\t\t\tscriptVariables.put(\"mqtt\", scriptIO);\n//\t\t\t\n//\t\t\tscriptVariables.put(\"logger\", LoggerFactory.getLogger(ScriptRunner.class));\n//\t\t\t\n//\t\t\tfinal IMqttMessageLogIO mqttMessageLog = new MqttMessageLogIO();\n//\t\t\t// Add it to the script IO so that it gets stopped when requested\n//\t\t\tscript.addTask(mqttMessageLog);\t\t\t\n//\t\t\tscriptVariables.put(\"messageLog\", mqttMessageLog);\n//\t\t\t\n//\t\t\tputJavaVariablesIntoEngine(scriptEngine, scriptVariables);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new CriticalException(\"Cannot instantiate the nashorn javascript engine - most likely you don't have Java 8 installed. \"\n\t\t\t\t\t\t+ \"Please either disable scripts in your configuration file or install the appropriate JRE/JDK.\");\n\t\t\t}\n\t\t}\n\t\tcatch (SpyException e)\n\t\t{\n\t\t\tthrow new CriticalException(\"Cannot initialise the script objects\");\n\t\t}\n\t}", "public String execPHP(String scriptName, String param) {\n\n StringBuilder output = new StringBuilder();\n\n try {\n String line;\n\n Process p = Runtime.getRuntime().exec(\"php \" + scriptName + \" \" + param);\n BufferedReader input =\n new BufferedReader\n (new InputStreamReader(p.getInputStream()));\n while ((line = input.readLine()) != null) {\n output.append(line);\n }\n input.close();\n } catch (Exception err) {\n err.printStackTrace();\n }\n return output.toString();\n }", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws Exception;", "@Test\n\tpublic void test_001() {\n\t\tfinal String EXPECTED_RESPONSE = \"{\\\"hello\\\": \\\"world\\\"}\";\n\t\tJdProgramRequestParms.put(\"U$FUNZ\", new StringValue(\"URL\"));\n\t\tJdProgramRequestParms.put(\"U$METO\", new StringValue(\"HTTP\"));\n\t\tJdProgramRequestParms.put(\"U$SVARSK\", new StringValue(\"http://www.mocky.io/v2/5185415ba171ea3a00704eed\"));\n\n\t\tList<Value> responseParms = JdProgram.execute(javaSystemInterface, JdProgramRequestParms);\n\t\tassertTrue(responseParms.get(2).asString().getValue().equals(EXPECTED_RESPONSE));\n\t}", "@EventListener\n public void scriptResultWriting(ScriptLaunched scriptLaunched){\n Long id = scriptLaunched.getEventData();\n logger.info(\"script with id: \" + id + \" launched\");\n // run task for script with id\n }", "public ScriptResults execute(String command, long timeout) throws SmartFrogException {\n return null;\n }", "private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;", "ResponseEntity execute();", "public interface LuaScript {\n\n /**\n * Execute this script using the given Jedis connection\n * @param jedis the Jedis connection to use\n * @return the result object from the executed script\n * @see Jedis#eval(String)\n */\n Object exec(Jedis jedis);\n}", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "public String evaluate(final String jsExpression);", "public static Map<JsName, String> exec(JProgram jprogram, JsProgram program) {\n StringVisitor v = new StringVisitor(jprogram, program.getScope());\n v.accept(program);\n\n Map<Integer, SortedSet<JsStringLiteral>> bins = new HashMap<Integer, SortedSet<JsStringLiteral>>();\n for (int i = 0, j = program.getFragmentCount(); i < j; i++) {\n bins.put(i, new TreeSet<JsStringLiteral>(LITERAL_COMPARATOR));\n }\n for (Map.Entry<JsStringLiteral, Integer> entry : v.fragmentAssignment.entrySet()) {\n SortedSet<JsStringLiteral> set = bins.get(entry.getValue());\n assert set != null;\n set.add(entry.getKey());\n }\n\n for (Map.Entry<Integer, SortedSet<JsStringLiteral>> entry : bins.entrySet()) {\n createVars(program, program.getFragmentBlock(entry.getKey()),\n entry.getValue(), v.toCreate);\n }\n\n return reverse(v.toCreate);\n }", "@Test\n public void runScript() throws IllegalArgumentException {\n WebDriverCommandProcessor proc = new WebDriverCommandProcessor(\"http://localhost/\", manager.get());\n CommandFactory factory = new CommandFactory(proc);\n factory.newCommand(1, \"runScript\", \"alert('test')\");\n }", "CommandResult execute();", "Hojas eval();", "private String doScript(String node, String scriptTxt) throws IOException, ServletException {\n \n \t\tString output = \"[no output]\";\n \t\tif (node != null && scriptTxt != null) {\n \n \t\t\ttry {\n \n \t\t\t\tComputer comp = Hudson.getInstance().getComputer(node);\n\t\t\t\tif (comp == null) {\n \t\t\t\t\toutput = Messages.node_not_found(node);\n \t\t\t\t} else {\n \t\t\t\t\tif (comp.getChannel() == null) {\n \t\t\t\t\t\toutput = Messages.node_not_online(node);\n\t\t\t\t\t} else {\n \t\t\t\t\t\toutput = RemotingDiagnostics.executeGroovy(scriptTxt, comp.getChannel());\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t} catch (InterruptedException e) {\n \t\t\t\tthrow new ServletException(e);\n \t\t\t}\n \t\t}\n \t\treturn output;\n \n \t}" ]
[ "0.7043712", "0.6666381", "0.6263308", "0.6252719", "0.6066311", "0.5944648", "0.5942697", "0.5937885", "0.58959335", "0.58855164", "0.5606182", "0.55583113", "0.5549038", "0.5468481", "0.53671694", "0.5365798", "0.5351669", "0.52813536", "0.52797127", "0.5261356", "0.52533907", "0.52525866", "0.52255666", "0.5160045", "0.5142373", "0.51336133", "0.5087869", "0.508183", "0.50722367", "0.5049825", "0.5035307", "0.50053155", "0.49938026", "0.49147302", "0.4914673", "0.48938623", "0.48825195", "0.48797268", "0.48752293", "0.48531014", "0.4843514", "0.4840829", "0.4822911", "0.48176053", "0.4814117", "0.48120105", "0.4774095", "0.4763672", "0.4752237", "0.4751258", "0.47282848", "0.47245926", "0.46825713", "0.4681704", "0.46795836", "0.46627894", "0.46616787", "0.4645384", "0.46390614", "0.46299037", "0.46262607", "0.46245876", "0.4619876", "0.4619876", "0.4619876", "0.46197945", "0.46112093", "0.4595132", "0.45935392", "0.45785525", "0.4575454", "0.45660877", "0.45642704", "0.45528215", "0.45491576", "0.4510195", "0.45022607", "0.4495275", "0.44884634", "0.44829407", "0.4476256", "0.4476256", "0.4476256", "0.4472916", "0.44667417", "0.44650203", "0.4461522", "0.4449378", "0.4437133", "0.44304287", "0.44293547", "0.44293547", "0.44293547", "0.44293547", "0.44290632", "0.44223934", "0.44172248", "0.44009638", "0.43985862", "0.4390915" ]
0.7178094
0
Executes the given script and returns the result as a json string. If you still want to parse the json again, use the other execute method execute(String, Map).
@CompileStatic public String executeToJSON(String scriptName) throws NyException { return executeToJSON(scriptName, new HashMap<>()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@CompileStatic\n public String executeToJSON(String scriptName, Map<String, Object> data) throws NyException {\n Object result = execute(scriptName, data);\n if (result == null) {\n return null;\n } else {\n return JsonOutput.toJson(result);\n }\n }", "public Object executeScript(String command);", "@Override\n public String runOperation(CallingContext context, RaptureScript script, String ctx, Map<String, Object> params) {\n try {\n ScriptEngine engine = engineRef.get();\n CompiledScript cScript = getOperationScript(engine, script);\n addStandardContext(context, engine);\n engine.put(PARAMS, params);\n engine.put(CTX, ctx);\n Kernel.getKernel().getStat().registerRunScript();\n return JacksonUtil.jsonFromObject(cScript.eval());\n } catch (ScriptException e) {\n Kernel.writeAuditEntry(EXCEPTION, 2, e.getMessage());\n throw RaptureExceptionFactory.create(HttpURLConnection.HTTP_INTERNAL_ERROR, \"Error running script \" + script.getName(), e);\n }\n }", "Value eval(String script, String name, String contentType, boolean interactive) throws Exception;", "void executeScript(Readable script) throws IOException;", "public void executeCommand(String text) {\r\n JsonParser parser = new JsonParser();\r\n try {\r\n JsonObject o = (JsonObject) parser.parse(text);\r\n interpretJson(o);\r\n } catch (JsonSyntaxException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName, Map<String, Object> data) throws NyException {\n QScript script = null;\n try {\n script = parse(scriptName, data);\n return (T) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script);\n } catch (Exception ex) {\n if (ex instanceof NyException) {\n throw (NyException) ex;\n } else {\n throw new NyScriptExecutionException(\"Ny script execution error!\", ex);\n }\n } finally {\n if (script != null) {\n script.free();\n }\n }\n }", "public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "public Object processScriptResult(Object result) throws ScriptException;", "InternalResponseBehavior executeScript(ResourceConfig config, Map<String, Object> bindings);", "Object eval(String script, int keyCount, String... params);", "public CompletableFuture<Object> eval(final String script, final Bindings boundVars) {\n return eval(script, null, boundVars);\n }", "@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName) throws NyException {\n return (T) execute(scriptName, EMPTY_MAP);\n }", "public String execute(){\r\n\t\t\r\n\t\tString resultHtml = null;\r\n\t\tdebug(1,\"jsrpc start...\"+screenName+\" \"+rpcid); \r\n\t\tHashMap hm = jsrpcProcessBL(screenName);\r\n\t\tJSONObject jobj = new JSONObject(hm);\r\n\t\tresultHtml = jobj.toString();\r\n\t\tdebug(1,\"json result:\"+resultHtml);\r\n\t\tinputStream = new StringBufferInputStream(resultHtml);\r\n\t\treturn SUCCESS;\r\n\t}", "public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }", "com.google.protobuf.ByteString getScript();", "private static Object executeJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing javascript: \" + script);\n return ((JavascriptExecutor) driver).executeScript(script);\n }", "@CompileStatic\n public QScript parse(String scriptName, Map<String, Object> data) throws NyException {\n QSession qSession = QSession.create(configurations, scriptName);\n if (data != null) {\n qSession.getSessionVariables().putAll(data);\n }\n return configurations.getRepositoryRegistry().defaultRepository().parse(scriptName, qSession);\n }", "default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }", "default Value eval(String script) throws Exception {\n return eval(script, false);\n }", "private Result processScript() throws IOException, HsqlException {\n\n String token = tokenizer.getString();\n ScriptWriterText dsw = null;\n\n session.checkAdmin();\n\n try {\n if (tokenizer.wasValue()) {\n if (tokenizer.getType() != Types.VARCHAR) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n dsw = new ScriptWriterText(database, token, true, true, true);\n\n dsw.writeAll();\n\n return new Result(ResultConstants.UPDATECOUNT);\n } else {\n tokenizer.back();\n\n return DatabaseScript.getScript(database, false);\n }\n } finally {\n if (dsw != null) {\n dsw.close();\n }\n }\n }", "public String parse(String jsonLine) throws JSONException {\n JSONObject jsonObject = new JSONObject(jsonLine);\n jsonObject = new JSONObject(jsonObject.getString(\"output\"));\n String result = jsonObject.getString(\"result\");\n return result;\n }", "<T> T runGroovyScript(String name, Map<String, Object> context);", "@Override\n public void execute(final ExecutionParameters parameters) {\n logger.info(\"About to execute Groovy code\");\n\n // contains action's configuration\n final JsonObject configuration = parameters.getConfiguration();\n\n // access the value of the mapped value into name field of the in-metadata\n final JsonString code = configuration.getJsonString(\"code\");\n if (code == null) {\n throw new IllegalStateException(\"Code is required\");\n }\n final Binding binding = new Binding();\n binding.setProperty(\"parameters\", parameters);\n binding.setProperty(\"logger\", logger);\n\n final ImportCustomizer importCustomizer = new ImportCustomizer();\n importCustomizer.addStarImports(\n \"io.elastic.api\",\n \"org.slf4j\",\n \"javax.json\",\n \"javax.ws.rs.client\",\n \"javax.ws.rs.core\"\n );\n\n final CompilerConfiguration compilerConfiguration = new CompilerConfiguration();\n compilerConfiguration.addCompilationCustomizers(importCustomizer);\n\n final GroovyShell shell = new GroovyShell(getClass().getClassLoader(), binding, compilerConfiguration);\n\n final Script script = shell.parse(new StringReader(code.getString()));\n\n final Object result = script.run();\n\n if (result instanceof Message) {\n\n logger.info(\"Emitting data\");\n\n // emitting the message to the platform\n parameters.getEventEmitter().emitData((Message) result);\n }\n }", "public String getScriptAsString() {\n return this.script;\n }", "@Override\r\n public void asyncExecute(String script)\r\n {\n\r\n }", "@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}", "public abstract void runScript() throws Exception;", "R execute();", "private int executeScript() throws ServerException {\r\n\t\tCGIOutputStreamReader cin = new CGIHandler().sendScript( request );\r\n\t\tBufferedOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tint headerStringLen = cin.getHeaderStringSize();\r\n\t\t\tbyte[] content = cin.readBodyContent();\r\n\t\t\tint contentLength = content.length - headerStringLen;\r\n\t\t\tString headerMessage = createBasicHeaderMessage( ResponseTable.OK ).buildContentLength(\r\n\t\t\t\t\tcontentLength ).toString();\r\n\r\n\t\t\tout = new BufferedOutputStream( outStream );\r\n\t\t\tout.write( headerMessage.getBytes( \"UTF-8\" ) );\r\n\t\t\tout.write( content );\r\n\t\t\tout.flush();\r\n\t\t\treturn ResponseTable.OK;\r\n\r\n\t\t} catch ( IOException ioe ) {\r\n\t\t\tioe.printStackTrace();\r\n\t\t\tthrow new ServerException( ResponseTable.INTERNAL_SERVER_ERROR );\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tcin.close();\r\n\t\t\t} catch ( Exception ioe ) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic JsonElement execute(String json) throws ServerInvalidRequestException {\n\t\treturn null;\n\t}", "@Override\r\n public String evaluateScriptOutput() throws IOException {\r\n return getPythonHandler().getPythonOutput();\r\n }", "void loadScript(URL url) throws IOException, ScriptRunnerException;", "@Override\r\n public void syncExecute(String script)\r\n {\n\r\n }", "@Override\n\t\tpublic String execute(String line) {\n\t\t\tString[] command = line.split(\" \"); \n\t\t\tJCommander.newBuilder()\n\t\t\t .addObject(settings)\n\t\t\t .build()\n\t\t\t .parse(command);\n\t\t\t\n\t\t\treturn settings.execute();\n\t\t}", "public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }", "public static Analytic pyEval(Script script) throws ScriptException {\n List<Analytic> analytics = Lists.newArrayListWithCapacity(1);\n PySystemState engineSys = new PySystemState();\n PyObject builtins = engineSys.getBuiltins();\n builtins.__setitem__(\"_script\", Py.java2py(script));\n builtins.__setitem__(\"_analytics\", Py.java2py(analytics));\n Py.setSystemState(engineSys);\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new PyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"python\");\n Bindings bindings = new SimpleBindings();\n engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n\n return analytics.get(0);\n }", "public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }", "private String getCreateRunScript(ActionURL url, boolean isOutput)\n {\n return DataRegion.getJavaScriptObjectReference(getDataRegionName()) +\n \".getSelected({success: \" + getSelectedScript(url, isOutput) + \"});\";\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void execute(JobExecutionContext context)\n\t\t\tthrows JobExecutionException {\n\t\tJobDataMap map = context.getJobDetail().getJobDataMap();\n\t\tString json = map.getString(getArg());\n\t\tif(json==null){\n\t\t\techo(\"json is null\");\n\t\t\treturn ;\n\t\t}\n\t\tMsg = JSON.parseObject(json, Map.class);\n\t\t\t\t\n\t\tSendEmail();\n\t}", "public IRubyObject runScriptBody(Script script) {\n ThreadContext context = getCurrentContext();\n \n try {\n return script.__file__(context, getTopSelf(), Block.NULL_BLOCK);\n } catch (JumpException.ReturnJump rj) {\n return (IRubyObject) rj.getValue();\n }\n }", "public static Analytic rubyEval(Script script) throws ScriptException {\n System.setProperty(\"org.jruby.embed.localcontext.scope\", \"singleton\");\n System.setProperty(\"org.jruby.embed.compat.version\", \"JRuby1.9\");\n // keep local variables around between calls to eval\n System.setProperty(\"org.jruby.embed.localvariable.behavior\", \"persistent\");\n // make sure object hashing is consistent across all JVM instances, PR #640\n System.setProperty(\"jruby.consistent.hashing\", \"true\");\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new RubyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"jruby\");\n Bindings bindings = new SimpleBindings();\n bindings.put(\"$SCRIPT\", script);\n return (Analytic) engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n }", "private String executeRequest(URL url, String json, boolean post) throws IOException{\n\t\tURLConnection urlConnection = url.openConnection();\n\t\turlConnection.setDoOutput(post); //false if post\n\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\turlConnection.connect();\n\t\tOutputStream outputStream = urlConnection.getOutputStream();\n\t\toutputStream.write((json).getBytes(\"UTF-8\"));\n\t\toutputStream.flush();\n\t\t\n\t\t//Get Response\n InputStream in = urlConnection.getInputStream();\n BufferedReader rd = new BufferedReader(new InputStreamReader(in));\n String line;\n StringBuffer response = new StringBuffer();\n while((line = rd.readLine()) != null) {\n response.append(line);\n response.append('\\r');\n }\n rd.close();\n return response.toString();\n\t}", "Script createScript();", "private static Object executeAsyncJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing Async javascript: \" + script);\n return ((JavascriptExecutor) driver).executeAsyncScript(script);\n }", "private void runScript(String script) throws IOException, InterruptedException, RootToolsException, TimeoutException {\r\n\r\n// File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n//\r\n// File f = new File(tmpFolder, TEMP_SCRIPT);\r\n// f.setExecutable(true);\r\n// f.deleteOnExit();\r\n//\r\n// // Write the script to be executed\r\n// PrintWriter out = new PrintWriter(new FileOutputStream(f));\r\n// if (new File(\"/system/bin/sh\").exists()) {\r\n// out.write(\"#!/system/bin/sh\\n\");\r\n// }\r\n// out.write(script);\r\n// if (!script.endsWith(\"\\n\")) {\r\n// out.write(\"\\n\");\r\n// }\r\n// out.write(\"exit\\n\");\r\n// out.flush();\r\n// out.close();\r\n\r\n Log.d(this.getClass().getSimpleName(), \"Requesting file execution\");\r\n// Process exec = Runtime.getRuntime().exec(\"su -c \" + f.getAbsolutePath());\r\n// int res = exec.waitFor();\r\n// Toast.makeText(ctx, \"result: \" + res, Toast.LENGTH_LONG).show();\r\n \r\n// if (res != 0) {\r\n// ExceptionHandler.handle(this, R.string.error_script_loading, ctx);\r\n// }\r\n \r\n\r\n if (RootTools.isAccessGiven()) {\r\n List<String> output = RootTools.sendShell(script, SCRIPT_MAX_TIMEOUT);\r\n Log.d(\"\" + this, \"\" + output);\r\n }\r\n }", "public String getScript() {\n return script;\n }", "private String executeRequest(String url) throws Exception {\n\t\t//final String METHODNAME = \"executeRequest\";\n\t\tString responseString = null;\n\t\t\n\t\tHttpURLConnection conn = null;\n\t\ttry{\n\t\t\tif(url != null){\n\t\t\t\tURL jsonURL = new URL(url);\n\t\t\t\tconn = (HttpURLConnection)jsonURL.openConnection();\n\t\t\t\tconn.setConnectTimeout(2000);\n\t\t\t\tconn.setReadTimeout(2000);\n\t\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\t\t\n\t\t\t\tInputStream in = new BufferedInputStream(conn.getInputStream());\n\t\t\t\tresponseString = org.apache.commons.io.IOUtils.toString(in, \"UTF-8\");\n\t\t\t}\n\t\t}\n\t\tcatch(IOException io){\n\t\t\tio.printStackTrace();\n\t\t\tlog.severe(\"Failed calling json service IO Error: \" + url + \" - \" + io.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Failed calling json service: \" + url + \" - \" + e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.disconnect();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn responseString;\n\t}", "public static String executeScript(WebDriver driver, String script) {\n\t JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;\n\t return (String) jsExecutor.executeScript(script);\n\t }", "protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }", "String getScript() throws Exception {\n StringBuilder script = new StringBuilder();\n script.append(\"node('\" + remote.getNodeName() + \"') {\\n\");\n script.append(String.format(\"currentBuild.result = '%s'\\n\", this.result));\n script.append(\"step ([$class: 'CoberturaPublisher', \");\n script.append(\"coberturaReportFile: '**/coverage.xml', \");\n script.append(String.format(\"onlyStable: %s, \", this.onlyStable.toString()));\n script.append(String.format(\"failUnhealthy: %s, \", this.failUnhealthy.toString()));\n script.append(String.format(\"failUnstable: %s, \", this.failUnstable.toString()));\n if (this.lineCoverage != null) {\n script.append(String.format(\"lineCoverageTargets: '%s', \", this.lineCoverage));\n }\n if (this.branchCoverage != null) {\n script.append(String.format(\"conditionalCoverageTargets: '%s', \", this.branchCoverage));\n }\n if (this.fileCoverage != null) {\n script.append(String.format(\"fileCoverageTargets: '%s', \", this.fileCoverage));\t\t\t\t\n }\n if (this.packageCoverage != null) {\n script.append(String.format(\"packageCoverageTargets: '%s', \", this.packageCoverage));\t\t\t\t\n }\n if (this.classCoverage != null) {\n script.append(String.format(\"classCoverageTargets: '%s', \", this.classCoverage));\t\t\t\t\n }\n if (this.methodCoverage != null) {\n script.append(String.format(\"methodCoverageTargets: '%s', \", this.methodCoverage));\t\t\t\t\n }\n script.append(\"sourceEncoding: 'ASCII'])\\n\");\n script.append(\"}\");\n return script.toString();\n }", "@Test\n public void CloudScriptServer()\n {\n PlayFabServerModels.LoginWithServerCustomIdRequest customIdReq = new PlayFabServerModels.LoginWithServerCustomIdRequest();\n customIdReq.CreateAccount = true;\n customIdReq.ServerCustomId = PlayFabSettings.BuildIdentifier;\n PlayFabResult<PlayFabServerModels.ServerLoginResult> loginRes = PlayFabServerAPI.LoginWithServerCustomId(customIdReq);\n assertNotNull(loginRes.Result);\n PlayFabServerModels.ExecuteCloudScriptServerRequest hwRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n hwRequest.FunctionName = \"helloWorld\";\n hwRequest.PlayFabId = loginRes.Result.PlayFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> hwResult = PlayFabServerAPI.ExecuteCloudScript(hwRequest);\n assertNotNull(hwResult.Result.FunctionResult);\n Map<String, String> arbitraryResults = (Map<String, String>)hwResult.Result.FunctionResult;\n assertEquals(arbitraryResults.get(\"messageValue\"), \"Hello \" + loginRes.Result.PlayFabId + \"!\");\n }", "public String getScriptExecution() {\n StringBuffer script = new StringBuffer(\"#!/bin/bash\\n\");\n script.append(\"if [ $# -ne \" + workflowInputTypeStates.size() + \" ]\\n\\tthen\\n\");\n script\n .append(\"\\t\\techo \\\"\" + workflowInputTypeStates.size() + \" argument(s) expected.\\\"\\n\\t\\texit\\nfi\\n\");\n int in = 1;\n for (TypeNode input : workflowInputTypeStates) {\n script.append(input.getShortNodeID() + \"=$\" + (in++) + \"\\n\");\n }\n script.append(\"\\n\");\n for (ModuleNode operation : moduleNodes) {\n String code = operation.getUsedModule().getExecutionCode();\n if (code == null || code.equals(\"\")) {\n script.append(\"\\\"Error. Tool '\" + operation.getNodeLabel() + \"' is missing the execution code.\\\"\")\n .append(\"\\n\");\n } else {\n for (int i = 0; i < operation.getInputTypes().size(); i++) {\n code = code.replace(\"@input[\" + i + \"]\", operation.getInputTypes().get(i).getShortNodeID());\n }\n for (int i = 0; i < operation.getOutputTypes().size(); i++) {\n code = code.replace(\"@output[\" + i + \"]\", operation.getOutputTypes().get(i).getShortNodeID());\n }\n script.append(code).append(\"\\n\");\n }\n }\n int out = 1;\n for (TypeNode output : workflowOutputTypeStates) {\n script.append(\"echo \\\"\" + (out++) + \". output is: $\" + output.getShortNodeID() + \"\\\"\");\n }\n\n return script.toString();\n }", "public interface ScriptBinding\n{\n /**\n * Returns the list of variables this ScriptBinding provides, mapped by variable name.\n * @return The list of variables, or null if no variable is provided.\n */\n public Map<String, Object> getVariables();\n \n /**\n * Returns the list of variables descriptions, mapped by variable name.\n * This list does not have to match the getVariables return value, but the description is used to inform the user of the existence and usability of each variable.\n * @return The list of variables descriptions, or null if no description is provided.\n */\n public Map<String, I18nizableText> getVariablesDescriptions();\n\n /**\n * Allows clean up of variables created during the getVariables call.\n * @param variables The map of variables.\n */\n public void cleanVariables(Map<String, Object> variables);\n \n /**\n * Returns the JavaScript functions to inject at the start of the script, in the form of a single String prepended to the script.\n * @return The functions text, or null if no function is provided.\n */\n public String getFunctions();\n \n /**\n * Returns the list of functions descriptions, mapped by function name.\n * This list does not have to match the functions returned by getFunctions, but the description is used to inform the user of the existence and usability of each function.\n * @return The list of functions descriptions, or null if no description is provided.\n */\n public Map<String, I18nizableText> getFunctionsDescriptions();\n \n /**\n * Process the script result if there are any specificities for this console data.\n * @param result The result\n * @return The result processed, or null if this console data does not have any processing to do. \n * @throws ScriptException If a processing error occurs.\n */\n public Object processScriptResult(Object result) throws ScriptException;\n}", "private String js() throws IOException {\n String outputLine;\n File path = new File(\"src/main/resources/app.js\");\n FileReader fileReader = new FileReader(path);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n outputLine = \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/javascript \\r\\n\"\n + \"\\r\\n\";\n String inputLine;\n while ((inputLine=bufferedReader.readLine()) != null){\n outputLine += inputLine + \"\\n\";\n }\n return outputLine;\n }", "private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }", "public String execute() {\n\t\t\n\t\tjobs = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> job = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n\t\tjob = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n \n\t\treturn \"SUCCESS\";\n \n\t}", "@Test\r\n\tpublic void jsopathTest() {\r\n\t\tSystem.err.println(\"Execute: \" + expression);\r\n\t\tString value = (String) executeScript(\"return \" + expression);\r\n\t\tassertThat(value, is(\"Downloads\"));\r\n\t\tSystem.err.println(\"Result value: \" + value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getScript() {\n return script_;\n }", "public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }", "public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}", "ExecutionResult<Void> execute();", "String getJson();", "String getJson();", "String getJson();", "public interface ExecuteScriptCallback extends CallbackBase {\n\n /**\n * Override this method with the code you want to run after executing script service\n *\n * @param data Result to script\n * @param e NCMBException from NIFTY Cloud mobile backend\n */\n void done(byte[] data, NCMBException e);\n}", "@Override\n protected String doInBackground(Void... params) {\n\n try {\n URL url = new URL(\"http://web-app.usc.edu/maps/all_map_data2.js\");\n HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // connection\n\n conn.setRequestMethod(\"GET\"); // Get method\n\n int responseCode = conn.getResponseCode(); // get response code\n Log.e(\"responseCode\", Integer.toString(responseCode));\n\n InputStreamReader tmp = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n\n // TODO: not found check\n BufferedReader reader = new BufferedReader(tmp);\n StringBuilder builder = new StringBuilder();\n String str;\n while ((str = reader.readLine()) != null) {\n builder.append(str + \"\\n\");\n }\n\n Log.e(\"jsonStr\", builder.toString());\n return builder.toString();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }", "default Value eval(String script, String name, boolean literal) throws Exception {\n if (name.endsWith(\".mjs\")) {\n return eval(script, name, \"application/javascript+module\", literal);\n } else {\n return eval(script, name, \"application/javascript\", literal);\n }\n }", "@CompileStatic\n public QScript parse(String scriptName) throws NyException {\n return parse(scriptName, EMPTY_MAP);\n }", "protected Object execScript(String call) {\r\n if (call==null||call.length()==0)\r\n return null;\r\n Desktop desktop = getDesktop();\r\n Object client = desktop.getClient();\r\n Doc doc = desktop.getDoc();\r\n \r\n int left = call.indexOf('(');\r\n String name = call.substring(0, left);\r\n String args = call.substring(left+1, call.length()-1);\r\n \r\n try {\r\n Object[] params;\r\n if (args.trim().length()==0)\r\n params = null;\r\n else\r\n params = Doc.parseParameters(doc, this, args);\r\n Method m = Doc.findMethod(client, name, params);\r\n return Doc.invokeMethod(m, client, params);\r\n } catch (OxyException e) {\r\n Desktop.warn(\"error invoking method \"+name+\" with args: \"+args, e);\r\n return null;\r\n }\r\n }", "String getJSON();", "private Map<String, String> populate(Map<String, String> argsMap) throws IOException, TaskExecutionException {\n\n SimpleHttpClient httpClient = SimpleHttpClient.builder(argsMap).build();\n try {\n String url = UrlBuilder.builder(argsMap).path(argsMap.get(\"location\")).build();\n Response response = httpClient.target(url).get();\n String responseBody = response.string();\n String header = response.getHeader(\"Content-Type\");\n\n Map<String, String> resultMap = null;\n if (header != null && header.contains(\"application/json\")) {\n resultMap = parsePlusStatsResult(responseBody);\n } else if (header != null && header.contains(\"text/plain\")) {\n resultMap = parseStubStatsResults(responseBody);\n } else {\n logger.error(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n throw new TaskExecutionException(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n }\n return resultMap;\n } finally {\n httpClient.close();\n }\n }", "public StaticScript script(String script) {\n this.script = script;\n return this;\n }", "@Override\n public void execute(String commandText) throws Exception {\n parse(commandText);\n }", "public abstract boolean execute(Condition condition, Map<String, String> executionParameterMap, Grant grant);", "public CompletableFuture<Object> eval(final String script, final String language, final Bindings boundVars, final LifeCycle lifeCycle) {\n final String lang = Optional.ofNullable(language).orElse(\"gremlin-groovy\");\n\n if (logger.isDebugEnabled()) {\n logger.debug(\"Preparing to evaluate script - {} - in thread [{}]\", script, Thread.currentThread().getName());\n }\n\n final Bindings bindings = new SimpleBindings();\n bindings.putAll(globalBindings);\n bindings.putAll(boundVars);\n\n // override the timeout if the lifecycle has a value assigned. if the script contains with(timeout)\n // options then allow that value to override what's provided on the lifecycle\n final Optional<Long> timeoutDefinedInScript = GremlinScriptChecker.parse(script).getTimeout();\n final long scriptEvalTimeOut = timeoutDefinedInScript.orElse(\n lifeCycle.getEvaluationTimeoutOverride().orElse(evaluationTimeout));\n\n final CompletableFuture<Object> evaluationFuture = new CompletableFuture<>();\n final FutureTask<Void> evalFuture = new FutureTask<>(() -> {\n try {\n lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);\n\n logger.debug(\"Evaluating script - {} - in thread [{}]\", script, Thread.currentThread().getName());\n\n final Object o = gremlinScriptEngineManager.getEngineByName(lang).eval(script, bindings);\n\n // apply a transformation before sending back the result - useful when trying to force serialization\n // in the same thread that the eval took place given ThreadLocal nature of graphs as well as some\n // transactional constraints\n final Object result = lifeCycle.getTransformResult().isPresent() ?\n lifeCycle.getTransformResult().get().apply(o) : o;\n\n // a mechanism for taking the final result and doing something with it in the same thread, but\n // AFTER the eval and transform are done and that future completed. this provides a final means\n // for working with the result in the same thread as it was eval'd\n if (lifeCycle.getWithResult().isPresent()) lifeCycle.getWithResult().get().accept(result);\n\n lifeCycle.getAfterSuccess().orElse(afterSuccess).accept(bindings);\n\n // the evaluationFuture must be completed after all processing as an exception in lifecycle events\n // that must raise as an exception to the caller who has the returned evaluationFuture. in other words,\n // if it occurs before this point, then the handle() method won't be called again if there is an\n // exception that ends up below trying to completeExceptionally()\n evaluationFuture.complete(result);\n } catch (Throwable ex) {\n final Throwable root = null == ex.getCause() ? ex : ExceptionUtils.getRootCause(ex);\n\n // thread interruptions will typically come as the result of a timeout, so in those cases,\n // check for that situation and convert to TimeoutException\n if (root instanceof InterruptedException\n || root instanceof TraversalInterruptedException\n || root instanceof InterruptedIOException) {\n lifeCycle.getAfterTimeout().orElse(afterTimeout).accept(bindings, root);\n evaluationFuture.completeExceptionally(new TimeoutException(\n String.format(\"Evaluation exceeded the configured 'evaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]: %s\", scriptEvalTimeOut, script, root.getMessage())));\n } else {\n lifeCycle.getAfterFailure().orElse(afterFailure).accept(bindings, root);\n evaluationFuture.completeExceptionally(root);\n }\n }\n\n return null;\n });\n\n final WeakReference<CompletableFuture<Object>> evaluationFutureRef = new WeakReference<>(evaluationFuture);\n final Future<?> executionFuture = executorService.submit(evalFuture);\n if (scriptEvalTimeOut > 0) {\n // Schedule a timeout in the thread pool for future execution\n final ScheduledFuture<?> sf = scheduledExecutorService.schedule(() -> {\n if (executionFuture.cancel(true)) {\n final CompletableFuture<Object> ef = evaluationFutureRef.get();\n if (ef != null) {\n ef.completeExceptionally(new TimeoutException(\n String.format(\"Evaluation exceeded the configured 'evaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]\", scriptEvalTimeOut, script)));\n }\n }\n }, scriptEvalTimeOut, TimeUnit.MILLISECONDS);\n\n // Cancel the scheduled timeout if the eval future is complete or the script evaluation failed with exception\n evaluationFuture.handleAsync((v, t) -> {\n if (!sf.isDone()) {\n logger.debug(\"Killing scheduled timeout on script evaluation - {} - as the eval completed (possibly with exception).\", script);\n sf.cancel(true);\n }\n\n // no return is necessary - nothing downstream is concerned with what happens in here\n return null;\n }, scheduledExecutorService);\n }\n\n return evaluationFuture;\n }", "public Script build() {\n return new Script(scriptLanguage, scriptText);\n }", "public void createScript(final Script script, final String scriptName)\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName(\"nashorn\");\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (scriptEngine != null)\n\t\t\t{\n\t\t\t\tscript.setName(scriptName);\t\t\t\n\t\t\t\tscript.setStatusAndNotify(ScriptRunningState.NOT_STARTED);\n\t\t\t\tscript.setScriptEngine(scriptEngine);\t\t\n\t\t\t\t\n\t\t\t\tpopulateEngineVariables(script);\n\t\t\t\n//\t\t\tfinal MqttScriptIO scriptIO = new MqttScriptIO(connection, eventManager, script, executor); \n//\t\t\t//script.setScriptIO(scriptIO);\n//\t\t\t\n//\t\t\tfinal Map<String, Object> scriptVariables = new HashMap<String, Object>();\n//\t\t\t\n//\t\t\t// This should be considered deprecated\n//\t\t\tscriptVariables.put(\"mqttspy\", scriptIO);\n//\t\t\t// This should be used for general script-related actions\n//\t\t\tscriptVariables.put(\"spy\", scriptIO);\n//\t\t\t// Going forward, this should only have mqtt-specific elements, e.g. pub/sub\n//\t\t\tscriptVariables.put(\"mqtt\", scriptIO);\n//\t\t\t\n//\t\t\tscriptVariables.put(\"logger\", LoggerFactory.getLogger(ScriptRunner.class));\n//\t\t\t\n//\t\t\tfinal IMqttMessageLogIO mqttMessageLog = new MqttMessageLogIO();\n//\t\t\t// Add it to the script IO so that it gets stopped when requested\n//\t\t\tscript.addTask(mqttMessageLog);\t\t\t\n//\t\t\tscriptVariables.put(\"messageLog\", mqttMessageLog);\n//\t\t\t\n//\t\t\tputJavaVariablesIntoEngine(scriptEngine, scriptVariables);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new CriticalException(\"Cannot instantiate the nashorn javascript engine - most likely you don't have Java 8 installed. \"\n\t\t\t\t\t\t+ \"Please either disable scripts in your configuration file or install the appropriate JRE/JDK.\");\n\t\t\t}\n\t\t}\n\t\tcatch (SpyException e)\n\t\t{\n\t\t\tthrow new CriticalException(\"Cannot initialise the script objects\");\n\t\t}\n\t}", "public String execPHP(String scriptName, String param) {\n\n StringBuilder output = new StringBuilder();\n\n try {\n String line;\n\n Process p = Runtime.getRuntime().exec(\"php \" + scriptName + \" \" + param);\n BufferedReader input =\n new BufferedReader\n (new InputStreamReader(p.getInputStream()));\n while ((line = input.readLine()) != null) {\n output.append(line);\n }\n input.close();\n } catch (Exception err) {\n err.printStackTrace();\n }\n return output.toString();\n }", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws Exception;", "@Test\n\tpublic void test_001() {\n\t\tfinal String EXPECTED_RESPONSE = \"{\\\"hello\\\": \\\"world\\\"}\";\n\t\tJdProgramRequestParms.put(\"U$FUNZ\", new StringValue(\"URL\"));\n\t\tJdProgramRequestParms.put(\"U$METO\", new StringValue(\"HTTP\"));\n\t\tJdProgramRequestParms.put(\"U$SVARSK\", new StringValue(\"http://www.mocky.io/v2/5185415ba171ea3a00704eed\"));\n\n\t\tList<Value> responseParms = JdProgram.execute(javaSystemInterface, JdProgramRequestParms);\n\t\tassertTrue(responseParms.get(2).asString().getValue().equals(EXPECTED_RESPONSE));\n\t}", "@EventListener\n public void scriptResultWriting(ScriptLaunched scriptLaunched){\n Long id = scriptLaunched.getEventData();\n logger.info(\"script with id: \" + id + \" launched\");\n // run task for script with id\n }", "public ScriptResults execute(String command, long timeout) throws SmartFrogException {\n return null;\n }", "private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;", "ResponseEntity execute();", "public interface LuaScript {\n\n /**\n * Execute this script using the given Jedis connection\n * @param jedis the Jedis connection to use\n * @return the result object from the executed script\n * @see Jedis#eval(String)\n */\n Object exec(Jedis jedis);\n}", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "public String evaluate(final String jsExpression);", "public static Map<JsName, String> exec(JProgram jprogram, JsProgram program) {\n StringVisitor v = new StringVisitor(jprogram, program.getScope());\n v.accept(program);\n\n Map<Integer, SortedSet<JsStringLiteral>> bins = new HashMap<Integer, SortedSet<JsStringLiteral>>();\n for (int i = 0, j = program.getFragmentCount(); i < j; i++) {\n bins.put(i, new TreeSet<JsStringLiteral>(LITERAL_COMPARATOR));\n }\n for (Map.Entry<JsStringLiteral, Integer> entry : v.fragmentAssignment.entrySet()) {\n SortedSet<JsStringLiteral> set = bins.get(entry.getValue());\n assert set != null;\n set.add(entry.getKey());\n }\n\n for (Map.Entry<Integer, SortedSet<JsStringLiteral>> entry : bins.entrySet()) {\n createVars(program, program.getFragmentBlock(entry.getKey()),\n entry.getValue(), v.toCreate);\n }\n\n return reverse(v.toCreate);\n }", "@Test\n public void runScript() throws IllegalArgumentException {\n WebDriverCommandProcessor proc = new WebDriverCommandProcessor(\"http://localhost/\", manager.get());\n CommandFactory factory = new CommandFactory(proc);\n factory.newCommand(1, \"runScript\", \"alert('test')\");\n }", "CommandResult execute();", "Hojas eval();", "private String doScript(String node, String scriptTxt) throws IOException, ServletException {\n \n \t\tString output = \"[no output]\";\n \t\tif (node != null && scriptTxt != null) {\n \n \t\t\ttry {\n \n \t\t\t\tComputer comp = Hudson.getInstance().getComputer(node);\n\t\t\t\tif (comp == null) {\n \t\t\t\t\toutput = Messages.node_not_found(node);\n \t\t\t\t} else {\n \t\t\t\t\tif (comp.getChannel() == null) {\n \t\t\t\t\t\toutput = Messages.node_not_online(node);\n\t\t\t\t\t} else {\n \t\t\t\t\t\toutput = RemotingDiagnostics.executeGroovy(scriptTxt, comp.getChannel());\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t} catch (InterruptedException e) {\n \t\t\t\tthrow new ServletException(e);\n \t\t\t}\n \t\t}\n \t\treturn output;\n \n \t}" ]
[ "0.71768874", "0.66661125", "0.6263639", "0.6251904", "0.60662246", "0.5943734", "0.59423083", "0.59371006", "0.5895136", "0.58837545", "0.56067693", "0.5557971", "0.55492157", "0.5467602", "0.5366255", "0.53649235", "0.53509593", "0.5281259", "0.5278549", "0.5260409", "0.5251614", "0.52515054", "0.52238387", "0.5161091", "0.5141324", "0.51329076", "0.5088383", "0.50806814", "0.5072862", "0.50495344", "0.5034752", "0.50042135", "0.4992727", "0.49159467", "0.49146438", "0.48927385", "0.48820364", "0.48795563", "0.4874902", "0.48525715", "0.4843909", "0.48403805", "0.48230416", "0.4818", "0.48141384", "0.48122287", "0.4774498", "0.47632748", "0.47520837", "0.47511083", "0.4728223", "0.4723834", "0.4682009", "0.46811", "0.46798038", "0.46626905", "0.46617922", "0.4645052", "0.46380827", "0.46293208", "0.46251792", "0.4624944", "0.46193144", "0.46188146", "0.46188146", "0.46188146", "0.46120134", "0.45952207", "0.45933548", "0.4576965", "0.45747113", "0.45652324", "0.4564985", "0.45526522", "0.45485568", "0.45109272", "0.45024437", "0.4494487", "0.44885093", "0.4482361", "0.44753045", "0.44753045", "0.44753045", "0.4472107", "0.4467164", "0.44646502", "0.4460699", "0.4448725", "0.44367152", "0.44299746", "0.44289947", "0.44289947", "0.44289947", "0.44289947", "0.44278792", "0.44203", "0.44178173", "0.43999952", "0.4396997", "0.439009" ]
0.7042267
1
Programmatically (using API) do some sequence of operations inside a transaction. This would be useful, specially if you don't want to script your transaction logic externally. In case of an exception, transaction will be rollback automatically, but will throw the exception. Always use the provided nyql instance to execute scripts at all.
@CompileStatic public <T> T doTransaction(String transactionName, BiFunction<NyQLInstance, Map<String, Object>, T> body, Map<String, Object> data, boolean autoCommit) throws NyException { QExecutor executor = null; try (QSession qSession = QSession.create(configurations, transactionName)) { executor = qSession.getExecutor(); executor.startTransaction(); T result = body.apply(this, data); if (autoCommit) { executor.commit(); } return result; } catch (Exception ex) { if (executor != null) { executor.rollback(null); } throw new NyException("An exception occurred inside transaction '$transactionName'!", ex); } finally { if (executor != null) { executor.done(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VisibleForTesting\n public void executeTransaction(ClientTransaction transaction) {\n transaction.preExecute(this);\n getTransactionExecutor().execute(transaction);\n transaction.recycle();\n }", "Transaction beginTx();", "void beginTransaction();", "public void beginTransaction() throws Exception;", "IDbTransaction beginTransaction();", "void commitTransaction();", "public interface Transaction {\n void Execute();\n}", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "void rollbackTransaction();", "void startTransaction();", "void commit(Transaction transaction);", "public void runInTransaction(TransactionalAction callback) {\n EntityManager em = getEntityManager();\n try {\n em.getTransaction().begin();\n callback.run(em, new DaoFactory(em));\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }", "Transaction createTransaction();", "void rollback(Transaction transaction);", "void beginTransaction(ConnectionContext context) throws IOException;", "public void beginTransaction() {\n\r\n\t}", "void rollback() {\r\n tx.rollback();\r\n tx = new Transaction();\r\n }", "public void createTransaction(Transaction trans);", "public void rollbackTx()\n\n{\n\n}", "private void commitTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().commit();\n }\n }", "public void DoTransaction(TransactionCallback callback) {\r\n Transaction tx = _db.beginTx();\r\n try {\r\n callback.doTransaction();\r\n tx.success();\r\n } catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Failed to do callback transaction.\");\r\n\t\t\tex.printStackTrace();\r\n\t\t\ttx.failure();\r\n\t\t} finally {\r\n\t\t\ttx.finish();\r\n tx.close();\r\n\t\t}\r\n }", "public int startTransaction();", "IDbTransaction beginTransaction(IsolationLevel il);", "protected abstract Transaction createAndAdd();", "@Test\n public void shouldExecuteTransactions() {\n try (\n // creatingMongoDBContainer {\n final MongoDBContainer mongoDBContainer = new MongoDBContainer(DockerImageName.parse(\"mongo:4.0.10\"))\n // }\n ) {\n // startingMongoDBContainer {\n mongoDBContainer.start();\n // }\n executeTx(mongoDBContainer);\n }\n }", "@Override\n public void rollbackTx() {\n \n }", "public void runScript(String sqlScript) throws DataAccessLayerException {\n Session session = null;\n Transaction trans = null;\n Connection conn = null;\n\n Statement stmt = null;\n try {\n session = getSession(true);\n trans = session.beginTransaction();\n conn = session.connection();\n stmt = conn.createStatement();\n } catch (SQLException e) {\n throw new DataAccessLayerException(\n \"Unable to create JDBC statement\", e);\n }\n boolean success = true;\n String[] scriptContents = sqlScript.split(\";\");\n for (String line : scriptContents) {\n if (!line.isEmpty()) {\n try {\n stmt.addBatch(line + \";\");\n\n } catch (SQLException e1) {\n logger.warn(\"Script execution failed. Rolling back transaction\");\n trans.rollback();\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e2) {\n logger.error(\"Cannot close database connection!!\", e2);\n }\n if (session.isOpen()) {\n session.close();\n }\n throw new DataAccessLayerException(\n \"Cannot execute SQL statement: \" + line, e1);\n }\n }\n }\n try {\n stmt.executeBatch();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Error executing script.\", e1);\n }\n\n try {\n stmt.close();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Unable to close JDBC statement!\", e1);\n }\n\n if (success) {\n trans.commit();\n }\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e) {\n logger.error(\"Cannot close database connection!!\", e);\n }\n if (session.isOpen()) {\n session.close();\n }\n }", "void execute(final ReadWriteTransaction readWriteTransaction);", "public void forceCommitTx()\n{\n}", "public static void beginJta(DefaultDefinition definition) throws DBException {\r\n\t\tgetJtaTransactionManager().begin(definition);\r\n\t}", "public boolean execute(TransactionInput txIn)\n throws ScriptException\n {\n // Create script runtime\n return execute(txIn, new Stack());\n }", "@Override\n public void execute(Work work) {\n final Session session = (Session) entityManager.getDelegate();\n session.doWork(work);\n }", "@Override\n public void commitTx() {\n \n }", "public void execute() {\n execute0();\n }", "void endTransaction();", "void rollbackTransaction(ConnectionContext context) throws IOException;", "public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement = connection.createStatement();\n\n String into = \"\";\n\n //connection.setAutoCommit(false);\n for (String s : sql) {\n if (s.trim().equals((\"\")) || s.trim().startsWith(\"/*\")) {\n continue;\n }\n into += s;\n\n if (s.endsWith(\";\")) {\n statement.addBatch(into);\n into = \"\";\n }\n }\n\n statement.executeBatch();\n\n statement.close();\n\n //connection.commit();\n }\n }", "void doTransaction (Redis redis) {\n\t \tswitch (redis.EXEC()) {\n\t \tcase OK:\n\t \tbreak;\n\t \tcase FAIL:\n \t\t\tdiscardTransaction(redis);\n\t\t\tbreak;\n\t \t}\n\t}", "void execute() throws TMQLLexerException;", "protected abstract boolean commitTxn(Txn txn) throws PersistException;", "void readOnlyTransaction();", "public void commitTransaction() {\n\r\n\t}", "void begin() throws org.omg.CosTransactions.SubtransactionsUnavailable;", "public<ResultType> ResultType doExecuteTransaction(Transaction<ResultType> txn) throws SQLException {\n\t\tConnection conn = connect();\n\t\t\n\t\ttry {\n\t\t\tint numAttempts = 0;\n\t\t\tboolean success = false;\n\t\t\tResultType result = null;\n\t\t\t\t\n\t\t\twhile (!success && numAttempts < MAX_ATTEMPTS) {\n\t\t\t\ttry {\n\t\t\t\t\tresult = txn.execute(conn);\n\t\t\t\t\tconn.commit();\n\t\t\t\t\tsuccess = true;\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tif (e.getSQLState() != null && e.getSQLState().equals(\"41000\")) {\n\t\t\t\t\t\t// Deadlock: retry (unless max retry count has been reached)\n\t\t\t\t\t\tnumAttempts++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Some other kind of SQLException\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tif (!success) {\n\t\t\t\tthrow new SQLException(\"Transaction failed (too many retries)\");\n\t\t\t}\n\t\t\t\n\t\t\t// Success!\n\t\t\treturn result;\n\t\t} finally {\n\t\t\tDBUtil.closeQuietly(conn);\n\t\t}\n\t}", "public void executePendingTransactions()\n\t{\n\t\twhile(!transactionQueue.isEmpty())\n\t\t\ttransactionQueue.poll().doTransaction();\n\t}", "public void executeTransaction(Transaction transaction) {\n logger.info(\"Execute money transaction: {}\", transaction);\n validateTransaction(transaction);\n transferHKD(transaction);\n }", "public void openTheTransaction() {\n openTransaction();\n }", "public static void main(String args[]) throws Exception\n {\n\n DataSourceTransactionManager txManager = (DataSourceTransactionManager)context.getBean(\"txManager\");\n\n DefaultTransactionDefinition definition = new DefaultTransactionDefinition();\n TransactionStatus ts = txManager.getTransaction(definition);\n\n try{\n\n txManager.commit(ts);\n }catch (Exception e){\n txManager.rollback(ts);\n }\n\n }", "public TitanTransaction start();", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "public IgniteInternalFuture<IgniteInternalTx> rollbackAsync();", "public void beginTransaction() throws SQLException {\r\n conn.setAutoCommit(false);\r\n beginTransactionStatement.executeUpdate();\r\n }", "private void rollbackTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().rollback();\n }\n }", "@Override\n public Object transaction(DAOCommand command) {\n Object result = null;\n try {\n openConnection();\n startTransaction();\n result = command.execute(this);\n commitTransaction();\n } catch (DAOManagerException e) {\n LOGGER.error(e);\n rollbackTransaction();\n }\n return result;\n }", "@Test\n public void testTransactional() throws Exception {\n try (CloseableCoreSession session = coreFeature.openCoreSessionSystem()) {\n IterableQueryResult results = session.queryAndFetch(\"SELECT * from Document\", \"NXQL\");\n TransactionHelper.commitOrRollbackTransaction();\n TransactionHelper.startTransaction();\n assertFalse(results.mustBeClosed());\n assertWarnInLogs();\n }\n }", "@Test\n public void existingTransaction() {\n Transaction t1 = startTransaction();\n IntRef intValue = new IntRef(10);\n t1.commit();\n\n Transaction t2 = startTransaction();\n assertEquals(10, intValue.get());\n\n intValue.inc();\n assertEquals(11, intValue.get());\n t2.commit();\n }", "void commitTransaction(ConnectionContext context) throws IOException;", "void addTransaction(Transaction transaction) throws SQLException, BusinessException;", "private void executeCommitHooks(JooqTransaction transaction) {\n for (Runnable commitHook : transaction.getCommitHooks()) {\n commitHook.run();\n }\n\n for (JooqTransaction nested : transaction.getNestedTransactions()) {\n executeCommitHooks(nested);\n }\n }", "public void testCommitOrRollback() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n startService();\n Connection conn = sqlDbManager.getConnection();\n Logger logger = Logger.getLogger(\"testCommitOrRollback\");\n SqlDbManager.commitOrRollback(conn, logger);\n SqlDbManager.safeCloseConnection(conn);\n\n conn = null;\n try {\n SqlDbManager.commitOrRollback(conn, logger);\n } catch (NullPointerException sqle) {\n }\n }", "<T> T executeInTransaction(OperationsCallback<K, V, T> callback);", "private void executeTransaction(ArrayList<Request> transaction) {\n // create a new TransactionMessage\n TransactionMessage tm = new TransactionMessage(transaction);\n //if(tm.getStatementCode(0)!=8&&tm.getStatementCode(0)!=14)\n // return;\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(tm);\n oos.flush();\n\n byte[] data = bos.toByteArray();\n\n byte[] buffer = null;\n long startTime = System.currentTimeMillis();\n buffer = clientShim.execute(data);\n long endTime = System.currentTimeMillis();\n if (reqIndex < maxNoOfRequests && id > 0) {\n System.out.println(\"#req\" + reqIndex + \" \" + startTime + \" \" + endTime + \" \" + id);\n }\n reqIndex++;\n\n father.addTransaction();\n\n // IN THE MEAN TIME THE INTERACTION IS BEING EXECUTED\n\n\t\t\t\t/*\n\t\t\t\t * possible values of r: 0: commit 1: rollback 2: error\n\t\t\t\t */\n int r = ByteBuffer.wrap(buffer).getInt();\n //System.out.println(\"r = \"+r);\n if (r == 0) {\n father.addCommit();\n } else if (r == 1) {\n father.addRollback();\n } else {\n father.addError();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public interface TransactionManager {\n\n\t/**\n\t * Start a new read only transaction.\n\t */\n\n\tStableView view();\n\n\t/**\n\t * Start a transaction for mutation.\n\t */\n\n\tMutableView begin();\n\n\t/**\n\t * Commit a previously prepared transaction for a two phase commit.\n\t *\n\t * @param tpcid\n\t * The client supplied two phase commit identifier.\n\t */\n\n\tvoid commit(String tpcid);\n\n}", "private void doRollback() throws TransactionInfrastructureException {\n\t\t// DO WE WANT TO ROLL\n\t\t//\t\tif (isTransactionalMethod(m))\n\t\tObject txObject = getTransactionObject();\n\t\tif (txObject == null)\n\t\t\tthrow new TransactionInfrastructureException(\"Cannot rollback transaction: don't have a transaction\");\n\t\trollback(txObject);\n\t}", "private void executeQuery() {\n }", "void commit();", "void commit();", "void rollback();", "public <A> Future<A> transact(DB<A> op)\n {\n return withConnection(transactional(op), false);\n }", "public void beginTransaction() throws TransactionException {\n\t\t\r\n\t}", "public void beginTransaction() throws SQLException\n\t{\n\t\tconn.setAutoCommit(false);\n\t\tbeginTransactionStatement.executeUpdate();\n\t}", "T execute() throws MageException;", "void commit() throws SoarException\n {\n // if lazy, commit\n if(db != null && params.lazy_commit.get() == LazyCommitChoices.on)\n {\n // Commit and then start next lazy-commit transaction\n try\n {\n db.commitExecuteUpdate( /* soar_module::op_reinit */);\n db.beginExecuteUpdate( /* soar_module::op_reinit */);\n }\n catch(SQLException e)\n {\n throw new SoarException(\"Error while forcing commit: \" + e.getMessage(), e);\n }\n }\n \n }", "public void exec(String sql) {\r\n try (Statement stmt = connection.createStatement()) {\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n throw new DbException(connectionString + \"\\nError executing \" + sql, e);\r\n }\r\n }", "public Transaction createTransaction(Credentials user, TransactionType tt) throws RelationException;", "protected abstract void commitIndividualTrx();", "public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "public void commit();", "@Override\n protected TransactionStatus executeWork(Connection conn, TransactionType nextTransaction)\n throws UserAbortException, SQLException {\n try {\n TPCCProcedure proc = (TPCCProcedure) this.getProcedure(nextTransaction.getProcedureClass());\n\n // The districts should be chosen randomly from [1,10] for the following transactions:\n // 1. NewOrder TPC-C 2.4.1.2\n // 2. Payment TPC-C 2.5.1.2\n // 3. OrderStatus TPC-C 2.6.1.2\n // The 'StockLevel' transaction has a fixed districtId for the whole terminal.\n int lowDistrictId = terminalDistrictID;\n int highDistrictId = terminalDistrictID;\n if (nextTransaction.getName().equals(\"NewOrder\") ||\n nextTransaction.getName().equals(\"Payment\") ||\n nextTransaction.getName().equals(\"OrderStatus\")) {\n lowDistrictId = 1;\n highDistrictId = TPCCConfig.configDistPerWhse;\n }\n proc.run(conn, gen, terminalWarehouseID, wrkld.getTotalWarehousesAcrossShards(),\n lowDistrictId, highDistrictId, this);\n } catch (ClassCastException ex){\n //fail gracefully\n LOG.error(\"We have been invoked with an INVALID transactionType?!\");\n throw new RuntimeException(\"Bad transaction type = \"+ nextTransaction);\n }\n conn.commit();\n return (TransactionStatus.SUCCESS);\n }", "void rollBack();", "public void execute() throws Exception \r\n\t{\r\n if (!RemoteMethodServer.ServerFlag){\r\n\r\n RemoteMethodServer ms = RemoteMethodServer.getDefault();\r\n\t\t\tClass[] argTypes = {};\r\n Object[] argValues = {};\r\n ms.invoke(\"execute\", null, this, argTypes, argValues);\r\n return;\r\n }\r\n\r\n SessionContext.newContext();\r\n SessionHelper.manager.setAdministrator();\r\n Transaction trans = new Transaction();\r\n \r\n try\r\n {\r\n \ttrans.start();\r\n \tcreatedoc(\"XYZ999\", \"a test name\", \"116 Tomago Operation\", \"local.rs.vsrs05.Regain.RegainRefDocument\", \"Technical Documents 120TD Thermal Treatment Plant\", \"C\", null, null, \"\", 0);\r\n \ttrans.commit();\r\n trans = null;\r\n }\r\n catch(Throwable t) \r\n {\r\n throw new ExceptionInInitializerError(t);\r\n } \r\n finally \r\n {\r\n\t if(trans != null) \r\n\t {\r\n\t \ttrans.rollback();\r\n\t }\r\n }\r\n\t}", "protected abstract void rollbackIndividualTrx();", "public void rollback();", "protected void startTopLevelTrx() {\n startTransaction();\n }", "boolean requiresRollbackAfterSqlError();", "public<ResultType> ResultType executeTransaction(Transaction<ResultType> txn) {\n\t\ttry {\n\t\t\treturn doExecuteTransaction(txn);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new PersistenceException(\"Transaction failed\", e);\n\t\t}\n\t}", "Transaction createTransaction(Settings settings);", "void execute() throws Exception;", "protected void execSQL(String sql) throws Exception {\n\t\tPreparedStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tPersistenceUtils.closeStatement(statement);\n\t\t}\n\n\t}", "public void rollbackTransactionBlock() throws SQLException {\n masterNodeConnection.rollback();\n }", "void scheduleTransaction(ClientTransaction transaction) {\n transaction.preExecute(this);\n sendMessage(ActivityThread.H.EXECUTE_TRANSACTION, transaction);\n }", "Transaction getCurrentTransaction();", "@Override\n public void doAfterTransaction(int result) {\n\n }", "@Override\n public void startTx() {\n \n }", "public void updateTransaction(Transaction trans);", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }" ]
[ "0.6331743", "0.63008547", "0.6096185", "0.60899", "0.5981626", "0.58945173", "0.5869664", "0.584982", "0.5845513", "0.5834968", "0.5827507", "0.5808272", "0.57691497", "0.5715478", "0.5709757", "0.56394625", "0.5625888", "0.5614442", "0.5591582", "0.5574651", "0.5572133", "0.555506", "0.5549678", "0.55259275", "0.55074763", "0.54738563", "0.5461837", "0.54506856", "0.54137665", "0.54078734", "0.5403199", "0.5390444", "0.53897864", "0.53849065", "0.5384303", "0.53670174", "0.53614", "0.534618", "0.5342834", "0.53390974", "0.5338888", "0.5335941", "0.5333894", "0.53239924", "0.53186643", "0.5318544", "0.5312889", "0.53105325", "0.5310437", "0.53075373", "0.53017855", "0.52966464", "0.5295269", "0.52779853", "0.5267548", "0.52518827", "0.5249283", "0.5239988", "0.52370685", "0.5235868", "0.5235287", "0.5222357", "0.5215845", "0.521345", "0.5204549", "0.52041906", "0.52041906", "0.5198412", "0.5197952", "0.51781154", "0.51723003", "0.517149", "0.516639", "0.51595205", "0.5156404", "0.51558006", "0.5150218", "0.5139504", "0.5139153", "0.51370853", "0.513627", "0.51292694", "0.5118958", "0.51104057", "0.5106717", "0.5106063", "0.51017773", "0.51006484", "0.5091982", "0.50899", "0.5079587", "0.5078774", "0.50764036", "0.50746584", "0.507304", "0.5059287", "0.504963", "0.504963", "0.504963", "0.504963" ]
0.57479614
13
Creates a new proxy with the specified class name.
public ProxyModel(String classname) { super(classname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "<T> T newProxy(T target, Class<T> interfaceType);", "public static <T> T createProxy(Class<T> serviceCls, String hostName, Integer port) {\n\t\tif (serviceCls.isInterface()) {\n\t\t\tList<Class> proxyInfs = getAllInterfaces(serviceCls);\n\t\t\treturn (T) Proxy.newProxyInstance(serviceCls.getClassLoader(), proxyInfs.toArray(new Class[proxyInfs.size()]),\n\t\t\t\t\tnew RpcInvocationHandler(serviceCls, hostName == null ? DEFAULT_HOST_NAME : hostName,\n\t\t\t\t\t\t\tport == null ? DEFAULT_PORT : port));\n\t\t} else\n\t\t\treturn (T) Proxy.newProxyInstance(serviceCls.getClassLoader(), serviceCls.getInterfaces(),\n\t\t\t\t\tnew RpcInvocationHandler(serviceCls, hostName == null ? DEFAULT_HOST_NAME : hostName,\n\t\t\t\t\t\t\tport == null ? DEFAULT_PORT : port));\n\t}", "public static <T> ProxyAndInfo<T> createProxy(Configuration conf,\n URI nameNodeUri, Class<T> xface) throws IOException {\n return createProxy(conf, nameNodeUri, xface, null);\n }", "private ClassProxy() {\n }", "private Proxy instantiateProxy(Class cls, Constructor cons, Object[] args) {\n try {\n if (cons != null)\n return (Proxy) cls.getConstructor(cons.getParameterTypes()).\n newInstance(args);\n return (Proxy) AccessController.doPrivileged(\n J2DoPrivHelper.newInstanceAction(cls));\n } catch (InstantiationException ie) {\n throw new UnsupportedException(_loc.get(\"cant-newinstance\",\n cls.getSuperclass().getName()));\n } catch (PrivilegedActionException pae) {\n Exception e = pae.getException();\n if (e instanceof InstantiationException)\n throw new UnsupportedException(_loc.get(\"cant-newinstance\",\n cls.getSuperclass().getName()));\n else\n throw new GeneralException(cls.getName()).setCause(e);\n } catch (Throwable t) {\n throw new GeneralException(cls.getName()).setCause(t);\n }\n }", "public Proxy createProxy(int nb) {\n\t\tif (nb == 1) {\n\t\t\treturn createProxyOne();\n\t\t}\n\t\tif (nb == 2) {\n\t\t\treturn createProxyTwo();\n\t\t}\n\t\treturn null;\n\t}", "private void createMBeanProxy(Class<? extends MBeanInf> mbeanClass, String objectName) {\n ObjectName mbeanName = null;\n try {\n mbeanName = new ObjectName(objectName);\n } catch (MalformedObjectNameException e) {\n log.error(\"Unable to create object name from \" + objectName, e);\n return;\n }\n\n MBeanInf mBean = JMX.newMBeanProxy(mbsc, mbeanName, mbeanClass, true);\n\n ClientListener listener = new ClientListener(url);\n createMBeanNotificationListener(mbeanName, listener);\n beans.add(mBean);\n }", "NamedClass createNamedClass();", "public ProxyHandler<Object> proxify(final Class<?>... classes) {\n\t\treturn new DefaultProxyHandler(provider, classes);\n\t}", "@SuppressWarnings(\"unchecked\")\n public static <T> T create(Class<?> klass, MethodInterceptor handler)\n throws InstantiationException {\n // Don't ask me how this work...\n final Enhancer enhancer = new Enhancer();\n enhancer.setSuperclass(klass);\n enhancer.setInterceptDuringConstruction(true);\n enhancer.setCallbackType(handler.getClass());\n final Class<?> proxyClass = enhancer.createClass();\n final Factory proxy =\n (Factory) ClassInstantiatorFactory.getInstantiator().newInstance(proxyClass);\n proxy.setCallbacks(new Callback[] { handler });\n return (T) proxy;\n }", "private <T> T proxy(Class<T> serviceClass, String serviceUrl, Client client) {\n\n final WebTarget target = client.target(serviceUrl);\n return ((ResteasyWebTarget) target).proxy(serviceClass);\n }", "public T newInstance(Object... args) {\n Class<?>[] receivedParameterTypes = Arrays.stream(args).map(arg -> arg == null ? null : arg.getClass())\n .toArray(Class<?>[]::new);\n return createInstance(getProxyClass(), receivedParameterTypes, args);\n }", "public abstract ServiceLocator create(String name);", "public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}", "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "private Proxy createProxyOne() {\n\t\t\n\t\tWorkingMemoryPointer origin = createWorkingMemoryPointer (\"fakevision\", \"blibli\", \"VisualObject\");\n\t\tProxy proxy = createNewProxy(origin, 0.35f);\n\t\t\n\t\tFeatureValue red = createStringValue (\"red\", 0.73f);\n\t\tFeature feat = createFeatureWithUniqueFeatureValue (\"colour\", red);\n\t\taddFeatureToProxy (proxy, feat);\n\t\t\t\t\n\t\tFeatureValue cylindrical = createStringValue (\"cylindrical\", 0.63f);\n\t\tFeature feat2 = createFeatureWithUniqueFeatureValue (\"shape\", cylindrical);\n\t\taddFeatureToProxy (proxy, feat2);\n\t\t\n\t\tlog(\"Proxy one for belief model successfully created\");\n\t\treturn proxy;\n\t}", "private ProxyBean getFactoryProxyBean(Object orig) {\n final Class<?> type = orig.getClass();\n if (isUnproxyable(type))\n return null;\n\n // we don't lock here; ok if two proxies get generated for same type\n ProxyBean proxy = (ProxyBean) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type, ProxyBean.class);\n Class<?> pcls = loadBuildTimeProxy(type, l);\n if (pcls == null) {\n pcls = generateAndLoadProxyBean(type, true, l);\n }\n if (pcls != null)\n proxy = (ProxyBean) instantiateProxy(pcls, findCopyConstructor(type), new Object[] { orig });\n if (proxy == null) {\n _unproxyable.add(type.getName());\n } else {\n _proxies.put(type, proxy);\n }\n }\n return proxy;\n }", "public ProxyBean() {\n }", "protected Proxy(InvocationHandler h) { }", "public static Object createObject(String className) throws Exception {\n return createObject(Class.forName(className));\n }", "public HttpHandler createProxyHandler() {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "@SuppressWarnings(\"unchecked\")\n public static <T> ProxyAndInfo<T> createProxy(Configuration conf,\n URI nameNodeUri, Class<T> xface, AtomicBoolean fallbackToSimpleAuth)\n throws IOException {\n Class<FailoverProxyProvider<T>> failoverProxyProviderClass =\n getFailoverProxyProviderClass(conf, nameNodeUri, xface);\n \n if (failoverProxyProviderClass == null) {\n // Non-HA case\n return createNonHAProxy(conf, NameNode.getAddress(nameNodeUri), xface,\n UserGroupInformation.getCurrentUser(), true, fallbackToSimpleAuth);\n } else {\n // HA case\n FailoverProxyProvider<T> failoverProxyProvider = NameNodeProxies\n .createFailoverProxyProvider(conf, failoverProxyProviderClass, xface,\n nameNodeUri, fallbackToSimpleAuth);\n DfsClientConf config = new DfsClientConf(conf);\n T proxy = (T) RetryProxy.create(xface, failoverProxyProvider,\n RetryPolicies.failoverOnNetworkException(\n RetryPolicies.TRY_ONCE_THEN_FAIL, config.getMaxFailoverAttempts(),\n config.getMaxRetryAttempts(), config.getFailoverSleepBaseMillis(),\n config.getFailoverSleepMaxMillis()));\n \n Text dtService = HAUtilClient.buildTokenServiceForLogicalUri(nameNodeUri, HdfsConstants.HDFS_URI_SCHEME);\n return new ProxyAndInfo<T>(proxy, dtService);\n }\n }", "public Class<?> getClassProxy(Class<?> c) throws IllegalArgumentException {\n HashMap<Class<?>, Class<?>> map = getProxyMap();\n Class<?> p = map.get(c);\n if (p != null) {\n return p;\n }\n if (c.isAnonymousClass()) {\n throw new IllegalArgumentException(\n \"Creating a proxy for an anonymous inner class \" +\n \"is not supported: \" + c.getName());\n }\n if (Modifier.isFinal(c.getModifiers())) {\n throw new IllegalArgumentException(\n \"Creating a proxy for a final class \" +\n \"is not supported: \" + c.getName());\n }\n if (c.getEnclosingClass() != null) {\n if (!Modifier.isPublic(c.getModifiers())) {\n throw new IllegalArgumentException(\n \"Creating a proxy for a non-public inner class \" +\n \"is not supported: \" + c.getName());\n } else if (!Modifier.isStatic(c.getModifiers())) {\n // in theory, it would be possible to support it,\n // but the outer class would also need to be extended\n throw new IllegalArgumentException(\n \"Creating a proxy for a non-static inner class \" +\n \"is not supported: \" + c.getName());\n }\n boolean hasPublicConstructor = false;\n for (Constructor<?> constructor : c.getConstructors()) {\n if (Modifier.isPublic(constructor.getModifiers())) {\n hasPublicConstructor = true;\n break;\n }\n }\n if (!hasPublicConstructor) {\n throw new IllegalArgumentException(\n \"Creating a proxy for a static inner class \" +\n \"without public constructor is not supported: \" + c.getName());\n }\n }\n CodeGenerator gen = new CodeGenerator();\n String packageName = ReflectionUtils.getPackageName(c);\n packageName = ProxyFactory.PROXY_PACKAGE_NAME + \".\" + packageName;\n String className = c.getSimpleName() + \"Proxy\";\n gen.setName(packageName, className);\n gen.generateClassProxy(c);\n StringWriter sw = new StringWriter();\n gen.write(new PrintWriter(sw));\n String code = sw.toString();\n String name = packageName + \".\" + className;\n Compiler comp = getCompiler();\n comp.setSource(name, code);\n // System.out.println(code);\n try {\n Class<?> pc = comp.getClass(name);\n map.put(c, pc);\n return pc;\n } catch (ClassNotFoundException e) {\n IllegalArgumentException ia = new IllegalArgumentException(\n \"Could not create a proxy class for \" + c.getName());\n ia.initCause(e);\n throw ia;\n }\n }", "protected ParserAbstract createRegisterInstance(\n\t\t\tClass<? extends ParserAbstract> className)\n\t\t\tthrows InstantiationException, IllegalAccessException {\n\t\tClass<? extends ParserAbstract> parserClass = ParserList\n\t\t\t\t.findParserClass(className.getSimpleName().toLowerCase());\n\t\tassert (parserClass != null);\n\t\treturn parserClass.newInstance();\n\t}", "Proxy getProxy();", "public static Object newInstance(String classname) {\n return newInstance(classname, Object.class);\n }", "private static PublishLogDataStrategy createNewStrategie(String className) {\n\n\t\tPublishLogDataStrategy request = null;\n\n\t\ttry {\n\t\t\tClass<?> cl = Class.forName(className);\n\t\t\tLOGGER.info(cl.toString() + \" instantiated\");\n\t\t\tif (cl.getSuperclass() == PublishLogDataStrategy.class) {\n\t\t\t\trequest = (PublishLogDataStrategy) cl.newInstance();\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLOGGER.severe(\"ClassNotFound\");\n\t\t} catch (InstantiationException e) {\n\t\t\tLOGGER.severe(\"InstantiationException\");\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLOGGER.severe(\"IllegalAccessException\");\n\t\t}\n\n\t\treturn request;\n\t}", "public static Object createObject(String className) {\n try {\n Class<?> aClass = Class.forName(className);\n return createObject(aClass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }", "public ProxyConfig createProxyConfig();", "public static Proxy getProxy() {\r\n\t\tif (_proxy == null) {//no need to synchronized\r\n\t\t\ttry {\r\n\t\t\t\tClasses.forNameByThread(\"org.zkoss.zk.ui.sys.PageRenderer\");\r\n\t\t\t\t_proxy = newProxy5();\r\n\t\t\t} catch (ClassNotFoundException ex) {\r\n\t\t\t\t_proxy = newProxy3();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn _proxy;\r\n\t}", "public static ClassReference fromName(String name) {\n\t\treturn new ClassReference(Primitive.REFERENCE, name.replace('/', '.'), 0);\n\t}", "public static Object createObject( String className )\n throws WfControllerException\n {\n Object object = null;\n try\n {\n Class classDefinition = Class.forName( className );\n object = classDefinition.newInstance();\n }\n catch ( InstantiationException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n catch ( IllegalAccessException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n catch ( ClassNotFoundException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n return object;\n }", "@Test\n public void testProxy() {\n Dell dell = new Dell();\n Proxy proxy = new Proxy(dell);\n proxy.salePc();\n }", "public static StoreProxy create(Store store) {\n return new StoreProxy(store);\n }", "private <T extends Object> Object newProxy(final Class<T> proxyInterface,\n final Class<? extends T> proxyImplementation) {\n return AdminModelFactory.newProxy(user, classLoader, proxyInterface,\n proxyImplementation);\n }", "void createHandler(final String handlerClassName);", "@ProxyGen\npublic interface UserMongoService {\n\n static UserMongoService create(Vertx vertx, MongoClient client) {\n return new UserMongoServiceImpl(vertx,client);\n }\n\n static UserMongoService createProxy(Vertx vertx, String address) {\n return new UserMongoServiceVertxEBProxy(vertx, address);\n }\n\n}", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public void setProxyName(java.lang.String newProxyName)\r\n {\r\n System.out.println(\"Name: \" + newProxyName);\r\n proxyName = newProxyName;\r\n }", "public <T> T create(String baseUrl, Class<T> clz) {\n String service_url = \"\";\n try {\n Field field1 = clz.getField(\"BASE_URL\");\n service_url = (String) field1.get(clz);\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.getMessage();\n e.printStackTrace();\n }\n return createApiClient(\n TextUtils.isEmpty(service_url) ? baseUrl : service_url).create(clz);\n }", "public static void main(String[] args)\n throws ClassNotFoundException, IOException {\n File dir = Files.getClassFile(ProxyManagerImpl.class);\n dir = (dir == null) ? new File(AccessController.doPrivileged(\n J2DoPrivHelper.getPropertyAction(\"user.dir\")))\n : dir.getParentFile();\n\n Options opts = new Options();\n args = opts.setFromCmdLine(args);\n\n List types = new ArrayList(Arrays.asList(args));\n int utils = opts.removeIntProperty(\"utils\", \"u\", 0);\n if (utils >= 4) {\n types.addAll(Arrays.asList(new String[] {\n java.sql.Date.class.getName(),\n java.sql.Time.class.getName(),\n java.sql.Timestamp.class.getName(),\n java.util.ArrayList.class.getName(),\n java.util.Date.class.getName(),\n java.util.GregorianCalendar.class.getName(),\n java.util.HashMap.class.getName(),\n java.util.HashSet.class.getName(),\n java.util.Hashtable.class.getName(),\n java.util.LinkedList.class.getName(),\n java.util.Properties.class.getName(),\n java.util.TreeMap.class.getName(),\n java.util.TreeSet.class.getName(),\n java.util.Vector.class.getName(),\n }));\n }\n if (utils >= 5) {\n types.addAll(Arrays.asList(new String[] {\n \"java.util.EnumMap\",\n \"java.util.IdentityHashMap\",\n \"java.util.LinkedHashMap\",\n \"java.util.LinkedHashSet\",\n \"java.util.PriorityQueue\",\n }));\n }\n\n final ProxyManagerImpl mgr = new ProxyManagerImpl();\n Class cls;\n for (Object type : types) {\n cls = Class.forName((String) type);\n try {\n if (Class.forName(getProxyClassName(cls, false), true,\n GeneratedClasses.getMostDerivedLoader(cls, Proxy.class))\n != null)\n continue;\n }\n catch (Throwable t) {\n // expected if the class hasn't been generated\n }\n\n\n final String proxyClassName = getProxyClassName(cls, false);\n\n byte[] bytes = null;\n\n if (Date.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyDateBytecode(cls, false, proxyClassName);\n }\n else if (Calendar.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyCalendarBytecode(cls, false, proxyClassName);\n }\n else if (Collection.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyCollectionBytecode(cls, false, proxyClassName);\n }\n else if (Map.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyMapBytecode(cls, false, proxyClassName);\n }\n else {\n bytes = mgr.generateProxyBeanBytecode(cls, false, proxyClassName);\n }\n\n if (bytes != null) {\n final String fileName = cls.getName().replace('.', '$') + PROXY_SUFFIX + \".class\";\n java.nio.file.Files.write(new File(dir, fileName).toPath(), bytes);\n }\n }\n }", "Class createClass();", "boolean isProxyTargetClass();", "void copyToProxy (ClassType c) {\r\n package_name = c.getPackage ();\r\n initialize (c.getModifier () ^ GLOBAL);\r\n if (c.isClassInterface ())\r\n method_table = c.getMethodTable ();\r\n }", "public <T> Class<T> defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes,\n Class<?> parent)\n throws ProxyGenerationException\n {\n Class<?> definedClass = null;\n try\n {\n // CHECKSTYLE:OFF\n switch (defineClassImpl) {\n case 0: // unset\n case 1: // classloader\n {\n if (defineClassMethod == null)\n {\n Method defineClassMethodTmp;\n try\n {\n // defineClass is a final method on the abstract base ClassLoader\n // thus we need to cache it only once\n defineClassMethodTmp = ClassLoader.class.getDeclaredMethod(\n \"defineClass\", String.class, byte[].class, int.class, int.class);\n if (!defineClassMethodTmp.isAccessible())\n {\n try\n {\n defineClassMethodTmp.setAccessible(true);\n defineClassMethod = defineClassMethodTmp;\n }\n catch (final RuntimeException re)\n {\n // likely j9 or not accessible via security, let's use unsafe or MethodHandle as fallbacks\n }\n }\n }\n catch (final NoSuchMethodException e)\n {\n // all fine, we just skip over from here\n }\n }\n\n if (defineClassMethod != null)\n {\n try\n {\n definedClass = Class.class.cast(defineClassMethod.invoke(\n classLoader, proxyName, proxyBytes, 0, proxyBytes.length));\n defineClassImpl = 1;\n break;\n }\n catch (final Throwable t)\n {\n definedClass = handleLinkageError(t, proxyName, classLoader);\n if (definedClass != null)\n {\n defineClassImpl = 1;\n break;\n }\n }\n }\n }\n case 2: // lookup\n {\n if (privateLookup == null)\n {\n synchronized (this)\n {\n if (privateLookup == null)\n {\n try\n {\n lookup = MethodHandles.lookup();\n defineClass = lookup.getClass().getMethod(\"defineClass\", byte[].class);\n privateLookup = MethodHandles.class.getDeclaredMethod(\n \"privateLookupIn\", Class.class, MethodHandles.Lookup.class);\n }\n catch (final Exception re)\n {\n // no-op\n }\n }\n }\n }\n\n if (privateLookup != null)\n {\n try\n {\n final MethodHandles.Lookup lookupInstance = MethodHandles.Lookup.class.cast(\n privateLookup.invoke(\n null,\n proxyName.startsWith(\"org.apache.webbeans.custom.signed.\") ?\n CustomSignedProxyPackageMarker.class :\n proxyName.startsWith(\"org.apache.webbeans.custom.\") ?\n CustomProxyPackageMarker.class : parent,\n lookup));\n definedClass = (Class<T>) defineClass.invoke(lookupInstance, proxyBytes);\n defineClassImpl = 2;\n break;\n }\n catch (final Exception e)\n {\n definedClass = handleLinkageError(e, proxyName, classLoader);\n if (definedClass != null)\n {\n defineClassImpl = 2;\n break;\n }\n }\n }\n }\n case 3: // unlikely - unsafe\n try\n {\n definedClass = Class.class.cast(unsafeDefineClass().invoke(\n internalUnsafe, proxyName, proxyBytes, 0, proxyBytes.length, classLoader, null));\n defineClassImpl = 3;\n }\n catch (final Throwable t)\n {\n definedClass = handleLinkageError(t, proxyName, classLoader);\n }\n break;\n default:\n throw new IllegalAccessError(\"Unknown defineClass impl: \" + defineClassImpl);\n }\n\n // CHECKSTYLE:ON\n if (definedClass == null)\n {\n throw new IllegalStateException(\"Can't define proxy \" + proxyName);\n }\n\n return (Class<T>) Class.forName(definedClass.getName(), true, classLoader);\n }\n catch (final Throwable e)\n {\n return onProxyGenerationError(e, proxyName, classLoader);\n }\n }", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "@Override\n public LoggerBackend create(String loggingClassName) {\n Logger logger = (Logger) LogManager.getLogger(loggingClassName.replace('$', '.'));\n return new Log4j2LoggerBackend(logger);\n }", "static public InstanceGenerator create(String className, Instances training, Instances testing)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(Instances.class, Instances.class).newInstance(training, testing);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "public HttpHandler createProxyHandler(HttpHandler next) {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setNext(next)\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "private String getProxyClassName() {\n if (proxyClassName != null) {\n return proxyClassName;\n } else {\n assert proxyFormat != null;\n return proxyFormat.getClassName();\n }\n }", "static public InstanceGenerator create(String className, String datasetFileName)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(String.class).newInstance(datasetFileName);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "private ProxyCreationResult createRepo( String trackingId, URL url, String name )\n throws IndyDataException\n {\n UrlInfo info = new UrlInfo( url.toExternalForm() );\n\n UserPass up = UserPass.parse( ApplicationHeader.authorization, httpRequest, url.getAuthority() );\n String baseUrl = getBaseUrl( url );\n\n logger.debug( \">>>> Create repo: trackingId=\" + trackingId + \", name=\" + name );\n ProxyCreationResult result = repoCreator.create( trackingId, name, baseUrl, info, up,\n LoggerFactory.getLogger( repoCreator.getClass() ) );\n ChangeSummary changeSummary =\n new ChangeSummary( ChangeSummary.SYSTEM_USER, \"Creating HTTProx proxy for: \" + info.getUrl() );\n\n RemoteRepository remote = result.getRemote();\n if ( remote != null )\n {\n storeManager.storeArtifactStore( remote, changeSummary, false, true, new EventMetadata() );\n }\n\n HostedRepository hosted = result.getHosted();\n if ( hosted != null )\n {\n storeManager.storeArtifactStore( hosted, changeSummary, false, true, new EventMetadata() );\n }\n\n Group group = result.getGroup();\n if ( group != null )\n {\n storeManager.storeArtifactStore( group, changeSummary, false, true, new EventMetadata() );\n }\n\n return result;\n }", "public AgentController createNewAgent(String nickname, String className, Object[] args) throws StaleProxyException {\n\t\tif(myImpl == null || myProxy == null) {\n\t\t\tthrow new StaleProxyException();\n\t\t}\n\n\t\tAID agentID = new AID(nickname, AID.ISLOCALNAME);\n\n\t\ttry {\n\t\t\tmyProxy.createAgent(agentID, className, args);\n\t\t\treturn new AgentControllerImpl(agentID, myProxy, myImpl);\n\t\t}\n\t\tcatch (Throwable t) {\n\t\t\tthrow new StaleProxyException(t);\n\t\t}\n\t}", "protected static String getProxyClassName(Class type, boolean runtime) {\n String id = (runtime) ? \"$\" + nextProxyId() : \"\";\n return ClassUtil.getPackageName(ProxyManagerImpl.class) + \".\"\n + type.getName().replace('.', '$') + id + PROXY_SUFFIX;\n }", "public void createInstance(String className, String instanceName)\r\n\t{\r\n\t\t\r\n\t\tOntClass c = obtainOntClass(className);\r\n\t\t\r\n\t\tString longName;\r\n\t\tif(instanceName.contains(\"#\"))\r\n\t\t\tlongName = instanceName;\r\n\t\tif(instanceName.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(instanceName);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + instanceName;\r\n\t\t\r\n\t\tc.createIndividual(longName);\r\n\t}", "HxType createReference(final String className);", "static public Person create(String name, String urlpt) {\n Person p;\n p = searchPerson(name);\n if (p == null)\n p = new Person(name, urlpt);\n return p;\n }", "public Object newInstance( ClassLoader classLoader, final Class<?> clazz )\n {\n return Proxy.newProxyInstance( classLoader, new Class[] { clazz },\n new InvocationHandler() {\n public Object invoke( Object proxy, Method method,\n Object[] args ) throws Throwable\n {\n if ( isObjectMethodLocal()\n && method.getDeclaringClass().equals(\n Object.class ) ) { return method.invoke( proxy, args ); }\n \n String _classname = clazz.getName().replaceFirst(clazz.getPackage().getName()+\".\", \"\").toLowerCase();\n \n _classname = _classname.replace(\"$\", \".\"); //dirty hack TODO check\n \n String methodName = _classname\n + \".\" + method.getName();\n \n Object result = null;\n \n String id = \"\";\n \n JSONRPC2Request request = new JSONRPC2Request(methodName, Arrays.asList(args), id);\n client.disableStrictParsing(true);\n \n try{\n \tJSONRPC2Response response = client.send(request);\n result = response.getResult();\n \n if(response.getError() != null){\n \tthrow new TracException(response.getError().getMessage());\n }\n }catch(JSONRPC2SessionException e){\n \te.printStackTrace();\n }\n return result;\n }\n } );\n }", "public static <T> T createObject(Class<T> clas, Object[] arguments) throws InstantiationException {\n ProxyFactory f = new ProxyFactory(); //This starts a proxy factory which will create the proxy.\n f.setSuperclass(clas); //This sets the super class.\n\n Field[] fields = clas.getDeclaredFields(); //Get all the fields from the class it's being made to replicate\n boolean hasFieldInv = ContractHelper.fieldHasInvariant(fields);\n //The is to ensure that a class which has a field invariant \n //then all of the methods will be checked.\n\n f.setFilter((Method m) -> {\n //This checks if any annotations are present for a method supplied.\n return m.getAnnotationsByType(Pre.class).length != 0\n || m.getAnnotationsByType(Post.class).length != 0\n || m.getAnnotationsByType(Invariant.class).length != 0\n || m.getAnnotationsByType(ForAll.class).length != 0\n || m.getAnnotationsByType(Exists.class).length != 0\n || m.getAnnotationsByType(PostThrow.class).length != 0\n || hasFieldInv;\n });\n\n Class c = f.createClass(); //This then creates a new class from the proxy factory.\n\n MethodHandler mi = (Object self, Method m, Method proceed, Object[] args) -> { //This is the method handler for the proxy created.\n Parameter[] params = m.getParameters(); //This gets the parameters of the method.\n //These are maps of all the parameters and fields to be checked.\n HashMap<String, Object> initialParameters = ContractHelper.mapHelper(args, params); //This uses a helper to assign the parameter names and values.\n HashMap<String, Object> afterParameters = initialParameters; //This sets the after parameters to the intial to begin with.\n HashMap<String, Object> initialFields = ContractHelper.fieldHelper(self, fields); //This uses a helper to assign the field name and values\n HashMap<String, Object> afterFields = initialFields; //This sets the after fields to the intial to begin.\n //These are arrays of all the annotations.\n Pre[] preArr = m.getAnnotationsByType(Pre.class); //This gets all the annotations that could be on the methods.\n Post[] postArr = m.getAnnotationsByType(Post.class);\n Invariant[] invArr = m.getAnnotationsByType(Invariant.class);\n ForAll[] forAllArr = m.getAnnotationsByType(ForAll.class);\n Exists[] existsArr = m.getAnnotationsByType(Exists.class);\n\n invArr = getFieldInvs(invArr, fields);\n\n for (Pre pre : preArr) { //This loops through all annotations for pre.\n preCheck(pre.value(), initialParameters, initialFields); //This then checks the pre conditions.\n }\n\n for (Invariant inv : invArr) {\n invCheck(inv.value(), initialParameters, initialFields); //This then checks the invariant condition.\n }\n\n Object result = null; //This intialised the result to null.\n\n try {\n result = proceed.invoke(self, args); // execute the original method.\n\n afterParameters = ContractHelper.mapHelper(args, params); //This gets the parameters after the method is called.\n afterFields = ContractHelper.fieldHelper(self, fields); //This gets the fields after\n\n initialParameters = ContractHelper.alterOldMap(initialParameters);\n initialFields = ContractHelper.alterOldMap(initialFields);\n\n for (Post post : postArr) {\n postCheck(post.value(), initialParameters, afterParameters, initialFields, afterFields, result); //This then runs any post checks.\n }\n \n for (ForAll forAll : forAllArr) {\n forAllCheck(forAll.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n\n for (Exists exist : existsArr) {\n existsCheck(exist.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n \n for (Invariant inv : invArr) {\n invCheck(inv.value(), afterParameters, afterFields);\n }\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException thrownByMethod) {\n Throwable cause = thrownByMethod.getCause();\n\n if (!(cause instanceof AssertionError || cause instanceof ContractException)) {\n if (cause != null) { //If cause is null then it is not an exception from the method.\n PostThrow[] thrown = m.getAnnotationsByType(PostThrow.class);\n\n for (PostThrow post : thrown) {\n if (cause.getClass().equals(post.exception())) { //Check if it has exception to check.\n postThrowCheck(post.condition(), initialParameters, afterParameters, initialFields, afterFields, result, cause); //This then runs any post checks.\n }\n }\n cause.setStackTrace(ContractHelper.alterTrace(cause.getStackTrace())); //This sets the trace of the throwable \n throw cause;\n }\n }\n throw thrownByMethod;\n }\n return result; // this returns the result of the method invocation.\n };\n\n Object obj = ContractHelper.getConstructor(c, arguments); //This uses a helper to get a constructor.\n\n //If it is still null then it can't instantiated by reflection.\n if (obj == null) {\n InstantiationException e = new InstantiationException(\"Class could not be instantiated: \" + clas);\n e.setStackTrace(ContractHelper.alterStackInstantiation(e.getStackTrace()));\n throw e;\n }\n\n ((Proxy) obj).setHandler(mi); //This then sets it's handler using the proxy.\n\n return clas.cast(obj); //This returns the object which should now have the proxy with it.\n }", "public void setClassName(String name) {\n\t\tlines.append(\".class public l2j/generated/\");\n\t\tlines.append(name);\n\t\tclassName = \"l2j/generated/\" + name;\n\t\tlines.append(\"\\n\");\n\n\t\t// stupid check\n\t\tif (dest.indexOf(name) == -1)\n\t\t\tthrow new IllegalStateException(\"Bad class name\");\n\t}", "public static Blob createProxy(final byte[] targetBytes) {\n\t\treturn (Blob) Proxy.newProxyInstance(ResultSetProxy.class.getClassLoader(),\n\t\t\t\tnew Class[] { Blob.class }, new BlobProxy(targetBytes));\n\t}", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "private SomePojoClass(String name) {\n this.name = name;\n }", "public <T> T create(Class<T> clz) {\n String service_url = \"\";\n try {\n Field field1 = clz.getField(\"BASE_URL\");\n service_url = (String) field1.get(clz);\n if (TextUtils.isEmpty(service_url)) {\n throw new NullPointerException(\"base_url is null\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return createApiClient(service_url).create(clz);\n }", "public <T> T createInstance(final Class<T> type, final String moduleName, final String className,\n\t\t\tfinal Object... args) {\n\n\t\tfinal PyObject importer = getImporter();\n\t\tsetClasspath(importer);\n\n\t\tfinal PyObject instance = createObject(getPythonClass(importer, moduleName, className), args);\n\n\t\t// coerce into java type\n\t\treturn (T) instance.__tojava__(type);\n\t}", "protected StorageProxy createStorageProxy(int nativeStorageHandle, int status)\n {\n return new StorageProxyImpl(nativeStorageHandle, status);\n }", "protected byte[] generateProxyBeanBytecode(Class type, boolean runtime, String proxyClassName) {\n if (Modifier.isFinal(type.getModifiers())) {\n return null;\n }\n if (ImplHelper.isManagedType(null, type)) {\n return null;\n }\n\n // we can only generate a valid proxy if there is a copy constructor\n // or a default constructor\n Constructor cons = findCopyConstructor(type);\n if (cons == null) {\n Constructor[] cs = type.getConstructors();\n for (int i = 0; cons == null && i < cs.length; i++) {\n if (cs[i].getParameterTypes().length == 0) {\n cons = cs[i];\n }\n }\n if (cons == null)\n return null;\n }\n\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{Type.getInternalName(ProxyBean.class)};\n\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(Opcodes.V11, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyClassDef,\n null, superClassFileNname, interfaceNames);\n\n ClassWriterTracker ct = new ClassWriterTracker(cw);\n String classFileName = runtime ? type.getName() : proxyClassDef;\n cw.visitSource(classFileName + \".java\", null);\n\n delegateConstructors(ct, type, superClassFileNname);\n addInstanceVariables(ct);\n addProxyMethods(ct, true, proxyClassDef, type);\n addProxyBeanMethods(ct, proxyClassDef, type, cons);\n if (!proxySetters(ct, proxyClassDef, type)) {\n return null;\n }\n addWriteReplaceMethod(ct, proxyClassDef, runtime);\n\n return cw.toByteArray();\n }", "HxType createType(final String className);", "public T newInstance();", "public static <S> S createService(Class<S> serviceClass, String baseUrl) {\n return createService(serviceClass, baseUrl, null);\n }", "@SuppressWarnings({\"unchecked\"})\n // Must be synchronized for the Maven Parallel Junit runner to work\n public static synchronized <T> T instantiate(String className, ClassLoader classLoader) {\n try {\n return (T) Class.forName(className, true, classLoader).getDeclaredConstructor().newInstance();\n } catch (Exception e) {\n throw new FlywayException(\"Unable to instantiate class \" + className + \" : \" + e.getMessage(), e);\n }\n }", "public Proxy(){\n\t\tthis.useProxy = false;\n\t\tthis.host = null;\n\t\tthis.port = -1;\n\t}", "private void handleCreateCommand() throws IOException,\r\n ClassNotFoundException,\r\n InstantiationException,\r\n IllegalAccessException {\r\n final String className = (String) m_in.readObject();\r\n Class klass = Class.forName(className, false, m_loader);\r\n final Object instance = klass.newInstance();\r\n final String handle = RemoteProxy.wrapInstance(instance);\r\n m_out.writeObject(handle);\r\n m_out.flush();\r\n }", "private static Object getInstance( final String className ) {\n if( className == null ) return null;\n return java.security.AccessController.doPrivileged(\n new java.security.PrivilegedAction<Object>() {\n public Object run() {\n try {\n ClassLoader cl =\n Thread.currentThread().getContextClassLoader();\n if (cl == null)\n cl = ClassLoader.getSystemClassLoader();\n return Class.forName( className, true,cl).newInstance();\n } catch( Exception e ) {\n new ErrorManager().error(\n \"Error In Instantiating Class \" + className, e,\n ErrorManager.GENERIC_FAILURE );\n }\n return null;\n }\n }\n );\n }", "public ASCompilationUnit newClass(String qualifiedClassName) {\n\t\treturn ASTBuilder.synthesizeClass(qualifiedClassName);\n\t}", "public NaviProxyFactoryBean() {\r\n\r\n }", "ProxyValue createProxyValue();", "private Class<?> defineClass(String paramString, URL paramURL) throws IOException {\n/* 364 */ byte[] arrayOfByte = getBytes(paramURL);\n/* 365 */ CodeSource codeSource = new CodeSource(null, (Certificate[])null);\n/* 366 */ if (!paramString.equals(\"sun.reflect.misc.Trampoline\")) {\n/* 367 */ throw new IOException(\"MethodUtil: bad name \" + paramString);\n/* */ }\n/* 369 */ return defineClass(paramString, arrayOfByte, 0, arrayOfByte.length, codeSource);\n/* */ }", "public Reflect(Class<? extends ReflectorFactory> defaultFactoryClass) {\n this.defaultFactoryClass = defaultFactoryClass;\n }", "public static boolean isProxyClass(Class cl) {\n return false;\n }", "public static Object newInstance(String className, Object... args) {\n try {\n Class<?> clazz = Class.forName(className);\n Constructor<?>[] constructors = clazz.getDeclaredConstructors();\n for (Constructor<?> constructor : constructors) {\n Class<?>[] types = constructor.getParameterTypes();\n if (types.length == args.length) {\n int matched = 0;\n for (; matched<types.length; matched++) {\n if (!types[matched].isAssignableFrom(args[matched].getClass())) {\n break;\n }\n }\n if (matched == args.length) {\n constructor.setAccessible(true);\n return constructor.newInstance(args);\n }\n }\n }\n } catch (Exception e) {\n Logger.w(\"Reflection\", \"newInstance \" + className + \" \" + e.toString());\n }\n return null;\n }", "public ReflectiveCapabilitiesFactory(String name, String capabilitiesClassName, Object... args) {\n this.name = name;\n this.capabilitiesClassName = capabilitiesClassName;\n this.args = args;\n try {\n capabilitiesClass = (Class<? extends Capabilities>) Class.forName(capabilitiesClassName);\n available = Capabilities.class.isAssignableFrom(capabilitiesClass);\n } catch (ClassNotFoundException e) {\n available = false;\n }\n }", "public void setClassName(String name)\n {\n _className = name;\n }", "public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "public <T extends SpriteManager> T newManager (String name, Class<T> type) {\n\t\tT manager = (T)mManagerMap.get(name);\n\t\tif (manager != null) return manager;\n\n\t\t// init sprite manager\n\t\tT sprite = obtainNewSprite(type);\n\t\t((SpriteManager)sprite).bind(name);\n\n\t\t// add to this world\n\t\tsprite.registerStateListener(this);\n\t\taddSingle(sprite);\n\t\tmManagerMap.put(name, sprite);\n\n\t\treturn sprite;\n\t}", "@VisibleForTesting\n public static <T> FailoverProxyProvider<T> createFailoverProxyProvider(\n Configuration conf, Class<FailoverProxyProvider<T>> failoverProxyProviderClass,\n Class<T> xface, URI nameNodeUri, AtomicBoolean fallbackToSimpleAuth) throws IOException {\n Preconditions.checkArgument(\n xface.isAssignableFrom(NamenodeProtocols.class),\n \"Interface %s is not a NameNode protocol\", xface);\n try {\n Constructor<FailoverProxyProvider<T>> ctor = failoverProxyProviderClass\n .getConstructor(Configuration.class, URI.class, Class.class);\n FailoverProxyProvider<T> provider = ctor.newInstance(conf, nameNodeUri,\n xface);\n return provider;\n } catch (Exception e) {\n String message = \"Couldn't create proxy provider \" + failoverProxyProviderClass;\n if (LOG.isDebugEnabled()) {\n LOG.debug(message, e);\n }\n if (e.getCause() instanceof IOException) {\n throw (IOException) e.getCause();\n } else if(e.getCause() instanceof RuntimeException && e.getCause().getCause() instanceof IOException){\n throw (IOException) e.getCause().getCause();\n } else {\n throw new IOException(message, e);\n }\n }\n }", "public ActiveXProxy (Hwnd hWnd, Guid classID, ActiveXComponent wrapper) \n throws ActiveXException\n {\n this(hWnd, new ActiveXModes(classID), // default modes\n wrapper);\n }", "public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {\n Test demoproxy = (Test)Proxy.newProxyInstance(Demo.class.getClassLoader(), Demo.class.getInterfaces(), new InvocationHandler() {\n @Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n System.out.println(\"向观众问好\");\n //执行目标对象方法\n Object returnValue = method.invoke(Demo.class.newInstance(), args);\n System.out.println(\"谢谢大家\");\n return returnValue;\n }\n });\n demoproxy.sing(\"aaa\",\"bbb\");\n\n ProxyFactory proxyFactory = new ProxyFactory(Demo001.class);\n Demo demoproxy1 = (Demo)proxyFactory.getProxyInstance();\n demoproxy1.sing(\"aaa\",\"bbb\");\n\n\n ProxyFactory proxyFactory1 = new ProxyFactory(Demo.class);\n Demo demoproxy2 = (Demo)proxyFactory.getProxyInstance();\n demoproxy2.sing(\"aaa1\",\"bbb1\");\n\n ThreadLocal threadLocal = new ThreadLocal();\n threadLocal.set(\"aa\");\n System.out.println(threadLocal.get());\n threadLocal.remove();\n Lock lock = new ReentrantLock();\n lock.newCondition().signal();\n\n }", "protected final Dependency createDependency( Object obj, String name) \r\n {\r\n\treturn dependencyFactory.createDependency( obj, name );\r\n }", "public void setClassName(String name) {\n this.className = name;\n }", "public ParameterizedInstantiateFactory(Class<? extends T> classToInstantiate) {\r\n super();\r\n this.classToInstantiate = classToInstantiate;\r\n }", "public static Object create(String className, Class<?>[] argTypes, Object[] argValues)\r\n\t\t\tthrows CreateObjectException {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass<?> clz = Class.forName(className);\r\n\t\t\tif (argTypes == null) {\r\n\t\t\t\treturn clz.newInstance();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tConstructor<?> c = clz.getConstructor(argTypes);\r\n\t\t\t\treturn c.newInstance(argValues);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CreateObjectException(e);\r\n\t\t}\r\n\t}", "public Object newInstance( Class<?> clazz )\n {\n return newInstance( Thread.currentThread().getContextClassLoader(),\n clazz );\n \n }", "@SuppressFBWarnings(value = {\"REC_CATCH_EXCEPTION\", \"DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED\"}, justification = \"Expected internal invocation.\")\n protected static Object proxy(Class<?> proxy, Map<Method, Dispatcher> dispatchers) {\n ClassWriter classWriter = new ClassWriter(0);\n classWriter.visit(ClassFileVersion.ofThisVm(ClassFileVersion.JAVA_V5).getMinorMajorVersion(),\n Opcodes.ACC_PUBLIC,\n Type.getInternalName(proxy) + \"$Proxy\",\n null,\n Type.getInternalName(Object.class),\n new String[]{Type.getInternalName(proxy)});\n for (Map.Entry<Method, Dispatcher> entry : dispatchers.entrySet()) {\n Class<?>[] exceptionType = entry.getKey().getExceptionTypes();\n String[] exceptionTypeName = new String[exceptionType.length];\n for (int index = 0; index < exceptionType.length; index++) {\n exceptionTypeName[index] = Type.getInternalName(exceptionType[index]);\n }\n MethodVisitor methodVisitor = classWriter.visitMethod(Opcodes.ACC_PUBLIC,\n entry.getKey().getName(),\n Type.getMethodDescriptor(entry.getKey()),\n null,\n exceptionTypeName);\n methodVisitor.visitCode();\n int offset = (entry.getKey().getModifiers() & Opcodes.ACC_STATIC) == 0 ? 1 : 0;\n for (Class<?> type : entry.getKey().getParameterTypes()) {\n offset += Type.getType(type).getSize();\n }\n methodVisitor.visitMaxs(entry.getValue().apply(methodVisitor, entry.getKey()), offset);\n methodVisitor.visitEnd();\n }\n MethodVisitor methodVisitor = classWriter.visitMethod(Opcodes.ACC_PUBLIC,\n MethodDescription.CONSTRUCTOR_INTERNAL_NAME,\n Type.getMethodDescriptor(Type.VOID_TYPE),\n null,\n null);\n methodVisitor.visitCode();\n methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);\n methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL,\n Type.getInternalName(Object.class),\n MethodDescription.CONSTRUCTOR_INTERNAL_NAME,\n Type.getMethodDescriptor(Type.VOID_TYPE),\n false);\n methodVisitor.visitInsn(Opcodes.RETURN);\n methodVisitor.visitMaxs(1, 1);\n methodVisitor.visitEnd();\n classWriter.visitEnd();\n byte[] binaryRepresentation = classWriter.toByteArray();\n if (DUMP_FOLDER != null) {\n try {\n OutputStream outputStream = new FileOutputStream(new File(DUMP_FOLDER, proxy.getName() + \"$Proxy.class\"));\n try {\n outputStream.write(binaryRepresentation);\n } finally {\n outputStream.close();\n }\n } catch (Throwable ignored) {\n /* do nothing */\n }\n }\n try {\n return new DynamicClassLoader(proxy)\n .defineClass(proxy.getName() + \"$Proxy\",\n binaryRepresentation,\n 0,\n binaryRepresentation.length,\n JavaDispatcher.class.getProtectionDomain())\n .getConstructor(NO_PARAMETER)\n .newInstance(NO_ARGUMENT);\n } catch (Exception exception) {\n throw new IllegalStateException(\"Failed to create proxy for \" + proxy.getName(), exception);\n }\n }", "public static Class classForName(String nameClass)\n\t\t{\n\t\t\tClass classObject=null;\n\t\t\ttry {\n\t\t\tclassObject = Class.forName(\"com.spring.entity.\"+nameClass);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\treturn classObject;\n\t\t}", "public ObjectPool(Class javaBeanClass, String poolName) {\n setObjectFactory(javaBeanClass);\n setName(poolName);\n }", "NewClass1 createNewClass1();", "public static ModelLearnable newInstancebyClassName(Class modelClassName) {\r\n try {\r\n return (ModelLearnable) modelClassName.newInstance();\r\n } catch (InstantiationException e) {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "private Proxy createProxyTwo() {\n\t\t\n\t\tWorkingMemoryPointer origin = createWorkingMemoryPointer (\"fakevision\", \"blibli2\", \"VisualObject\");\n\t\tProxy proxy = createNewProxy(origin, 0.35f);\n\t\t\n\t\tFeatureValue blue = createStringValue (\"blue\", 0.73f);\n\t\tFeatureValue red = createStringValue (\"red\", 0.23f);\n\t\tFeature feat = createFeature (\"colour\");\n\t\taddFeatureValueToFeature(feat, blue);\n\t\taddFeatureValueToFeature(feat,red);\n\t\taddFeatureToProxy (proxy, feat);\n\t\t\t\t\n\t\tFeatureValue spherical = createStringValue (\"spherical\", 0.63f);\n\t\tFeature feat2 = createFeatureWithUniqueFeatureValue (\"shape\", spherical);\n\t\taddFeatureToProxy (proxy, feat2);\n\t\t\n\t\tlog(\"Proxy two for belief model successfully created\");\n\t\treturn proxy;\n\t}" ]
[ "0.6642798", "0.66094023", "0.6419302", "0.6387556", "0.62364185", "0.6205842", "0.6050781", "0.59419966", "0.592029", "0.5876734", "0.5722608", "0.571413", "0.5678637", "0.56678337", "0.56669843", "0.5620054", "0.5598193", "0.559124", "0.55882347", "0.55807126", "0.55728394", "0.55410624", "0.55399525", "0.5467461", "0.54037136", "0.54027176", "0.5400288", "0.5391575", "0.5390823", "0.53891915", "0.5367416", "0.5349003", "0.5341422", "0.53392375", "0.5335061", "0.5315941", "0.53114694", "0.52995116", "0.528251", "0.52820545", "0.5273275", "0.5270152", "0.5258916", "0.52570945", "0.52447325", "0.5225407", "0.52084786", "0.52038974", "0.51987106", "0.51986444", "0.51794285", "0.5177162", "0.5169572", "0.51552695", "0.51472664", "0.5145641", "0.5143286", "0.51274896", "0.51225716", "0.51058435", "0.5083193", "0.5081296", "0.508069", "0.50797015", "0.50742996", "0.5071302", "0.50492394", "0.5045118", "0.5018112", "0.5010097", "0.5005431", "0.4998946", "0.49858958", "0.4981739", "0.49762794", "0.49758947", "0.49703833", "0.4963352", "0.49403754", "0.4934103", "0.4931961", "0.49305028", "0.49275032", "0.49086067", "0.48995417", "0.48960745", "0.48957038", "0.48851824", "0.4874551", "0.48680598", "0.4867875", "0.48584136", "0.4856725", "0.48560333", "0.48535514", "0.48496225", "0.48490933", "0.48441482", "0.48403317", "0.48388976" ]
0.6324618
4
This is the app specific ID, only apps with the same ID will be able to communicate
public BlueMeshServiceBuilder uuid( UUID a_uuid ){ uuid = a_uuid; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AppID getIdentifier () ;", "public String getApplicationId();", "@Override\n\tpublic String getAppId() {\n\t\treturn app.getAppId();\n\t}", "public String getAppID() {\n return appID;\n }", "ApplicationId appId();", "public String getAppId();", "public String getAppid() {\n return appid;\n }", "public String getAppid() {\n return appid;\n }", "short appId();", "public abstract String getApplicationId();", "public String getApplicationID() {\n return applicationID;\n }", "public void setApplicationID(String value) {\n this.applicationID = value;\n }", "public String getAppId() {\r\n return appId;\r\n }", "public static void setAppId(String id) {\n if (Platform.appId == null) {\n Platform.appId = id;\n // reset originId\n Platform.originId = null;\n log.info(\"application instance ID set to {}\", Platform.appId);\n } else {\n throw new IllegalArgumentException(\"application instance ID is already set\");\n }\n }", "public void setAppID(String appID) {\n this.appID = appID;\n }", "@Override\n\tpublic long getApplicationId() {\n\t\treturn _userSync.getApplicationId();\n\t}", "public java.lang.String getApplicationID() {\r\n return applicationID;\r\n }", "public java.lang.String getApplicationId() {\r\n return applicationId;\r\n }", "com.clarifai.grpc.api.UserAppIDSet getUserAppId();", "com.clarifai.grpc.api.UserAppIDSet getUserAppId();", "protected String getAppID() {\n if (m_iport > 0) {\n return new String(Integer.toString(m_iport));\n } else {\n return null;\n }\n }", "public Long getAppId() {\n return this.AppId;\n }", "public void setAppid(String appid) {\n this.appid = appid;\n }", "@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();", "@java.lang.Override\n public java.lang.String getAppId() {\n java.lang.Object ref = appId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appId_ = s;\n return s;\n }\n }", "UUID getApnsId();", "public java.lang.String getAppId() {\n java.lang.Object ref = appId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appId_ = s;\n return s;\n }\n }", "public java.lang.String getAppId() {\n java.lang.Object ref = appId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAppId() {\n java.lang.Object ref = appId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getAppUid() {\n return appUid;\n }", "String getComponentAppId();", "public void setAppId(Long AppId) {\n this.AppId = AppId;\n }", "int getRoutingAppID();", "public String getAppId()\r\n {\r\n return getSemanticObject().getProperty(data_appId);\r\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "String getGeneralID() throws ApplicationException;", "public int getApplicationId() {\r\n\t\tif (applicationId != null) {\r\n\t\t\treturn applicationId;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tJSONObject response = getJSonResponse(Unirest.get(url + NAMED_APPLICATION_API_URL)\r\n\t\t\t\t\t.queryString(\"name\", SeleniumTestsContextManager.getApplicationName()));\r\n\t\t\tapplicationId = response.getInt(\"id\");\r\n\t\t\treturn applicationId;\r\n\t\t} catch (UnirestException e) {\r\n\t\t\tthrow new ConfigurationException(String.format(\"Application %s does not exist in variable server, please create it\", SeleniumTestsContextManager.getApplicationName()));\r\n\t\t}\r\n\t}", "public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }", "public static String getNeedKillAppId() {\n }", "public Long getSubAppId() {\n return this.SubAppId;\n }", "public static int notificationManagerIdForApkId(String apkId) {\n\t\treturn Math.abs((\"Userstudy\" + apkId).hashCode());\n\t}", "public static String getPhoneId(Context context) {\n \t\tString PhoneId = Settings.Secure.getString(context.getContentResolver(),Settings.Secure.ANDROID_ID);\n \t\treturn PhoneId;\n \n \t}", "public void setApplicationId(java.lang.String applicationId) {\r\n this.applicationId = applicationId;\r\n }", "protected String getID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_ID, null);\n }", "public interface AppIdCallback {\n String getAppId();\n}", "@Override\n public int getDeviceId() {\n return 0;\n }", "public void addApplicationIdentifier(String id) {\n applicationIdentifiers.add(id);\n }", "@Nullable\n @SuppressLint(\"HardwareIds\")\n private String createId(Context context) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String device = Build.DEVICE;\n id += device;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n return HexCoder.toHex(md.digest(id.getBytes(\"UTF-8\")));\n } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {\n Log.e(TAG, \"createId: \"+e.toString());\n }\n return null;\n }", "private String getRegistrationId(Context context) {\n final SharedPreferences prefs = getGCMPreferences(context);\n String registrationId = prefs.getString(PROPERTY_REG_ID, \"\");\n if (registrationId.isEmpty()) {\n Log.i(TAG, \"Registration not found.\");\n return \"\";\n }\n // Check if app was updated; if so, it must clear the registration ID\n // since the existing regID is not guaranteed to work with the new\n // app version.\n int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION,\n Integer.MIN_VALUE);\n int currentVersion = getAppVersion(context);\n if (registeredVersion != currentVersion) {\n Log.i(TAG, \"App version changed.\");\n return \"\";\n }\n return registrationId;\n }", "public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}", "public void setApplicationID(java.lang.String applicationID) {\r\n this.applicationID = applicationID;\r\n }", "public int getId() throws android.os.RemoteException;", "private String getLuisAppId() {\n return this.getString(R.string.luisAppID);\n }", "String getProgramId();", "@Override public int getId() throws android.os.RemoteException\n {\n return 0;\n }", "public static String getDeviceID(Context context) {\n return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "private String getRegistrationId(Context context)\n {\n\t\tfinal SharedPreferences prefs = getGcmPreferences(context);\n\t\t\n\t\tString registrationId = prefs.getString(Globals.PREFS_PROPERTY_REG_ID, \"\");\n\t\t\n\t\tif (registrationId == null || registrationId.equals(\"\"))\n\t\t{\n\t\t Log.i(Globals.TAG, \"Registration not found.\");\n\t\t return \"\";\n\t\t}\n\t\t// Check if app was updated; if so, it must clear the registration ID\n\t\t// since the existing regID is not guaranteed to work with the new\n\t\t// app version.\n\t\tint registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);\n\t\tint currentVersion = getAppVersion(context);\n\t\tif (registeredVersion != currentVersion)\n\t\t{\n\t\t Log.i(Globals.TAG, \"App version changed.\");\n\t\t return \"\";\n\t\t}\n\t\treturn registrationId;\n }", "public String getOpenidApp() {\n return openidApp;\n }", "protected void setAppID(String newValue) {\n try {\n m_iport = Integer.parseInt(newValue);\n } catch (NumberFormatException exc) {\n m_iport = 0;\n }\n }", "public String getAppKey(Integer appId) {\n\t\treturn \"d3d1f52452be41aaa1b68e33d59d0188\";\n\t}", "public String getCallId();", "String getTheirPartyId();", "int getReceiverid();", "public static String m585j(Context context) {\r\n try {\r\n return Secure.getString(context.getContentResolver(), \"android_id\");\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "int getInstanceId();", "int getInstanceId();", "int getInstanceId();", "public final int getAppID(final String appname)\n throws IOException, JSONException {\n int idapp = -1;\n URL obj = new URL(fgURL + \"/v1.0/applications\");\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\n con.setRequestMethod(\"GET\");\n con.setRequestProperty(\"Authorization\", \"Bearer \" + token);\n int responseCode = con.getResponseCode();\n System.out.println(\"\\nSending 'GET' request to URL: \" + obj.toString());\n System.out.println(\"Response Code : \" + responseCode);\n\n if (responseCode == CODE2 || responseCode == CODE1) {\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n JSONObject myObject = JSONFactoryUtil.createJSONObject(\n response.toString());\n JSONArray myArray = myObject.getJSONArray(\"applications\");\n\n for (int i = 0; i < myArray.length(); i++) {\n JSONObject appobj = myArray.getJSONObject(i);\n String currentapp = appobj.getString(\"name\");\n\n if (currentapp.equals(appname)) {\n idapp = appobj.getInt(\"id\");\n }\n }\n System.out.println(\"id \" + appname + \": \" + idapp);\n } else {\n System.out.println(\"Unable to connect to the URL \"\n + obj.toString());\n }\n\n return idapp;\n }", "Integer getDeviceId();", "public String getAppuserid() {\n return appuserid;\n }", "public int getPeopleActivityInstanceId()\r\n {\r\n return mPeopleActivityInstanceId;\r\n }", "public int getRegAppid() {\n\t\t\treturn regAppid;\n\t\t}", "String getNotificationID();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getAppIdBytes() {\n java.lang.Object ref = appId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n appId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getInstanceId();", "protected String getServiceId(){\n return \"com.google.android.gms.nearby.messages.samples.nearbydevices\";\n }", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getDeviceId();", "public void setAppId(String value)\r\n {\r\n getSemanticObject().setProperty(data_appId, value);\r\n }", "public long getInHouseAppId() {\r\n\t\treturn inHouseAppId;\r\n\t}", "@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public String getSystemId();", "UUID getDeviceId();", "public static final String appendId(String url){\n\t\treturn url+\"&APPID=\"+appId;\n\t}", "@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }", "protected String getAppTaskID() {\r\n\t\treturn appTaskID;\r\n\t}", "public void setApplicationId(Integer applicationId) {\r\n\t\tthis.applicationId = applicationId;\r\n\t}", "String getService_id();", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "public void setAdvertisingID(final Context context) {\n // Checks if the Thread we are on is Main/UI\n // - If yes runs this function in a new Thread\n if (Looper.myLooper() == Looper.getMainLooper()) {\n new Thread(new Runnable() {\n public void run() {\n String playAdId = Util.getAdvertisingId(context);\n Logger.d(TAG, \"Advertising ID: %s\", playAdId);\n addToMobileContext(Parameters.ANDROID_IDFA, playAdId);\n }\n }).start();\n } else {\n String playAdId = Util.getAdvertisingId(context);\n Logger.d(TAG, \"Advertising ID: %s\", playAdId);\n addToMobileContext(Parameters.ANDROID_IDFA, playAdId);\n }\n }", "public void allinfo()\n\t\t{\n\t\t\tsendBroadcast(new Intent(\"android.provider.Telephony.SECRET_CODE\", Uri.parse(\"android_secret_code://4636\")));\n\n\n\t\t}", "public String getAppKey() {\n return appKey;\n }", "String getServerId();", "public static void m13806a(String applicationId) {\n f12472d = applicationId;\n }", "private static String getAppTokenId() {\n if (appTokenId == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (appTokenId == null) {\n try {\n if (OAuthProperties.isServerMode()) {\n appTokenId = OAuthServiceUtils.getAdminTokenId();\n }\n else {\n final String username =\n OAuthProperties.get(PathDefs.APP_USER_NAME);\n final String password =\n OAuthProperties.get(PathDefs.APP_USER_PASSWORD);\n appTokenId =\n OAuthServiceUtils.authenticate(username, password, false);\n }\n }\n catch (final OAuthServiceException oe) {\n Logger.getLogger(DefaultEntityManagerImpl.class.getName()).log(\n Level.SEVERE, null, oe);\n throw new WebApplicationException(oe);\n }\n }\n }\n }\n return appTokenId;\n }" ]
[ "0.74793774", "0.7411961", "0.73741174", "0.73726445", "0.73038065", "0.7202788", "0.72005624", "0.72005624", "0.7192832", "0.7060136", "0.68758345", "0.6841755", "0.681686", "0.67557484", "0.6735332", "0.6694711", "0.66852486", "0.6676236", "0.6661412", "0.6661412", "0.66133136", "0.6596614", "0.658682", "0.6506174", "0.6500313", "0.6467283", "0.64516795", "0.6447372", "0.6447372", "0.64386487", "0.63825697", "0.6370653", "0.6329431", "0.6329233", "0.6312748", "0.6299767", "0.6273029", "0.6259101", "0.62363243", "0.62227345", "0.62094885", "0.620151", "0.617498", "0.61629003", "0.6161526", "0.61512375", "0.61500365", "0.611965", "0.6117675", "0.6093982", "0.60911256", "0.6081929", "0.6069675", "0.60678476", "0.6067479", "0.6066845", "0.60658514", "0.6056062", "0.60443705", "0.6042337", "0.60344416", "0.6016884", "0.6012918", "0.60074484", "0.6004752", "0.6004752", "0.6004752", "0.6003358", "0.59868515", "0.598489", "0.59846616", "0.5982121", "0.59808207", "0.5956636", "0.59468997", "0.59345967", "0.59290665", "0.59290665", "0.59290665", "0.59290665", "0.592731", "0.5920375", "0.5917874", "0.5904824", "0.59043527", "0.59043527", "0.59043527", "0.5902573", "0.58951426", "0.5893836", "0.5891235", "0.5885673", "0.58785784", "0.58628845", "0.5861062", "0.5854519", "0.58406657", "0.5839521", "0.5809489", "0.5803096", "0.5802086" ]
0.0
-1
Enable bluetooth communications for this device
public BlueMeshServiceBuilder bluetooth( boolean enabled ){ bluetoothEnabled = enabled; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enableBT() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else if (!bluetoothAdapter.isEnabled()) {\n bluetoothAdapter.enable();\n }\n }", "public S<T> bluetooth(Boolean enable){\n\t\t \t \n\t\t\t BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\t\t\t boolean isEnabled = bluetoothAdapter.isEnabled();\n\t\t\t if (enable && !isEnabled) {\n\t\t\t bluetoothAdapter.enable(); \n\t\t\t }\n\t\t\t else if(!enable && isEnabled) {\n\t\t\t bluetoothAdapter.disable();\n\t\t\t }\n\n\t\t return this;\n\t }", "private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult(intent, 1);\n\t}", "private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }", "private void ensureBluetoothIsEnabled(){\r\n\t\t//if Bluetooth is not enabled, enable it now\r\n\t\tif (!mBtAdapter.isEnabled()) { \t\t\r\n \t enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n \t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n \t}\r\n\t}", "void activateBlue(BluetoothAdapter bluetoothAdapter){\r\n if (!bluetoothAdapter.isEnabled()) {\r\n Intent enableBlueTooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBlueTooth, REQUEST_CODE_ENABLE_BLUETOOTH);\r\n }\r\n }", "public void bluetooth_enable_discoverability()\r\n {\n\t\t\r\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\r\n\t\tdiscoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\r\n\t\tLoaderActivity.m_Activity.startActivity(discoverableIntent);\r\n\t\tserver_connect_thread = new Server_Connect_Thread();\r\n\t\tserver_connect_thread.start();\r\n\t\tmessages.clear();\r\n }", "private void turnOn(View v) {\n bluetoothAdapter.enable();\n }", "private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }", "private void checkBluetoothEnabled()\r\n {\r\n if (!mBluetoothAdapter.isEnabled())\r\n {\r\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBtIntent, BLUETOOTH_ENABLE_REQUEST_ID);\r\n } else\r\n checkNfcEnabled();\r\n }", "void setBluetoothService(BluetoothService bluetoothService);", "@Override\n public void onClick(View v) {\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }", "private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }", "public boolean isBluetoothEnabled() {\n BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();\n if (bluetooth == null)\n return false;//\"device not BT capable\";\n return bluetooth.isEnabled();\n }", "private void initWirelessCommunication() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n showToast(\"BLE is not supported\");\n finish();\n } else {\n showToast(\"BLE is supported\");\n // Access Location is a \"dangerous\" permission\n int hasAccessLocation = ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n if (hasAccessLocation != PackageManager.PERMISSION_GRANTED) {\n // ask the user for permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_ACCESS_LOCATION);\n // the callback method onRequestPermissionsResult gets the result of this request\n }\n }\n // enable wireless communication alternative\n if (communicationAdapter == null || !communicationAdapter.isReadyToBeUsed()) {\n assert communicationAdapter != null;\n Intent enableWirelessCommunicationIntent = new Intent(communicationAdapter.actionRequestEnable());\n startActivityForResult(enableWirelessCommunicationIntent, REQUEST_ENABLE_BT);\n }\n }", "public boolean setBluetoothEnabled(boolean enabled) {\n return isBluetoothAvailable() && (enabled ? mBluetoothAdapter.enable()\n : mBluetoothAdapter.disable());\n }", "@Override public void onClick(View v) {\n startActivity(new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE));\n }", "private boolean BTEnabled() {\n if (!BT.isEnabled()) { // Ask user's permission to switch the Bluetooth adapter On.\n Intent enableIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n return false;\n } else {\n DisplayToast(\"Bluetooth is already on\");\n return true;\n }\n }", "public void startBluetooth(){\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (!mBluetoothAdapter.isEnabled()) {\n Intent btIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n //btIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(btIntent);\n }\n mBluetoothAdapter.startDiscovery();\n System.out.println(\"@ start\");\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n getActivity().registerReceiver(mReceiver, filter);\n }", "static void toggle(Context context) {\n Log.i(TAG, \"toggle Bluetooth\");\n\n // Just toggle Bluetooth power, as long as we're not already in\n // an intermediate state.\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n int state = adapter.getState();\n if (state == BluetoothAdapter.STATE_OFF)\n adapter.enable();\n else if (state == BluetoothAdapter.STATE_ON)\n adapter.disable();\n }", "private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }", "@Override\n public boolean setActiveDevice(BluetoothDevice bluetoothDevice) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(Stub.DESCRIPTOR);\n boolean bl = true;\n if (bluetoothDevice != null) {\n parcel.writeInt(1);\n bluetoothDevice.writeToParcel(parcel, 0);\n } else {\n parcel.writeInt(0);\n }\n if (!this.mRemote.transact(23, parcel, parcel2, 0) && Stub.getDefaultImpl() != null) {\n bl = Stub.getDefaultImpl().setActiveDevice(bluetoothDevice);\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n parcel2.readException();\n int n = parcel2.readInt();\n if (n == 0) {\n bl = false;\n }\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n catch (Throwable throwable) {\n parcel2.recycle();\n parcel.recycle();\n throw throwable;\n }\n }", "public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }", "public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mmSocket.isConnected()) {\n try {\n mmSocket.connect();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n toastMsg(\"Connection Established\");\n\n String msg = msg2send;\n //msg += \"\\n\";\n OutputStream mmOutputStream = null;\n try {\n mmOutputStream = mmSocket.getOutputStream();\n mmOutputStream.write(msg.getBytes());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n } catch (IOException e) {\n Log.e(\"\", e.getMessage());\n mmSocket.close();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n toastMsg(\"Connection not Established\");\n\n\n }\n });\n\n /*try {\n Log.e(\"\", \"trying fallback\");\n mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(mmDevice,1);\n mmSocket.connect();\n Log.e(\"\", \"Connected\");\n }\n catch (Exception e2){\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n toastMsg(\"Couldn't establish Bluetooth connection!\");\n }*/\n }\n }\n\n\n/*\n if (mmOutputStream == null)\n try {\n mmOutputStream = mmSocket.getOutputStream();\n } catch (IOException e) {\n errorExit(\"Fatal Error\", \"In onResume(), input and output stream creation failed:\" + e.getMessage() + \".\");\n }*/\n\n } else {\n if (mBluetoothAdapter != null) {\n\n\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().matches(\".*\")) //Note, you will need to change this to match the name of your device\n {\n Log.e(\"Aquarium\", device.getName());\n mmDevice = device;\n sendBtMsg(msg2send);\n break;\n }\n }\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }", "public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }", "private void onEnableBluetoothResponse(int resultCode) {\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tlogger.debug(\"onEnableBluetoothResponse(): Bluetooth enabled. Starting Workout Service.\");\n\t\t\tworkoutServiceIntent = new Intent(this, WorkoutService.class);\n\t\t\tstartService(workoutServiceIntent);\n\t\t\tbindService(workoutServiceIntent, workoutServiceConn, BIND_AUTO_CREATE);\n\t\t}\n\n\t\telse {\n\t\t\tlogger.warn(\"onEnableBluetoothResponse(): User elected not to enable Bluetooth. Activity will now finish.\");\n\t\t\tfinish();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public boolean connect(BluetoothDevice bluetoothDevice) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(Stub.DESCRIPTOR);\n boolean bl = true;\n if (bluetoothDevice != null) {\n parcel.writeInt(1);\n bluetoothDevice.writeToParcel(parcel, 0);\n } else {\n parcel.writeInt(0);\n }\n if (!this.mRemote.transact(8, parcel, parcel2, 0) && Stub.getDefaultImpl() != null) {\n bl = Stub.getDefaultImpl().connect(bluetoothDevice);\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n parcel2.readException();\n int n = parcel2.readInt();\n if (n == 0) {\n bl = false;\n }\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n catch (Throwable throwable) {\n parcel2.recycle();\n parcel.recycle();\n throw throwable;\n }\n }", "public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }", "@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultDevice(ArrayList<BluetoothDevice> deviceList) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}", "@Override\n public void onClick(View v)\n {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n if (clicked) {\n registerDevicesBtn.setText(\"Register Devices\");\n clicked = false;\n mBluetoothAdapter.cancelDiscovery();\n Log.d(\"BT\", \"Cancelled task.\");\n } else {\n registerDevicesBtn.setText(\"Stop Registering Devices\");\n clicked = true;\n devices = new ArrayList<>();\n mBluetoothAdapter.startDiscovery();\n Log.d(\"BT\", \"Started task.\");\n }\n }", "public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }", "private void sendConfiguration() {\r\n if (currentBluetoothGatt == null) {\r\n Toast.makeText(this, \"Non Connecté\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n /*EditText ledGPIOPin = findViewById(R.id.editTextPin);\r\n EditText buttonGPIOPin = findViewById(R.id.editTextPin);\r\n final String pinLed = ledGPIOPin.getText().toString();\r\n final String pinButton = buttonGPIOPin.getText().toString();\r\n\r\n final BluetoothGattService service = currentBluetoothGatt.getService(BluetoothLEManager.DEVICE_UUID);\r\n if (service == null) {\r\n Toast.makeText(this, \"UUID Introuvable\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n final BluetoothGattCharacteristic buttonCharact = service.getCharacteristic(BluetoothLEManager.CHARACTERISTIC_BUTTON_PIN_UUID);\r\n final BluetoothGattCharacteristic ledCharact = service.getCharacteristic(BluetoothLEManager.CHARACTERISTIC_LED_PIN_UUID);\r\n\r\n buttonCharact.setValue(pinButton);\r\n ledCharact.setValue(pinLed);\r\n\r\n currentBluetoothGatt.writeCharacteristic(buttonCharact); // async code, you cannot send 2 characteristics at the same time!\r\n charsStack.add(ledCharact); // stack the next write*/\r\n }", "public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}", "@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }", "private void setupBluetooth() throws NullPointerException{\n if( Utils.isOS( Utils.OS.ANDROID ) ){\n \t\n // Gets bluetooth hardware from phone and makes sure that it is\n // non-null;\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n \n // If bluetooth hardware does not exist...\n if (adapter == null) {\n Log.d(TAG, \"BluetoothAdapter is is null\");\n throw new NullPointerException(\"BluetoothAdapter is null\");\n } else {\n Log.d(TAG, \"BluetoothAdapter is is non-null\");\n }\n \n bluetoothName = adapter.getName();\n \n //TODO: restart bluetooth?\n \t\n try {\n bluetoothConnectionThreads.add( new ServerThread(adapter, router, uuid) );\n } catch (NullPointerException e) {\n throw e;\n }\n if (Constants.DEBUG)\n Log.d(TAG, \"Sever Thread Created\");\n // Create a new clientThread\n bluetoothConnectionThreads.add( new ClientThread(adapter, router, uuid) );\n if (Constants.DEBUG)\n Log.d(TAG, \"Client Thread Created\");\n }\n else if( Utils.isOS( Utils.OS.WINDOWS ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.LINUX ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.OSX ) ){\n //TODO: implement this\n }\n else{\n //TODO: throw exception?\n }\n \n }", "public boolean enableService() {\n \tlog_d( \"enabledService()\" );\n \tshowTitleNotConnected();\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return false;\n // If BT is not on, request that it be enabled.\n // setupChat() will then be called during onActivityResult\n if ( !mBluetoothAdapter.isEnabled() ) {\n\t\t\t// startActivity Adapter Enable\n\t\t\treturn true;\n // Otherwise, setup the chat session\n } else {\n initService();\n }\n return false;\n }", "private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }", "public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }", "@Override\n public void askPermission() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth LE. Buy another phone.\");\n builder.setPositiveButton(android.R.string.ok, null);\n finish();\n }\n\n //Checking if the Bluetooth is on/off\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth.\");\n builder.setPositiveButton(android.R.string.ok, null);\n } else {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 2);\n }\n }\n\n }", "public void openBluetooth() throws IOException {\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n mmSocket.connect();\n mmOutputStream = mmSocket.getOutputStream();\n mmInputStream = mmSocket.getInputStream();\n\n beginListenForData();\n\n btStatusDisplay.setText(\"Bluetooth Connection Opened\");\n }", "private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n mCheckBt = false;\n if (requestCode == REQUEST_ENABLE_BT && resultCode != RESULT_OK) {\n// mScanButton.setEnabled(false);\n Toast.makeText(this, getString(R.string.bluetooth_not_enabled), Toast.LENGTH_LONG).show();\n }\n }", "private void connectToAdapter() {\n if (chosen) {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n // creation and connection of a bluetooth socket\n try {\n BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n setBluetoothSocket(socket);\n connected = true;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n connect.setText(\"Disconnect\");\n connect.setTextColor(Color.RED);\n }\n });\n } catch (IOException e) {\n Log.d(\"Exception\", \"Bluetooth IO Exception c\");\n connected = false;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(currContext, R.string.cannotConnect, Toast.LENGTH_SHORT).show();\n connect.setText(\"Connect\");\n connect.setTextColor(Color.BLACK);\n mode.setEnabled(true);\n }\n });\n }\n }\n if (bluetoothSocket.getRemoteDevice().getAddress() != null)\n Log.d(TAG, \"Bluetooth connected\");\n Log.d(TAG, \"Device address: \" + bluetoothSocket.getRemoteDevice().getAddress());\n initializeCom();\n }", "private void checkEnableBt() {\n if (mBtAdapter == null || !mBtAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }", "private void checkBleSupportAndInitialize() {\n Log.d(TAG, \"checkBleSupportAndInitialize: \");\n // Use this check to determine whether BLE is supported on the device.\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.d(TAG,\"device_ble_not_supported \");\n Toast.makeText(this, R.string.device_ble_not_supported,Toast.LENGTH_SHORT).show();\n return;\n }\n // Initializes a Blue tooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n if (mBluetoothAdapter == null) {\n // Device does not support Blue tooth\n Log.d(TAG, \"device_ble_not_supported \");\n Toast.makeText(this,R.string.device_ble_not_supported, Toast.LENGTH_SHORT).show();\n return;\n }\n\n //打开蓝牙\n if (!mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"open bluetooth \");\n bluetoothUtils.openBluetooth();\n }\n }", "private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }", "public void checkBluetooth(BluetoothAdapter bluetoothAdapter){\n if(bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }", "@Override\n public IBinder onBind(Intent intent) {\n\n AppConstants.RebootHF_reader = false;\n if (mBluetoothLeService != null) {\n final boolean result = mBluetoothLeService.connect(mDeviceAddress);\n Log.d(TAG, \"Connect request result=\" + result);\n }\n\n\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void checkBTState() {\n\n if (btAdapter == null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }", "private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }", "private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }", "public void checkForBluetooth() {\n if (hasBluetoothSupport()) {\n ensureBluetoothEnabled();\n } else {\n showToast(\"Device does not support BlueTooth\");\n }\n }", "@Override\n public void checkBluetoothInteface() {\n if (!isConnected) {\n checkForBluetooth();\n }\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t if(btAdapt.isEnabled()){\n\t\t \tbtAdapt.disable();\n\t\t }else {\n\t\t\t\tIntent intent =new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}", "@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }", "private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getContext(), \"El dispositivo no soporta bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // if user chooses not to enable Bluetooth.\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n showToast(\"Bluetooth is required for this application to work\");\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void enableTXNotification()\n { \n \t/*\n \tif (mBluetoothGatt == null) {\n \t\tshowMessage(\"mBluetoothGatt null\" + mBluetoothGatt);\n \t\tbroadcastUpdate(DEVICE_DOES_NOT_SUPPORT_UART);\n \t\treturn;\n \t}\n \t\t*/\n \tBluetoothGattService RxService = mBluetoothGatt.getService(RX_SERVICE_UUID);\n \tif (RxService == null) {\n showMessage(\"Rx service not found!\");\n broadcastUpdate(DEVICE_DOES_NOT_SUPPORT_UART);\n return;\n }\n \tBluetoothGattCharacteristic TxChar = RxService.getCharacteristic(TX_CHAR_UUID);\n if (TxChar == null) {\n showMessage(\"Tx charateristic not found!\");\n broadcastUpdate(DEVICE_DOES_NOT_SUPPORT_UART);\n return;\n }\n mBluetoothGatt.setCharacteristicNotification(TxChar,true);\n \n BluetoothGattDescriptor descriptor = TxChar.getDescriptor(CCCD);\n descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);\n mBluetoothGatt.writeDescriptor(descriptor);\n \t\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n \n Log.d(TAG, \"onActivityResult \" + resultCode);\n switch (requestCode) {\n //for now, only dealiing with insecure connection\n //i don't think its possible to have secure connections with a serial profile\n case REQUEST_CONNECT_DEVICE_INSECURE:\n if(resultCode == Activity.RESULT_OK){\n setupBluetooth();//since BT is enabled, setup client service\n connectToDevice(data, false);\n }\n else\n setStatus(BluetoothClientService.STATE_NONE);\n break;\n case REQUEST_ENABLE_BT:\n // When the request to enable Bluetooth returns\n if (resultCode == Activity.RESULT_OK) {\n Toast.makeText(this, \"Bluetooth is now enabled\", Toast.LENGTH_SHORT).show();\n }\n else {\n // User did not enable Bluetooth or an error occurred\n Log.d(TAG, \"BT not enabled\");\n Toast.makeText(this, R.string.bt_not_enabled_leaving, Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n }", "@Test\n public void testEnable() {\n Assert.assertFalse(mAdapterService.isEnabled());\n\n mAdapterService.enable();\n\n // Start GATT\n verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times(1)).startService(any());\n milliSleep(CONTEXT_SWITCH_MS);\n mAdapterService.onProfileServiceStateChanged(GattService.class.getName(),\n BluetoothAdapter.STATE_ON);\n\n // Wait for the native initialization (remove when refactored)\n milliSleep(NATIVE_INIT_MS);\n\n mAdapterService.onLeServiceUp();\n milliSleep(ONE_SECOND_MS);\n\n // Start PBAP and PAN\n verify(mMockContext, timeout(ONE_SECOND_MS).times(3)).startService(any());\n mAdapterService.onProfileServiceStateChanged(PanService.class.getName(),\n BluetoothAdapter.STATE_ON);\n mAdapterService.onProfileServiceStateChanged(BluetoothPbapService.class.getName(),\n BluetoothAdapter.STATE_ON);\n\n milliSleep(CONTEXT_SWITCH_MS);\n\n Assert.assertTrue(mAdapterService.isEnabled());\n }", "private void resetBluetooth() {\n if (mBtAdapter != null) {\n mBtAdapter.disable();\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n checkEnableBt();\n }\n }, 200);\n\n }\n }", "void bluetoothDeactivated();", "private void btnFindDevicesClicked(Intent intent, int findDeviceRequest)\n {\n if (btAdapter.isEnabled()) startActivityForResult(intent, findDeviceRequest);\n // Else display error until bluetooth is enabled\n else\n {\n Toast.makeText(getApplicationContext(), \"Enable Bluetooth to continue\", Toast.LENGTH_SHORT).show();\n setUpBluetooth();\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_ENABLE_BT:\n\t\t\tif(resultCode != RESULT_OK){\n\t\t\t\tToast.makeText(this, \"An error occured while enabling BT.\", Toast.LENGTH_LONG).show();\n\t\t\t\thasBTenabled = false;\n\t\t\t\tfinish();\n\t\t\t}else{\n\t\t\t\tsetupBTService();\n\t\t\t\tupdateBluetoothList();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase BT_SETTINGS_RESULT:\n\t\t\tupdateBluetoothList();\n\t\t\tbreak;\n\t\t\t\n case REQUEST_CONNECT_DEVICE_SECURE:\n // When DeviceListActivity returns with a device to connect\n if (resultCode == Activity.RESULT_OK) {\n connectDevice(data, true);\n }\n break;\n\t\t}\n\t}", "private void connect() {\n // after 10 seconds its connected\n new Handler().postDelayed(\n new Runnable() {\n public void run() {\n Log.d(TAG, \"Bluetooth Low Energy device is connected!!\");\n // Toast.makeText(getApplicationContext(),\"Connected!\",Toast.LENGTH_SHORT).show();\n stateService = Constants.STATE_SERVICE.CONNECTED;\n startForeground(Constants.NOTIFICATION_ID_FOREGROUND_SERVICE, prepareNotification());\n }\n }, 10000);\n\n }", "protected void setup(){\n setupRouter();\n \n if( bluetoothEnabled ){\n setupBluetooth();\n }\n }", "public boolean connect() {\n try {\n this.bluetoothSocket = this.device.createRfcommSocketToServiceRecord(this.device.getUuids()[0].getUuid());\n this.bluetoothSocket.connect();\n return true;\n } catch (IOException ex) {\n try {\n this.bluetoothSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.bluetoothSocket = null;\n }\n return false;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"onActivityResult called\");\n\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n\n // User choose NOT to enable Bluetooth.\n mAlertBlue = null;\n showNegativeDialog(getResources().getString(R.string.blue_error_title),\n getResources().getString(R.string.blue_error_msg)\n );\n\n } else {\n\n // User choose to enable Bluetooth.\n mAlertBlue = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n verifyPermissions(mActivity);\n else {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n scanLeDevice(true);\n }\n }\n }", "public void enableMic(boolean enable);", "public boolean checkBluetooth() {\n if (!mActivity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(mActivity, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n }\n\n // Initializes a Bluetooth adapter. For API level 18 and above, get a reference to\n // BluetoothAdapter through BluetoothManager.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) mActivity.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n // Checks if Bluetooth is supported on the device.\n if (mBluetoothAdapter == null) {\n Toast.makeText(mActivity, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private void enableBtmon() {\n System.out.println(\"Starting Btmon Service...\");\n try {\n btmonProcess = new ProcessBuilder(\"/usr/bin/btmon\").start();\n InputStreamReader inputStream = new InputStreamReader(btmonProcess.getInputStream());\n int size;\n char buffer[] = new char[1024];\n while ((size = inputStream.read(buffer, 0, 1024)) != -1) {\n // System.out.println(\" --- Read ----\");\n String data = String.valueOf(buffer, 0, size);\n processBeaconMessage(data);\n // Thread.sleep(1000);\n }\n } catch (IOException ex ) {\n ex.printStackTrace();\n } catch (Exception ex ) {\n ex.printStackTrace();\n } finally {\n if (btmonProcess != null)\n btmonProcess.destroy();\n }\n }", "private void setBootReceiverEnabled(boolean enabled) {\n int enabledState;\n if (enabled) enabledState = PackageManager.COMPONENT_ENABLED_STATE_ENABLED;\n else enabledState = PackageManager.COMPONENT_ENABLED_STATE_DISABLED;\n\n getPackageManager().setComponentEnabledSetting(\n new ComponentName(this, BootReceiver.class),\n enabledState,\n PackageManager.DONT_KILL_APP);\n }", "private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}", "public void startBTConnection(BluetoothDevice device, UUID uuid){\n Log.d(TAG, \"startBTConnection: Initializing RFCOM Bluetooth Connection.\");\n mBluetoothConnection.startClient(device,uuid);\n }", "public void connectService() {\n log_d( \"connectService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) {\n\t\t\ttoast_short( \"No Action in debug\" );\n \treturn;\n }\n\t\t// connect the BT device at once\n\t\t// if there is a device address. \n\t\tString address = getPrefAddress();\n\t\tif ( isPrefUseDevice() && ( address != null) && !address.equals(\"\") ) {\n\t \tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t \tif ( mBluetoothService != null ) {\n\t \t log_d( \"connect \" + address );\n\t \tmBluetoothService.connect( device );\n\t }\n\t\t// otherwise\n\t\t// send message for the intent of the BT device list\n\t\t} else {\n\t\t\tnotifyDeviceList();\n\t\t}\n\t}", "public void scanBleDevice(Boolean enable);", "public void checkBTState() {\n if(mAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (mAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n ((Activity) mContext).startActivityForResult(enableBtIntent, 1);\n }\n }\n }", "public void buttonClick_connect(View view)\n\t{\n\t\tAppSettings.showConnectionLost = false;\n\t\tLog.i(TAG, \"showConnectionLost = false\");\n\t\t\n\t\tAppSettings.bluetoothConnection = new BluetoothConnection(this.getApplicationContext(), this.btConnectionHandler);\n\t\tBluetoothAdapter btAdapter = AppSettings.bluetoothConnection.getBluetoothAdapter();\n\t\t\n\t\t// If the adapter is null, then Bluetooth is not supported\n if (btAdapter == null) {\n \tToast.makeText(getApplicationContext(), R.string.bt_not_available, Toast.LENGTH_LONG).show();\n }\n else {\n \t// If Bluetooth is not on, request that it be enabled.\n if (!btAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else {\n \t// Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(getApplicationContext(), DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n }\n }\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }", "public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }", "public void enableReading(){\n active = true;\n registerBroadcastReceiver();\n }", "private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}", "private void initBluetooth() {\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n this.registerReceiver(mReceiver, filter);\n\n // Register for broadcasts when discovery has finished\n filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n this.registerReceiver(mReceiver, filter);\n\n // Get the local Bluetooth adapter\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // Get a set of currently paired devices\n Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(this, mHandler);\n }", "public static boolean getBluetoothAdapterIsEnabled() {\n\t\treturn mBluetoothAdapterIsEnabled;\n\t}", "public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}", "public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }", "public void connectToAccessory() {\n\t\tif (mConnection != null)\n\t\t\treturn;\n\n\t\tif (getIntent().hasExtra(BTDeviceListActivity.EXTRA_DEVICE_ADDRESS)) {\n\t\t\tString address = getIntent().getStringExtra(\n\t\t\t\t\tBTDeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\t\t\tLog.i(ADK.TAG, \"want to connect to \" + address);\n\t\t\tmConnection = new BTConnection(address);\n\t\t\tperformPostConnectionTasks();\n\t\t} else {\n\t\t\t// assume only one accessory (currently safe assumption)\n\t\t\tUsbAccessory[] accessories = mUSBManager.getAccessoryList();\n\t\t\tUsbAccessory accessory = (accessories == null ? null\n\t\t\t\t\t: accessories[0]);\n\t\t\tif (accessory != null) {\n\t\t\t\tif (mUSBManager.hasPermission(accessory)) {\n\t\t\t\t\topenAccessory(accessory);\n\t\t\t\t} else {\n\t\t\t\t\t// synchronized (mUsbReceiver) {\n\t\t\t\t\t// if (!mPermissionRequestPending) {\n\t\t\t\t\t// mUsbManager.requestPermission(accessory,\n\t\t\t\t\t// mPermissionIntent);\n\t\t\t\t\t// mPermissionRequestPending = true;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Log.d(TAG, \"mAccessory is null\");\n\t\t\t}\n\t\t}\n\n\t}", "public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public void startBTConnection(BluetoothDevice device, UUID uuid){\n Log.d(TAG, \"startBTConnection: Initializing RFCOM Bluetooth Connection.\");\n\n mBluetoothConnection.startClient(device,uuid);\n }", "@Override\r\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n Log.v(TAG, \"** onActivityResult **\");\r\n // determine from which activity\r\n switch (requestCode) {\r\n // if it was the request to enable Bluetooth:\r\n case REQUEST_ENABLE_BT:\r\n if (resultCode == Activity.RESULT_OK) {\r\n // Bluetooth is enabled now\r\n Log.v(TAG, \"** Bluetooth is now enabled**\");\r\n } else {\r\n // user decided not to enable Bluetooth so exit application\r\n Log.v(TAG, \"** Bluetooth is NOT enabled**\");\r\n Toast.makeText(this, \"Bluetooth not enabled\",\r\n Toast.LENGTH_LONG).show();\r\n finish();\r\n }\r\n }\r\n }", "public void transmit_flags(){\n BluetoothGattCharacteristic txChar = mBleService.getCharacteristic(deviceAddress, GattServices.UART_SERVICE, GattCharacteristics.TX_CHARACTERISTIC);/**---------------------------------------------------------------------------------------------------------*/\n /**\n * added to sent 1 or 2 or 3 to the bluetooth device\n */\n if(ExerciseInstructionFragment.flag==1)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x01});\n Log.d(TAG, \"Data sent via flex\");}\n else if(ExerciseInstructionFragment.flag==2)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x02});\n Log.d(TAG, \"Data sent via imu\");}\n else if(ExerciseInstructionFragment.flag==3)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x03});}\n\n }", "private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }", "public void registerCallback() {\n if (mLocalManager == null) {\n Log.e(TAG, \"registerCallback() Bluetooth is not supported on this device\");\n return;\n }\n mLocalManager.setForegroundActivity(mFragment.getContext());\n mLocalManager.getEventManager().registerCallback(this);\n mLocalManager.getProfileManager().addServiceListener(this);\n forceUpdate();\n }", "public void setBluetoothService(BluetoothService bluetoothService) {\n this.bluetoothService = bluetoothService;\n }", "private void checkBTState() {\n if(bluetoothAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not supported\");\n } else {\n if (!bluetoothAdapter.isEnabled()) {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }", "private void initBLESetup() {\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n //Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app.\n //Obtaining dynamic permissions from the user\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //23\n if (this.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"This app needs location access.\");\n builder.setMessage(\"Please grant location access to this app.\");\n builder.setPositiveButton(android.R.string.ok, null);\n builder.setOnDismissListener(new DialogInterface.OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_REQUEST_COARSE_LOCATION);\n }\n\n });// See onRequestPermissionsResult callback method for negative behavior\n builder.show();\n }\n }\n // Create callback methods\n if (Build.VERSION.SDK_INT >= 21) //LOLLIPOP\n newerVersionScanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n BluetoothDevice btDevice = result.getDevice();\n ScanRecord mScanRecord = result.getScanRecord();\n int rssi = result.getRssi();\n// Log.i(TAG, \"Address: \"+ btDevice.getAddress());\n// Log.i(TAG, \"TX Power Level: \" + result.getScanRecord().getTxPowerLevel());\n// Log.i(TAG, \"RSSI in DBm: \" + rssi);\n// Log.i(TAG, \"Manufacturer data: \"+ mScanRecord.getManufacturerSpecificData());\n// Log.i(TAG, \"device name: \"+ mScanRecord.getDeviceName());\n// Log.i(TAG, \"Advertise flag: \"+ mScanRecord.getAdvertiseFlags());\n// Log.i(TAG, \"service uuids: \"+ mScanRecord.getServiceUuids());\n// Log.i(TAG, \"Service data: \"+ mScanRecord.getServiceData());\n byte[] recordBytes = mScanRecord.getBytes();\n\n iBeacon ib = parseBLERecord(recordBytes);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n Log.e(\"Scan Failed\", \"Error Code: \" + errorCode);\n }\n };\n else\n olderVersionScanCallback =\n new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi,\n final byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.i(\"onLeScan\", device.toString());\n\n iBeacon ib = parseBLERecord(scanRecord);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n });\n }\n };\n }", "public void discoverable()\n {\n if(mEnable) {\n Log.d(LOGTAG, \"Make discoverable\");\n if(mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {\n listen(false); // Stop listening if were listening\n Intent i = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n mContext.startActivity(i);\n listen(true); // Start again\n }\n }\n }", "@Override\n public void onResume(){\n Log.i(TAG, \"-- ON RESUME --\");\n super.onResume();\n // If BT is not on, request that it be enabled.false\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(resultCode == RESULT_CANCELED) {\n\t\t\tToast.makeText(getApplicationContext(), \"Bluetooth must be enabled to continue\", Toast.LENGTH_SHORT).show();\n\t\t\tfinish();\n\t\t}\n\t}" ]
[ "0.7650992", "0.7072177", "0.7063789", "0.693753", "0.68673474", "0.6790485", "0.6764309", "0.6730764", "0.6679061", "0.6611911", "0.6605014", "0.6582707", "0.652993", "0.65140843", "0.6465286", "0.64599395", "0.6457552", "0.6441504", "0.6372136", "0.6356118", "0.63483536", "0.6320173", "0.6307662", "0.629992", "0.6287285", "0.62783444", "0.62757856", "0.6259227", "0.6241536", "0.6236381", "0.62184334", "0.61945575", "0.61929476", "0.6186169", "0.6176807", "0.61711097", "0.6164395", "0.6143987", "0.6131345", "0.60892946", "0.6072251", "0.60628086", "0.60558784", "0.60553956", "0.6054223", "0.60488766", "0.60367435", "0.60330474", "0.5996985", "0.59726715", "0.59663826", "0.5960685", "0.59486026", "0.5944052", "0.59415334", "0.590941", "0.5908309", "0.5892086", "0.5877072", "0.58765084", "0.5825543", "0.5820542", "0.58122194", "0.5786142", "0.57857794", "0.57614535", "0.57556814", "0.57357085", "0.573562", "0.57236534", "0.5712526", "0.5701499", "0.570056", "0.5691354", "0.56895536", "0.5685142", "0.5683685", "0.56823903", "0.56766135", "0.56710666", "0.56627166", "0.56623876", "0.5650564", "0.56448245", "0.56337875", "0.56329775", "0.5632143", "0.5629246", "0.5623539", "0.5620552", "0.56143135", "0.56142783", "0.56091315", "0.5606072", "0.56035656", "0.55968326", "0.55939233", "0.558998", "0.55720747", "0.55502385" ]
0.6760061
7
DeviceIds are used to specify who a message is intended for
public BlueMeshServiceBuilder deviceId( String a_deviceId ){ deviceId = a_deviceId; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getDeviceId();", "UUID getDeviceId();", "@Override\n public int getDeviceId() {\n return 0;\n }", "Integer getDeviceId();", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();", "public org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }", "public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}", "public String getDeviceId() {\n return this.DeviceId;\n }", "public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> getDevicesForApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "private String processReceivers(String[] ids){\n StringBuilder res = new StringBuilder();\n UserActivityController uac = (UserActivityController) builder.getControllers()[0];\n for (String s : ids){\n res.append(uac.getDisplayedUsername(viewer, UUID.fromString(s)));\n }\n return res.toString();\n }", "public void setDeviceId(String DeviceId) {\n this.DeviceId = DeviceId;\n }", "public String getMyDeviceId() {\n return myDeviceId;\n }", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }", "private void onDeviceList(RequestDeviceList r){\n\t\t//Answer the request with the list of devices from the group\n\t\tgetSender().tell(new ReplyDeviceList(r.requestId, deviceActors.keySet()), getSelf());\n\t}", "public Integer getDeviceId() {\n return deviceId;\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "public String getDeviceid() {\n return deviceid;\n }", "private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "Set<NotificationMessageContainer> getUserMultiDevice(long idUser, long idChannel, boolean isPrivately, int type, EnumOperationSystem os);", "@Override\r\n\tpublic void OnMicQueueNotify(List<stMicInfo> micinfolists) {\n\t\t\r\n\t\tString tempIDS[] = new String[micinfolists.size()];\r\n\t\tString uniqueIDS[] = new String[micinfolists.size()];\r\n\t\r\n\t\tint j = 0;\r\n\t\tfor (Iterator<stMicInfo> i = micinfolists.iterator(); i.hasNext();)\r\n\t\t{ \r\n\t\t\tstMicInfo userinfoRef = i.next(); \r\n\t\t\ttempIDS[j] = String.valueOf(userinfoRef.getTempid());\r\n\t\t\tuniqueIDS[j] = userinfoRef.getUniqueid();\r\n\t\t\tj++;\r\n\t\t} \r\n\t\tMicQueueResult(tempIDS,uniqueIDS);\r\n\t}", "com.google.protobuf.ByteString\n getDeviceIdBytes();", "List<DeviceInfo> getDevicesInfo(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;", "private void notifyDevicesChanged() {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n WritableArray data = Arguments.createArray();\n final boolean hasHeadphones = availableDevices.contains(DEVICE_HEADPHONES);\n for (String device : availableDevices) {\n if (hasHeadphones && device.equals(DEVICE_EARPIECE)) {\n // Skip earpiece when headphones are plugged in.\n continue;\n }\n WritableMap deviceInfo = Arguments.createMap();\n deviceInfo.putString(\"type\", device);\n deviceInfo.putBoolean(\"selected\", device.equals(selectedDevice));\n data.pushMap(deviceInfo);\n }\n getContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(DEVICE_CHANGE_EVENT, data);\n JitsiMeetLogger.i(TAG + \" Updating audio device list\");\n }\n });\n }", "public final String getDeviceId(){\n return peripheralDeviceId;\n }", "public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);", "public void getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> responseObserver);", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "public static void getDevicesList()\n {\n MidiDevice.Info[]\taInfos = MidiSystem.getMidiDeviceInfo();\n\t\tfor (int i = 0; i < aInfos.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMidiDevice\tdevice = MidiSystem.getMidiDevice(aInfos[i]);\n\t\t\t\tboolean\t\tbAllowsInput = (device.getMaxTransmitters() != 0);\n\t\t\t\tboolean\t\tbAllowsOutput = (device.getMaxReceivers() != 0);\n\t\t\t\tif (bAllowsInput || bAllowsOutput)\n\t\t\t\t{\n\n\t\t\t\t\tSystem.out.println(i + \"\" + \" \"\n\t\t\t\t\t\t+ (bAllowsInput?\"IN \":\" \")\n\t\t\t\t\t\t+ (bAllowsOutput?\"OUT \":\" \")\n\t\t\t\t\t\t+ aInfos[i].getName() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVendor() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVersion() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getDescription());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\" + i + \" \" + aInfos[i].getName());\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (MidiUnavailableException e)\n\t\t\t{\n\t\t\t\t// device is obviously not available...\n\t\t\t\t// out(e);\n\t\t\t}\n\t\t}\n\t\tif (aInfos.length == 0)\n\t\t{\n\t\t\tSystem.out.println(\"[No devices available]\");\n\t\t}\n\t\t//System.exit(0);\n }", "@RequestMapping(value = \"/device\", method = GET)\n String getDeviceId(@RequestParam String userId, String channelId);", "public abstract List<NADevice> getDevices(Context context);", "Builder forDevice(DeviceId deviceId);", "public List<Device> getUserDevices(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n List <Device> devices = new ArrayList<>();\n try {\n tx = session.beginTransaction();\n \n User user = this.getUser(id);\n\n // Add restriction to get user with username\n Criterion deviceCr = Restrictions.eq(\"userId\", user);\n Criteria cr = session.createCriteria(Device.class);\n cr.add(deviceCr);\n devices = cr.list();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return devices;\n }", "public com.google.protobuf.ByteString\n getDeviceIdBytes() {\n java.lang.Object ref = deviceId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n deviceId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "protected List<OutgoingSearchResponse> createDeviceMessages(LocalDevice device, NetworkAddress activeStreamServer) {\n/* 208 */ List<OutgoingSearchResponse> msgs = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 212 */ if (device.isRoot()) {\n/* 213 */ msgs.add(new OutgoingSearchResponseRootDevice((IncomingDatagramMessage)\n/* */ \n/* 215 */ getInputMessage(), \n/* 216 */ getDescriptorLocation(activeStreamServer, device), device));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 222 */ msgs.add(new OutgoingSearchResponseUDN((IncomingDatagramMessage)\n/* */ \n/* 224 */ getInputMessage(), \n/* 225 */ getDescriptorLocation(activeStreamServer, device), device));\n/* */ \n/* */ \n/* */ \n/* */ \n/* 230 */ msgs.add(new OutgoingSearchResponseDeviceType((IncomingDatagramMessage)\n/* */ \n/* 232 */ getInputMessage(), \n/* 233 */ getDescriptorLocation(activeStreamServer, device), device));\n/* */ \n/* */ \n/* */ \n/* */ \n/* 238 */ for (OutgoingSearchResponse msg : msgs) {\n/* 239 */ prepareOutgoingSearchResponse(msg);\n/* */ }\n/* */ \n/* 242 */ return msgs;\n/* */ }", "public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onDevicesReceived(OnReceiverDevicesEvent event){\n //if(!devicesListAdapter.isEmpty()) devicesListAdapter.clear(); // clear old names\n\n\n devicesListAdapter.removeAll();\n Log.d(\"P2P\", \"Found something on events!\");\n //Toast.makeText(getContext(), \"Found something\", Toast.LENGTH_LONG).show();\n Collection<WifiP2pDevice> devs = event.getDevices().getDeviceList();\n devsList.addAll(devs);\n\n\n\n for(int i = 0; i < devsList.size(); i++){\n\n if(!devicesListAdapter.hasItem(devsList.get(i))){\n Log.d(\"P2P\", \"Device Found: \" + devsList.get(0).deviceName);\n devicesListAdapter.add(devsList.get(i).deviceName);\n devicesListAdapter.notifyDataSetChanged();\n }\n\n }\n\n\n }", "public interface Message {\n Device getTargetDevice();\n Device getSourceDevice();\n}", "java.util.List<java.lang.Long> getMessageIdList();", "public void setDeviceUniqueId(com.flexnet.opsembedded.webservices.ExternalIdQueryType deviceUniqueId) {\n this.deviceUniqueId = deviceUniqueId;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Device> getUserDevices(int userId) {\n Query query = em.createQuery(\"SELECT u FROM Device u where user_id=\"+ userId);\n List<Device> users = new ArrayList<Device>();\n users = query.getResultList();\n return users;\n }", "private static String makeDeviceListKey(int device, String deviceAddress) {\n return \"0x\" + Integer.toHexString(device) + \":\" + deviceAddress;\n }", "public String getDeviceId() {\n\t\tString id;\n\t\tid = options.getProperty(\"id\");\n\t\tif(id == null) {\n\t\t\tid = options.getProperty(\"Device-ID\");\n\t\t}\n\t\treturn trimedValue(id);\n\t}", "public IDevice[] getDevices() { return devices; }", "private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }", "public Integer getDevices() {\r\n return devices;\r\n }", "private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }", "public void sendNotifications(Integer contentID, String contentName, Integer[] tagArray){\n\n Set<Integer> subs = new HashSet<>();\n\n Integer[] tags = tagArray;\n\n for(Integer tag: tags){\n\n Iterable<Subscription> subscriptions = subscriptionRepository.findByTagID(tag);\n\n for(Subscription subscription: subscriptions){\n\n subs.add(subscription.getUserID());\n }\n }\n\n for(Integer id: subs){\n\n Notification notification = new Notification(contentName, contentID, id);\n notificationRepository.save(notification);\n }\n }", "private void onTrackDevice(RequestTrackDevice trackMsg){\n\t\tif(this.groupId.equals(trackMsg.groupId)){\n\t\t\t//If the group is correct, we proceed\n\t\t\tActorRef deviceActor = deviceActors.get(trackMsg.deviceId);\n\t\t\t\n\t\t\t//If the device actor already exists, we just forward the message\n\t\t\tif(deviceActor != null){\n\t\t\t\tdeviceActor.forward(trackMsg, getContext());\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Otherwise, we must create a new one and forward the message\n\t\t\t\tlog.info(\"Creating device actor for {}\", trackMsg.deviceId);\n\t\t\t\tdeviceActor = getContext().actorOf(Device.props(groupId, trackMsg.deviceId),\"device-\"+trackMsg.deviceId);\n\t\t\t\t\n\t\t\t\t//The group actor must watch every device to, if they shutdown,\n\t\t\t\t//it must be removed from the group\n\t\t\t\tgetContext().watch(deviceActor);\n\t\t\t\t\n\t\t\t\t//Then, the new actor is stored on the maps\n\t\t\t\tdeviceActors.put(trackMsg.deviceId, deviceActor);\n\t\t\t\tactorsIds.put(deviceActor, trackMsg.deviceId);\n\t\t\t\tdeviceActor.forward(trackMsg, getContext());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t//Else, a warning is shown\n\t\t\tlog.warning(\"Ignoring TrackDevice request for {}. This actor is responsible for {}.\",trackMsg.groupId, groupId);\n\t\t}\n\t}", "public com.flexnet.opsembedded.webservices.ExternalIdQueryType getDeviceUniqueId() {\n return deviceUniqueId;\n }", "@Override\n\tpublic IDevice byId( String deviceId )\n\t{\n\t\treturn new DeviceOperations(this.getPartner(), this.getContext().getItem1(), this.getContext().getItem2(), deviceId);\n\t}", "public String deviceId() {\n return this.deviceId;\n }", "public List<String> getDirectChatRoomIdsList(String aSearchedUserId) {\n List<String> directChatRoomIdsList = new ArrayList<>();\n IMXStore store = getStore();\n Room room;\n\n Map<String, List<String>> params;\n\n if (null != store.getDirectChatRoomsDict()) {\n params = new HashMap<>(store.getDirectChatRoomsDict());\n if (params.containsKey(aSearchedUserId)) {\n directChatRoomIdsList = new ArrayList<>();\n\n for (String roomId : params.get(aSearchedUserId)) {\n room = store.getRoom(roomId);\n if (null != room) { // skipp empty rooms\n directChatRoomIdsList.add(roomId);\n }\n }\n } else {\n Log.w(LOG_TAG, \"## getDirectChatRoomIdsList(): UserId \" + aSearchedUserId + \" has no entry in account_data\");\n }\n } else {\n Log.w(LOG_TAG, \"## getDirectChatRoomIdsList(): failure - getDirectChatRoomsDict()=null\");\n }\n\n return directChatRoomIdsList;\n }", "public com.google.protobuf.ByteString\n getDeviceIdBytes() {\n java.lang.Object ref = deviceId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n deviceId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n deviceId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "org.hl7.fhir.String getDeviceIdentifier();", "public DeviceDescriptionIdentifiers getIdentifiers() {\n return identifiers;\n }", "public void setRingerDevice(String devid);", "@Override\n public void onFound(final Message message) {\n mNearbyDevicesArrayAdapter.add(\n DeviceMessage.fromNearbyMessage(message).getMessageBody());\n }", "boolean hasDeviceId();", "boolean hasDeviceId();", "private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }", "public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}", "DeviceId deviceId();", "DeviceId deviceId();", "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "private void createMessagesForPhones() {\n int msgQtd = getMessageQuantityInterval().randomValue();\n getEvents().forEach((event)->{\n Phone originPhone = event.getOriginPhone();\n \n Message message = new Message(originPhone, event.getDestinationPhone(), MessageStatus.PHONE_TO_ANTENNA);\n if ( msgQtd > 0 ) {\n message.setSendQuantity(msgQtd);\n message.setSendAgain(false);\n \n originPhone.addMessageToOutbox(message);\n }\n });\n }", "Integer getDeviceId(INDArray array);", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "List<DeviceDetails> getDevices();", "public void setDirectConnectGatewayIds(String [] DirectConnectGatewayIds) {\n this.DirectConnectGatewayIds = DirectConnectGatewayIds;\n }", "public static void getWatch() {\n for ( String nodeId : getNodes() ){\n Wearable.MessageApi.sendMessage(\n mGoogleApiClient, nodeId, \"GET_WATCH\", new byte[0]).setResultCallback(\n new ResultCallback<MessageApi.SendMessageResult>() {\n @Override\n public void onResult(MessageApi.SendMessageResult sendMessageResult) {\n if (!sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"Failed to send message with status code: \"\n + sendMessageResult.getStatus().getStatusCode());\n } else if (sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"onResult successful!\");\n }\n }\n }\n );\n }\n }", "public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}", "public List getDevices() {\n return devices;\n }", "void banDevice(Integer deviceId);", "public String[] getSoundDevicesList();", "@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "private void syncDisconnectedDeviceId(String deviceId) {\n Map<Object, Object> devicesMap = new HashMap<>((Map<?, ?>) getEcologyDataSync().getData\n (\"devices\"));\n devicesMap.remove(deviceId);\n getEcologyDataSync().setData(\"devices\", devicesMap);\n }", "private void onDevicesListUpdate(Map<String, Boolean> newValue, Map<String, Boolean> oldValue) {\n newValue = newValue == null ? Collections.<String, Boolean>emptyMap() : newValue;\n oldValue = oldValue == null ? Collections.<String, Boolean>emptyMap() : oldValue;\n\n for (Map.Entry<String, Boolean> entry : newValue.entrySet()) {\n String entryKey = entry.getKey();\n if (!oldValue.containsKey(entryKey) && !(entryKey).equals(getMyDeviceId())) {\n onDeviceConnected(entryKey, entry.getValue());\n }\n }\n\n for (Map.Entry<String, Boolean> entry : oldValue.entrySet()) {\n String entryKey = entry.getKey();\n if (!newValue.containsKey(entryKey) && !(entryKey).equals(getMyDeviceId())) {\n onDeviceDisconnected(entryKey, entry.getValue());\n }\n }\n }", "public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n deviceId_ = s;\n }\n return s;\n }\n }", "public void getSMSIds() {\r\n\r\n mSMSids = new ArrayList<Long>();\r\n\r\n ContentResolver cr = mContext.getContentResolver();\r\n Cursor cur = cr.query(Uri.parse(MySMS.SMS_URI), null,\r\n null, null, null);\r\n if (cur != null) {\r\n if (cur.getCount() > 0) {\r\n while (cur.moveToNext()) {\r\n Long id = cur.getLong(cur.getColumnIndex(\"_id\"));\r\n mSMSids.add(id);\r\n }\r\n }\r\n cur.close();\r\n }\r\n }", "@Override\n public void broadcast(T msg) {\n for (Integer i : activeUsers.keySet()) {\n this.send(Integer.valueOf(i), msg);\n }\n\n }", "@Override\n\t\tpublic void onDeviceEventReceived(DeviceEvent ev, String client) {\n\t\t\t\n\t\t}", "public void sendPushToMultiDevice() throws FirebaseMessagingException {\n List<String> registrationTokens = Arrays.asList(\n \"YOUR_REGISTRATION_TOKEN_1\",\n // ...\n \"YOUR_REGISTRATION_TOKEN_n\"\n );\n\n MulticastMessage message = MulticastMessage.builder()\n .putData(\"score\", \"850\")\n .putData(\"time\", \"2:45\")\n .addAllTokens(registrationTokens)\n .build();\n BatchResponse response = FirebaseMessaging.getInstance().sendMulticast(message);\n // See the BatchResponse reference documentation\n // for the contents of response.\n System.out.println(response.getSuccessCount() + \" messages were sent successfully\");\n }", "public CallSpec<List<String>, HttpError> getYourContactIds() {\n return Resource.<List<String>, HttpError>newGetSpec(api, \"/v1/users/me/contact_ids\")\n .responseAs(list(String.class, \"contact_ids\", \"items\"))\n .build();\n }", "public Multimap<String, OOCSIDevice> devicesByLocation() {\n\t\tpurgeStaleClients();\n\n\t\tMultimap<String, OOCSIDevice> locationsMappedDevices = MultimapBuilder.hashKeys().linkedListValues().build();\n\t\tclients.values().stream().forEach(\n\t\t od -> od.locations.entrySet().stream().forEach(loc -> locationsMappedDevices.put(loc.getKey(), od)));\n\t\treturn locationsMappedDevices;\n\t}", "private void execHandlerDevice( Message msg ) {\n\t\t // get the connected device's name\n\t\tString name = msg.getData().getString( BUNDLE_DEVICE_NAME );\n\t\tlog_d( \"EventDevice \" + name );\n\t\thideButtonConnect();\t\n\t\tString str = getTitleConnected( name );\n\t\tshowTitle( str );\n\t\ttoast_short( str );\n\t}", "@Deprecated\n Set<NotificationMessageContainer> getUserDevice(long idUser, int type, EnumOperationSystem os);", "public Builder setDeviceId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n deviceId_ = value;\n onChanged();\n return this;\n }", "public void setDeviceList(DeviceUserAuthorization[] deviceList) {\n this.deviceList = deviceList;\n }", "public void setDevices(Peripheral[] devices) {\r\n\tthis.deviceList.clear();\r\n\tif (devices != null) {\r\n\t int numEl = devices.length;\r\n\t for (int i = 0; i < numEl; i++) {\r\n\t\tthis.deviceList.add(devices[i]);\r\n\t }\r\n\t}\r\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public void setIds(String ids) {\n this.ids = ids;\n }", "static void serverToOneDevice(String userDeviceIdKey,String message) throws Exception {\r\n\r\n\t\t//String userDeviceIdKey = \"egtbfsd8MCo:APA91bGEDXehUv8iDoJE9Mj802ESCLlAtZXhdqMgHUiLU9hbUn3B-lYdvqISCc-t3FLnxGfS0IrxLkr_yhMtSuu98r-jwWn7opDjuNLjVsJ7dPacVbbunHK9rX_AezwXnROLjMe3w7HL\";\r\n\t\t\r\n\t//\tString userDeviceIdKey =\"fTiMENgaIAI:APA91bHdqOZEZHYlq34Aeve6_30WskJX1oBy56-kSTBh18usYArkr06tXXOIUjDDWBLo9ICLk5q5b0-4U4lo38AlJklTOm7yrMZIlu9LtaiGNqF1frefTyThDaFqyIiMaFnqgSUj-o3q\";\r\n\t\t// String authKey = AUTH_KEY_FCM; // You FCM AUTH key\r\n\t\t// String FMCurl = \"https://fcm.googleapis.com/fcm/send\";\r\n\t//\tString FIREBASE_SERVER_KEY = \"AIzaSyAuS9vJADBUEWM_pAQcgPDGR_GcNWP2knw\"; // You FCM AUTH key\r\n\t\t\r\n\t\t//String FIREBASE_SERVER_KEY = ApiUrl.FCM__SERVER_KEY; \r\n\t\t//String FIREBASE_API_URL = \"https://fcm.googleapis.com/fcm/send\";\r\n\r\n\t\tURL url = new URL(ApiUrl.FCM__API_URL);\r\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n\r\n\t\tconn.setUseCaches(false);\r\n\t\tconn.setDoInput(true);\r\n\t\tconn.setDoOutput(true);\r\n\r\n\t\tconn.setRequestMethod(\"POST\");\r\n\t\tconn.setRequestProperty(\"Authorization\", \"key=\" + ApiUrl.FCM__SERVER_KEY);\r\n\t\tconn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"to\", userDeviceIdKey.trim());\r\n\t\tJSONObject info = new JSONObject();\r\n\t\tinfo.put(\"title\", \"Notificatoin\"); // Notification title\r\n\t\t//info.put(\"body\", \"Add new Product\"); // Notification body\r\n\t\tinfo.put(\"body\",message);\r\n\t\tjson.put(\"notification\", info);\r\n\r\n\t\tOutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());\r\n\t\twr.write(json.toString());\r\n\t\twr.flush();\r\n\t\tconn.getInputStream();\r\n\t\tSystem.out.println(conn);\r\n\t\tSystem.out.println(json.toString());\r\n\t\t//return null;\r\n\t}", "long[] getAllServerSocketIds();", "List<DeviceLocation> getDeviceLocations(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;", "public int[] getIDs(){\r\n\t\tint[] id = new int[Config.MAX_CLIENTS];\r\n\t\tfor(int i=0; i< Config.MAX_CLIENTS;i++){\r\n\t\t\tid[i] = clients[i].getID();\r\n\t\t}\r\n\t\treturn id;\r\n\t}" ]
[ "0.6383792", "0.6373015", "0.6202585", "0.6033865", "0.59973055", "0.59973055", "0.5936514", "0.5926571", "0.58954406", "0.5889482", "0.5819524", "0.57709247", "0.5737244", "0.5694858", "0.5693457", "0.5681017", "0.565033", "0.5650325", "0.5650325", "0.56328076", "0.56120497", "0.5530433", "0.55108625", "0.5502523", "0.54691887", "0.5467514", "0.54486024", "0.5426592", "0.54216295", "0.5420648", "0.5414498", "0.53999865", "0.5368092", "0.53207487", "0.53121275", "0.5291738", "0.52780086", "0.5259218", "0.52465475", "0.52436215", "0.522862", "0.52224946", "0.52159774", "0.5198081", "0.51921505", "0.518642", "0.51766974", "0.5174637", "0.517157", "0.5166328", "0.5164947", "0.51622146", "0.515221", "0.5143695", "0.51436377", "0.5142258", "0.51382124", "0.51019067", "0.51004213", "0.50994563", "0.5092951", "0.5089283", "0.50875485", "0.50875485", "0.50832343", "0.5078516", "0.50697446", "0.50697446", "0.5068744", "0.5047679", "0.5039503", "0.50262785", "0.5024356", "0.50229406", "0.50221354", "0.50151867", "0.5012638", "0.50109375", "0.5010812", "0.5003773", "0.500212", "0.50019735", "0.4987113", "0.49757662", "0.4970849", "0.49686414", "0.49665034", "0.49508378", "0.49474934", "0.4942088", "0.49342367", "0.49340162", "0.49243253", "0.4921665", "0.49191862", "0.4914016", "0.49125752", "0.49115452", "0.49009773", "0.48996085" ]
0.49425393
89