query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Method that reads the file and produces the BarChart from data in the file if format is good. Supposed format is next: First line should be name of the x axis Second should be name of the y axis Third should be values for the chart Fourth should be min value of y Fifth should be max value of y Sixth should be distance between two y values | private static BarChart readFile(String path) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(path));
String xLabel = reader.readLine();
String yLabel = reader.readLine();
String unparsedValues = reader.readLine();
String minY = reader.readLine();
String maxY = reader.readLine();
String density = reader.readLine();
unparsedValues.replace("\\s+", " ");
String[] values = unparsedValues.split(" ");
List<XYValue> chartValues = new LinkedList<>();
for(String value : values) {
if(value.contains("\\s+")) {
reader.close();
throw new IllegalArgumentException("The value must be written in next format: x,y!\n"
+ "No spaces needed.");
}
String[] xy = value.split(",");
try {
chartValues.add(new XYValue(Integer.parseInt(xy[0]), Integer.parseInt(xy[1])));
} catch (NumberFormatException e) {
System.out.println("Format of the file is not good. For values is not provided\n"
+ "value parsable to integer.");
System.exit(0);
}
}
reader.close();
return new BarChart(chartValues, xLabel, yLabel, Integer.parseInt(minY),
Integer.parseInt(maxY), Integer.parseInt(density));
} | [
"public static void main(String[] args) {\r\n\t\tif(args.length != 1) {\r\n\t\t\tSystem.err.println(\"Please provide file path to a file with the chart definition.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tBarChart chart;\r\n\t\tString filePath = args[0];\r\n\t\t\r\n\t\ttry(BufferedReader br = Files.newBufferedReader(Paths.get(filePath))) {\r\n\t\t\tString titleX = Objects.requireNonNull(br.readLine(), \"Expected x-axis title, was null.\");\r\n\t\t\tString titleY = Objects.requireNonNull(br.readLine(), \"Expected y-axis title, was null.\");\r\n\t\t\tString _values = Objects.requireNonNull(br.readLine(), \"Expected x,y values, was null.\");\r\n\t\t\tString _minY = Objects.requireNonNull(br.readLine(), \"Expected minimum y value, was null.\");\r\n\t\t\tString _maxY = Objects.requireNonNull(br.readLine(), \"Expected maximum y value, was null.\");\r\n\t\t\tString _interval = Objects.requireNonNull(br.readLine(), \"Expected interval value, was null.\");\r\n\t\t\t\r\n\t\t\tList<XYValue> values = convertToXYValues(_values);\r\n\t\t\tint minY = Integer.parseInt(_minY);\r\n\t\t\tint maxY = Integer.parseInt(_maxY);\r\n\t\t\tint interval = Integer.parseInt(_interval);\r\n\t\t\t\r\n\t\t\tchart = new BarChart(values, titleX, titleY, minY, maxY, interval);\r\n\t\t\t\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.err.println(\"File reading error occured. Closing...\");\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t} catch(NumberFormatException e) {\r\n\t\t\tSystem.err.println(\"Error during the number formatting. Closing...\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSwingUtilities.invokeLater(() -> {\r\n\t\t\tnew BarChartDemo(chart, filePath).setVisible(true);\r\n\t\t});\r\n\t}",
"public void readCSVNchart() {\n barChart.getXAxis().setLabel(\"Year\");\n barChart.setTitle(\"2011--2013/2019\");\n XYChart.Series tmaxM = new XYChart.Series();\n XYChart.Series tminM = new XYChart.Series();\n XYChart.Series afM = new XYChart.Series();\n XYChart.Series trM = new XYChart.Series();\n tmaxM.setName(\"tmax\");\n tminM.setName(\"tmin\");\n afM.setName(\"af\");\n trM.setName(\"rain\");\n\n stackedBarChart.getXAxis().setLabel(\"Month\");\n stackedBarChart.setTitle(\"January--Decembe\");\n XYChart.Series tmaxY = new XYChart.Series();\n XYChart.Series tminY = new XYChart.Series();\n XYChart.Series afY = new XYChart.Series();\n XYChart.Series trY = new XYChart.Series();\n tmaxY.setName(\"tmax\");\n tminY.setName(\"tmin\");\n afY.setName(\"af\");\n trY.setName(\"rain\");\n\n for (final File file : folder.listFiles()) {\n if (file.getName().replaceAll(\"\\\\..*\",\"\").equals(name)){\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n\n String line;\n while ((line = br.readLine()) != null) {\n String[] fields = line.split(\",\");\n Alldata record = new Alldata(fields[0], fields[1], Float.valueOf(fields[2]),\n Float.valueOf(fields[3]), Float.valueOf(fields[4]), Float.valueOf(fields[5]));\n dataList.add(record);\n\n tmaxM.getData().add(new XYChart.Data(fields[1], record.getTmax()));\n tminM.getData().add(new XYChart.Data(fields[1], record.getTmin()));\n afM.getData().add(new XYChart.Data(fields[1], record.getAf()));\n trM.getData().add(new XYChart.Data(fields[1], record.getRain()));\n }\n } catch (IOException ex) {\n Logger.getLogger(Details.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n\n //sum the values by year\n Map<String,Double> max0= dataList.stream().collect(Collectors.groupingBy(\n Alldata::getYear,Collectors.summingDouble(Alldata::getTmax)));\n Map<String,Double> min= dataList.stream().collect(Collectors.groupingBy(\n Alldata::getYear,Collectors.summingDouble(Alldata::getTmin)));\n Map<String,Double> af= dataList.stream().collect(Collectors.groupingBy(\n Alldata::getYear,Collectors.summingDouble(Alldata::getAf)));\n Map<String,Double> rain= dataList.stream().collect(Collectors.groupingBy(\n Alldata::getYear,Collectors.summingDouble(Alldata::getRain)));\n\n // sort value for Descending order\n Map<String, Double>max= new TreeMap<>(max0);\n\n max.forEach((k,v)->{tmaxY.getData().add(new XYChart.Data(k,v));});\n min.forEach((k,v)->{tminY.getData().add(new XYChart.Data(k,v));});\n af.forEach((k,v)->{afY.getData().add(new XYChart.Data(k,v));});\n rain.forEach((k,v)->{trY.getData().add(new XYChart.Data(k,v));});\n\n stackedBarChart.getData().addAll(tmaxM, tminM, afM, trM);\n barChart.getData().addAll(tmaxY,tminY,afY,trY);\n }\n }\n\n }",
"public Chart read() {\n NumberRow[] leftNumbers;\n NumberRow[] topNumbers;\n try (Scanner fileReader = new Scanner(this.file)) {\n leftNumbers = new NumberRow[Integer.valueOf(fileReader.nextLine())];\n topNumbers = new NumberRow[Integer.valueOf(fileReader.nextLine())];\n for (int i = 0; i < leftNumbers.length; i++) {\n leftNumbers[i] = this.rowToNumberRow(fileReader.nextLine());\n }\n fileReader.nextLine();\n for (int i = 0; i < topNumbers.length; i++) {\n topNumbers[i] = this.rowToNumberRow(fileReader.nextLine());\n }\n return new Chart(topNumbers, leftNumbers);\n } catch (Exception e) {\n System.out.println(\"File reading error: \" + e.getMessage());\n }\n return null;\n }",
"public static void main(String[] args) {\n\n\tScanner scanner = new Scanner(System.in);\n\tSystem.out.print(WELCOME_MESSAGE);\n\tPath path = Paths.get(scanner.nextLine());\n\tscanner.close();\n\n\ttry {\n\t List<String> lines = Files.readAllLines(path);\n\t String xAxisTitle = lines.get(0);\n\t String yAxisTitle = lines.get(1);\n\t List<XYValue> values = addValues(lines.get(2));\n\t int minY = Integer.parseInt(lines.get(3));\n\t int maxY = Integer.parseInt(lines.get(4));\n\t int stepY = Integer.parseInt(lines.get(5));\n\t BarChart barChart = new BarChart(path.getFileName().toString(), values, xAxisTitle, yAxisTitle, minY, maxY, stepY);\n\t BarChartComponent component = new BarChartComponent(barChart);\n\t SwingUtilities.invokeLater(() -> new BarChartDemo(component));\n\n\t} catch (IOException | IndexOutOfBoundsException | IllegalArgumentException e) {\n\t System.out.println(\"Parsing file \" + path.getFileName() + \" failed.\");\n\t}\n }",
"private void plotData(){\n List<Entry> entriesMedidas = new ArrayList<Entry>();\n try{\n // #1\n FileInputStream fis = getApplicationContext().openFileInput(fileName);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n\n // #2. Skips the name, birthdate and gender of the baby\n reader.readLine();\n reader.readLine();\n reader.readLine();\n\n // #3\n String line = reader.readLine();//First line with data\n\n while (line != null) {\n double[] datum = obtainSubstring(line, mag);\n entriesMedidas.add(new Entry((float) datum[0], (float) datum[1]));\n\n line = reader.readLine();\n }\n\n reader.close();\n isr.close();\n fis.close();\n\n }catch(IOException e){\n e.printStackTrace();\n }\n\n // #4\n LineDataSet lineaMedidas = new LineDataSet(entriesMedidas, this.name);\n lineaMedidas.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineaMedidas.setColor(ColorTemplate.rgb(\"0A0A0A\"));\n lineaMedidas.setCircleColor(ColorTemplate.rgb(\"0A0A0A\"));\n todasMedidas.add(lineaMedidas);\n\n }",
"private void createBarChart()\n {\n // Create the domain axis (performance ID names) and set its sizing\n // characteristics and font\n CategoryAxis domainAxis = new CategoryAxis(null);\n domainAxis.setMaximumCategoryLabelWidthRatio(0.8f);\n domainAxis.setLowerMargin(0.02);\n domainAxis.setUpperMargin(0.02);\n domainAxis.setTickLabelFont(STATS_Y_LABEL_FONT);\n\n // Create the range axis (statistics values) and set its tick label\n // format, minor grid line count, and font\n ValueAxis rangeAxis = new NumberAxis(PLOT_UNITS[0]);\n ((NumberAxis) rangeAxis).setNumberFormatOverride(new DecimalFormat(X_AXIS_LABEL_FORMAT));\n rangeAxis.setMinorTickCount(5);\n rangeAxis.setTickLabelFont(PLOT_LABEL_FONT);\n\n // Create a renderer to allow coloring the bars based on the user-\n // selected ID colors. Enable tool tips\n CPMBarRenderer renderer = new CPMBarRenderer();\n renderer.setBarPainter(new GradientBarPainter());\n renderer.setShadowVisible(false);\n renderer.setDrawBarOutline(true);\n renderer.setBaseOutlinePaint(Color.BLACK);\n renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());\n\n // Create the bar chart plot. Default to the first data set and 10 IDs\n // displayed. Display the bars horizontally\n barPlot = new CPMCategoryPlot(new SlidingCategoryDataset(barDataset,\n 0,\n 10),\n domainAxis,\n rangeAxis,\n renderer);\n barPlot.setOrientation(PlotOrientation.HORIZONTAL);\n\n // Position the statistics value label at the bottom of the chart and\n // make the minor grid lines visible\n barPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);\n barPlot.setRangeMinorGridlinesVisible(true);\n\n // Set the range (x-axis; values) so it can be panned. The CategoryPlot\n // class is extended to allow panning of the domain (y-axis; names)\n barPlot.setRangePannable(true);\n\n // Create the bar chart\n JFreeChart barChart = new JFreeChart(null, null, barPlot, false);\n\n // Set bar chart characteristics and create the chart panel\n barChartPanel = setChartCharacteristics(barChart);\n\n // Create a scroll bar\n barScrollBar = new JScrollBar(SwingConstants.VERTICAL);\n\n // Add a listener for scroll bar thumb position changes\n barScrollBar.getModel().addChangeListener(new ChangeListener()\n {\n /******************************************************************\n * Handle scroll bar thumb position changes\n *****************************************************************/\n @Override\n public void stateChanged(ChangeEvent ce)\n {\n // Update the y-axis based on the scroll bar thumb position\n adjustYAxisFromScrollBar();\n }\n });\n\n // Adjust the chart y-axis based on the mouse wheel movement\n barScrollBar.addMouseWheelListener(new MouseWheelListener()\n {\n /******************************************************************\n * Handle a y-axis mouse wheel movement event\n *****************************************************************/\n @Override\n public void mouseWheelMoved(MouseWheelEvent mwe)\n {\n // Adjust the new y-axis scroll bar thumb position by one unit\n // scroll amount based on mouse wheel rotation direction. The\n // scroll \"speed\" is reduced by half to make finer adjustment\n // possible\n barScrollBar.setValue(barScrollBar.getValue()\n + barScrollBar.getUnitIncrement()\n * (mwe.getUnitsToScroll() > 0\n ? 1\n : -1));\n }\n });\n\n // Create a panel for the bar chart scroll bar\n JPanel scrollBarPanel = new JPanel(new BorderLayout());\n scrollBarPanel.add(barScrollBar);\n scrollBarPanel.setBackground(barChartPanel.getBackground());\n\n // Create a panel to hold the bar chart and its associated scroll bar\n barPanel = new JPanel(new BorderLayout());\n barPanel.add(barChartPanel);\n barPanel.add(scrollBarPanel, BorderLayout.EAST);\n\n // Set the bar chart background and grid line colors\n setPlotColors();\n\n // Display/hide the bar chart grid lines\n setVerticalGridLines();\n\n // Listen for and take action on key presses\n createBarChartKeyListener();\n\n // Listen for and take action on chart (re)draw progress\n createBarChartProgressListener();\n\n // Listen for and take action on mouse wheel events\n createBarChartMouseWheelListener();\n }",
"private void createBarChartAxes() {\n barChart.getData().add(teamData);\n try {\n // Create data series for boys and girls\n for (int i = 0; i < teams.length; i++) {\n final XYChart.Data<String, Number> data = new XYChart.Data<>(teams[i], readScoreFromFile(teams[i]));\n data.nodeProperty().addListener((ov, oldNode, node) -> {\n if (node != null) {\n displayLabelForData(data);\n }\n });\n stringProps[i].setValue(data.getYValue() + \"\");\n teamData.getData().add(data);\n }\n } catch (IOException e) {\n System.out.println(\"Failed to read file data\");\n }\n }",
"public void BarChartForViolationFines() {\n\t\t\n\t\t// Dataset Generation\t\t\n\n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\t\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tString key = sortedKeysByVioDesc.get(i);\n\t\t\tdataset.addValue(ticketByVioFine.get(key), \"Violation Fine\", key);\n\t\t}\t\t\t\n\t\tCategoryDataset plotDataset = dataset;\n\n\t\t// JFreeChart Call for BarChart and passing formats\n\t\tJFreeChart barChart2 = ChartFactory.createBarChart(\n\t\t\t\t\"Parking Tickets by Violation Fee\", \n\t\t\t\t\"Ticket Description\", \n\t\t\t\t\"Ticket Fee ($)\", \n\t\t\t\tplotDataset, \n\t\t\t\tPlotOrientation.VERTICAL, \n\t\t\t\tfalse, //legend\n\t\t\t\ttrue, //tool tip\n\t\t\t\tfalse // use to generate URL\n\t\t\t\t);\t\n\n\t\t// Turing label by 45 degree to show full label\n\t\tCategoryPlot cplot2 = barChart2.getCategoryPlot();\n\t\tCategoryAxis xAxis = (CategoryAxis)cplot2.getDomainAxis();\n\t\txAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);\n\t\t\n\t\t//Chart panel generation\n ChartPanel chartPanel2 = new ChartPanel(barChart2);\n chartPanel2.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));\n chartPanel2.setBackground(Color.white);\n add(chartPanel2);\n pack();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setVisible(true);\n try {\n \tfinal ChartRenderingInfo chartInfo2 = new ChartRenderingInfo(new StandardEntityCollection());\n \tfinal File file4 = new File(\"BarChartForViolationFee.png\");\n ChartUtilities.saveChartAsPNG(file4, barChart2, 800, 800, chartInfo2);\n }\n catch (Exception e) {\n }\n\t}",
"public void CreateDataBarChart();",
"private void createBarChart(){\n HashMap<Character, Double> frequencies = countFrequency(proteinModel.getSequence());\n\n final CategoryAxis xAxis = new CategoryAxis();\n final NumberAxis yAxis = new NumberAxis();\n this.chart = new BarChart<String, Number>(xAxis, yAxis);\n this.chart.setTitle(\"Amino Acid Frequencies\");\n this.chart.setBarGap(2);\n xAxis.setLabel(\"Amino Acid\");\n yAxis.setLabel(\"Percent\");\n\n XYChart.Series<String, Number> series = new XYChart.Series<>();\n frequencies.forEach((Character key, Number value) -> {\n System.err.println(key);\n series.getData().add(new XYChart.Data<String, Number>(String.valueOf(key), value));\n });\n\n this.chart.getData().addAll(series);\n this.chart.setLegendVisible(false);\n }",
"public void setData() {\n\n float groupSpace = 0f;\n float barSpace = 0f; // x4 DataSet\n float barWidth = 0.25f; // x4 DataSet\n\n int startYear = 0;\n int endYear = 0 + 5;\n\n\n ArrayList<BarEntry> values1 = new ArrayList<>();\n ArrayList<BarEntry> values2 = new ArrayList<>();\n ArrayList<BarEntry> values3 = new ArrayList<>();\n ArrayList<BarEntry> values4 = new ArrayList<>();\n\n\n for (int i = startYear; i < endYear; i++) {\n values1.add(new BarEntry(i, -(float) (Math.random() * 10)));\n values2.add(new BarEntry(i, -(float) (Math.random() * 10)));\n values3.add(new BarEntry(i, -(float) (Math.random() * 10)));\n values4.add(new BarEntry(i, -(float) (Math.random() * 10)));\n }\n\n BarDataSet set1, set2, set3, set4;\n\n if (mChart.getData() != null && mChart.getData().getDataSetCount() > 0) {\n\n set1 = (BarDataSet) mChart.getData().getDataSetByIndex(0);\n set2 = (BarDataSet) mChart.getData().getDataSetByIndex(1);\n set3 = (BarDataSet) mChart.getData().getDataSetByIndex(2);\n set4 = (BarDataSet) mChart.getData().getDataSetByIndex(3);\n set1.setValues(values1);\n set2.setValues(values2);\n set3.setValues(values3);\n set4.setValues(values4);\n mChart.getData().notifyDataChanged();\n mChart.notifyDataSetChanged();\n\n } else {\n // create 4 DataSets\n set1 = new BarDataSet(values1, \"θι\");\n set1.setColor(Color.rgb(104, 241, 175));\n set1.setDrawValues(false);\n set2 = new BarDataSet(values2, \"θι\");\n set2.setColor(Color.rgb(164, 228, 251));\n set2.setDrawValues(false);\n set3 = new BarDataSet(values3, \"θι\");\n set3.setColor(Color.rgb(242, 247, 158));\n set3.setDrawValues(false);\n set4 = new BarDataSet(values4, \"θι\");\n set4.setColor(Color.rgb(255, 102, 0));\n set4.setDrawValues(false);\n\n BarData data = new BarData(set1, set2, set3, set4);\n\n mChart.setData(data);\n }\n\n // specify the width each bar should have\n mChart.getBarData().setBarWidth(barWidth);\n\n // restrict the x-axis range\n mChart.getXAxis().setAxisMinimum(startYear);\n\n // barData.getGroupWith(...) is a helper that calculates the width each group needs based on the provided parameters\n mChart.getXAxis().setAxisMaximum(startYear + mChart.getBarData().getGroupWidth(groupSpace, barSpace) * 5);\n mChart.groupBars(startYear, groupSpace, barSpace);\n mChart.invalidate();\n }",
"public Parent createBarGraph(ObservableList<HappinessReport> data) {\n xAxis = new CategoryAxis();\n xAxis.setLabel(\"Country\");\n //Yaxis Creation\n yAxis = new NumberAxis();\n yAxis.setLabel(\"Score\");\n //Chart Creation\n barchart = new BarChart<>(xAxis, yAxis);\n barchart.setTitle(\"Horizontal Bar Chart Example\");\n //Country and Score Data load into chart\n for (int intx = 0; intx < data.size(); intx++) {\n XYChart.Series barChartSeries = new XYChart.Series<>();\n barChartSeries.getData().add(new XYChart.Data(String.valueOf(data.get(intx).getCountry()), data.get(intx).getScore()));\n barchart.getData().add(barChartSeries);\n }\n barchart.setTitle(\"Horizontal Bar Chart Example\");\n barchart.setLegendVisible(false);\n return barchart;\n }",
"public void readFile() {\r\n try {\r\n final String file = \"ConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\";\r\n double average = 0;\r\n BufferedReader br = new BufferedReader(new FileReader(file));\r\n String line = br.readLine();\r\n line = br.readLine();\r\n String[] splited = line.split(\",\");\r\n this.maxLA = Double.parseDouble(splited[0]);\r\n this.minLA = Double.parseDouble(splited[0]);\r\n this.maxLO = Double.parseDouble(splited[1]);\r\n this.minLO = Double.parseDouble(splited[1]);\r\n this.maxH = Math.abs(Double.parseDouble(splited[2]));\r\n this.minH = Math.abs(Double.parseDouble(splited[2]));\r\n int index = 0;\r\n double x;\r\n double y;\r\n double z;\r\n while (line != null) {\r\n String[] splitedString = line.split(\",\");\r\n x = Double.parseDouble(splitedString[0]);\r\n y = Double.parseDouble(splitedString[1]);\r\n z = Math.abs(Double.parseDouble(splitedString[2]));\r\n average += y;\r\n if (x > maxLA) {\r\n maxLA = x;\r\n } else if (x < minLA) {\r\n minLA = x;\r\n }\r\n if (y > maxLO) {\r\n maxLO = y;\r\n } else if (y < minLO) {\r\n minLO = y;\r\n }\r\n if (z > maxH) {\r\n maxH = z;\r\n } else if (z < minH) {\r\n minH = z;\r\n }\r\n Bee3D newBee = new Bee3D(x, y, z);\r\n this.beesArray[index++] = newBee;\r\n line = br.readLine();\r\n }\r\n average = average / this.numberOfBees;\r\n System.out.println(\"Maximum latitude: \" + maxLA + \" Minimum latitude: \" + minLA);\r\n System.out.println(\"Maximum longitude: \" + maxLO + \" Minimum longitude: \" + minLO);\r\n System.out.println(\"Maximum height: \" + maxH + \" Minimum height: \" + minH);\r\n this.distanceLongi = getDistanceBetween(average);\r\n System.out.println(\"Distance between the most distant latitudes \" + (int) (Math.abs(Math.abs(maxLA) - Math.abs(minLA)) * distanceLat) + \" m\");\r\n System.out.println(\"Distance between the most distant longitudes: \" + (int) (Math.abs(Math.abs(maxLO) - Math.abs(minLO)) * distanceLongi) + \" m\");\r\n System.out.println(\"Distance between the most distant heights: \" + (int) (Math.abs(Math.abs(maxH) - Math.abs(minH))) + \" m\");\r\n System.out.println(\"Average distance between longitudes: \" + distanceLongi + \" m\");\r\n this.offset *= 2;\r\n this.offset += 10;\r\n this.BeesCollision = new LinkedList[(int) ((Math.abs(Math.abs(maxLO) - Math.abs(minLO)) * distanceLongi / precission) + offset)][(int) ((Math.abs(Math.abs(maxLA) - Math.abs(minLA)) * distanceLat / precission) + offset)][(int) (Math.abs((Math.abs(maxH) - Math.abs(minH)) / precission) + offset)];\r\n this.offset -= 10;\r\n this.offset /= 2;\r\n } catch (IOException ioe) {\r\n File file = new File(\"ConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\");\r\n System.out.println(\"Something went wrong reading the file\");\r\n System.out.println(\"File exist: \" + file.exists());\r\n }\r\n }",
"public BarData barData() {\n\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(oa, 0));\n group1.add(new BarEntry(ob, 1));\n group1.add(new BarEntry(oc, 2));\n group1.add(new BarEntry(od, 3));\n group1.add(new BarEntry(oe, 4));\n group1.add(new BarEntry(of, 5));\n\n\n BarDataSet barDataSet = new BarDataSet(group1, \"\");\n barDataSet.setColor(Color.rgb(0, 155, 0));\n\n\n BarData barData = new BarData(getXAxisValues(), barDataSet);\n return barData;\n\n }",
"public void readCategoryFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\tint row = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t//System.out.println(sCurrentLine);\n\t\t\t\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\t//System.out.println(lineElements.length);\n\t\t\tfor (int column = 0; column < lineElements.length; column++) {\t\t\n\t\t\t\t//System.out.println(column);\n\t\t\t\tint category = Integer.parseInt(lineElements[column]);\n\t\t\t\t//System.out.println(vertices.size());\n\t\t\t\tPOI v1 = vertices.get(row);\n\t\t\t\tPOI v2 = vertices.get(column);\n\t\t\t\t\n\t\t\t\tArc arc = getArc(v1, v2);\n\t\t\t\tif (!distMtx) {\n\t\t\t\t\tdouble distance = v1.distanceTo(v2);\n\t\t\t\t\tif (data == Dataset.VERBEECK) {\n\t\t\t\t\t\tdistance = distance / 5.0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdistance = distance / 10.0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarc.setLength(distance);\n\t\t\t\t}\n\t\t\t\tarc.setCategory(category);\n\t\t\t\tif (distConstraint) {\n\t\t\t\t\tarc.setSpeedTable(allOneSpeedTable);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarc.setSpeedTable(speedTables.get(category));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\trow ++;\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}",
"public int fillHistogramData(final File file) {\n String [] attr;\n String [] data;\n int hid = 0, nbins = 0, entries = 0, underflow = 0, overflow = 0;\n float low = 0.0F, high = 0.0F; \n \n BufferedReader input = null;\n String line;\n try {\n input = new BufferedReader(new InputStreamReader(new\n FileInputStream(file)));\n }\n catch (FileNotFoundException e) {\n System.out.println(\"The file \" + file.getName() + \" wasn't found!\");\n }\n catch (IOException e) {\n System.out.println(\"Error reading from \" + file.getName());\n } \n if (input != null) {\n try {\n \twhile (true) {\n \t line = Tools.getNextLine(input);\n int nHist = Integer.parseInt(line);\n if (nHist <= 0) return nHist; \n for (int i = 0; i < nHist; i++) {\n \t line = Tools.getNextLine(input);\n\n attr = Tools.split(line);\n\n hid = Integer.parseInt(attr[0]);\n nbins = Integer.parseInt(attr[1]);\n\n low = (new Float(attr[2])).floatValue();\n high = (new Float(attr[3])).floatValue();\n\n entries = Integer.parseInt(attr[4]); \n underflow = Integer.parseInt(attr[5]); \n overflow = Integer.parseInt(attr[6]); \n\n \t String gtitle = Tools.getNextLine(input);\n \n if (isEmpty() || indexOf(gtitle) == -1) {\n Histogram histo = new Histogram1D(hid, line, nbins, low, high);\n addObject(histo);\n }\n int index = indexOf(gtitle);\n if (index < 0) return -1;\n Histogram histo = getHistogram(index);\n if (histo == null) continue;\n \n histo.setEntries(entries);\n\n histo.setCellContent(0, underflow);\n for (int j = 0; j < nbins; j++) {\n line = Tools.getNextLine(input);\n data = Tools.split(line);\n histo.setCellContent(j+1, (new Float(data[0])).floatValue());\n histo.setCellError(j+1, (new Float(data[1])).floatValue());\n }\n histo.setCellContent(nbins+1, overflow);\n }\n \t}\n }\n catch (IOException e) {\n \ttry { \n \t input.close();\n \t} \n catch (IOException ex) {\n System.out.println(\"Error closing file \" + ex);\n \t}\n }\n catch (NullPointerException e) {\n \ttry { \n \t input.close();\n \t} \n catch (IOException ex) {\n \t System.out.println(\"Error closing file \" + ex);\n \t}\n }\n finally {\n \ttry { \n \t input.close();\n \t} \n catch (IOException ex) {\n \t System.out.println(\"Error closing file \" + ex);\n \t}\n }\n }\n return getNHist();\n }",
"private void setupBarChart(){\n\n // Basic BarChart Initialisation (Axis, Title, Legends)\n CategoryAxis xAxis = new CategoryAxis();\n NumberAxis yAxis = new NumberAxis();\n\n xAxis.setLabel(\"Patients\");\n barChart = new BarChart<String,Number>(xAxis,yAxis);\n\n barChart.setTitle(\"Total Cholesterol mg/dl\");\n barChart.setLegendVisible(false);\n\n // Prepares BarChart to handle data and display it\n series = new XYChart.Series();\n\n for (Object patient: this.getData()) {\n final XYChart.Data<String, Number> data = new XYChart.Data(((PatientModel) patient).getFirstName(), Double.parseDouble(((PatientModel) patient).getCholesterol()));\n data.nodeProperty().addListener(new ChangeListener<Node>() {\n @Override\n public void changed(ObservableValue<? extends Node> ov, Node oldNode, final Node node) {\n if (node != null) {\n setNodeStyle(data);\n displayLabelForData(data);\n }\n }\n });\n series.getData().add(data);\n }\n barChart.getData().addAll(series);\n }",
"@Override\r\n public void start(Stage stage) {\n CategoryAxis xAxis = new CategoryAxis();\r\n xAxis.setCategories(FXCollections.<String> observableArrayList(Arrays.asList(\r\n \"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\r\n \"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\")));\r\n NumberAxis yAxis = new NumberAxis();\r\n yAxis.setLabel(\"Occurrences in Text File\");\r\n BarChart<String, Number> barChart = new BarChart<>(xAxis, yAxis);\r\n\r\n //initialize HBox\r\n HBox bottomBox = new HBox();\r\n bottomBox.setAlignment(Pos.TOP_CENTER);\r\n bottomBox.setSpacing(5);\r\n bottomBox.setPadding(new Insets(3, 3, 3, 3));\r\n\r\n //create and add label and text field to HBox\r\n TextField fileNameField = new TextField();\r\n fileNameField.setText(\"C://\");\r\n bottomBox.getChildren().addAll(new Label(\"File Name\"), fileNameField);\r\n\r\n //if the user presses and releases the ENTER key inside the textField\r\n fileNameField.setOnKeyReleased(event -> {\r\n if (event.getCode() == KeyCode.ENTER){\r\n //pull input text file name\r\n String fileName=fileNameField.getText();\r\n //reset textField\r\n fileNameField.setText(\"C://\");\r\n\r\n //attempt to pull text from text file\r\n String fileText = \"\";\r\n try {\r\n fileText = getTextFromFile(fileName);\r\n }\r\n //if text file is invalid\r\n catch (Exception e) {\r\n System.exit(0);\r\n }\r\n\r\n //array that stores how many times each letter is encountered\r\n int[] density = new int[26];\r\n //parse obtained text for letters, count each occurrence of each letter from A-Z\r\n for(int i=0; i<fileText.length(); i++) {\r\n int num = (int)fileText.charAt(i);\r\n\r\n //upper case\r\n if(num>=65 && num<=90) {\r\n density[num-65]++;\r\n }\r\n //lower case\r\n else if(num>=97 && num<=122) {\r\n density[num-97]++;\r\n }\r\n }\r\n\r\n //clear bar chart's previous data(if any) before giving it new data\r\n barChart.getData().clear();\r\n //generate new bar chart data\r\n XYChart.Series s1 = new XYChart.Series();\r\n s1.setName(fileName);\r\n for(int i=0; i<26; i++) {\r\n s1.getData().add(new XYChart.Data(String.valueOf((char) (i + 65)), density[i]));\r\n }\r\n //add data to bar chart\r\n barChart.getData().add(s1);\r\n }\r\n });// end ENTER key event\r\n\r\n //create VBox to hold the bar chart and the HBox\r\n VBox vbox = new VBox();\r\n vbox.setPrefWidth(700);\r\n vbox.getChildren().addAll(barChart, bottomBox);\r\n\r\n Scene scene = new Scene(vbox);\r\n\r\n stage.setTitle(\"Text File Density Histogram Generator\");\r\n stage.setScene(scene);\r\n stage.sizeToScene();\r\n stage.show();\r\n\r\n }",
"public void showBarChart() {\r\n\r\n // Count classes\r\n int neutralCountPred = 0;\r\n int negativeCountPred = 0;\r\n int positiveCountPred = 0;\r\n\r\n int neutralCountAnsw = 0;\r\n int negativeCountAnsw = 0;\r\n int positiveCountAnsw = 0;\r\n\r\n for(Integer pred : predictions.values()) {\r\n switch (pred.intValue()) {\r\n case 0:\r\n negativeCountPred++;\r\n break;\r\n case 1:\r\n neutralCountPred++;\r\n break;\r\n case 2:\r\n positiveCountPred++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"PREDICTED \\nnegativeCountPred = %d, neutralCountPred = %d, positiveCountPred = %d\", negativeCountPred,\r\n neutralCountPred, positiveCountPred);\r\n\r\n for(Integer answer : rightAnswers.values()) {\r\n switch (answer.intValue()) {\r\n case 0:\r\n negativeCountAnsw++;\r\n break;\r\n case 1:\r\n neutralCountAnsw++;\r\n break;\r\n case 2:\r\n positiveCountAnsw++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"\\nRIGHT ANSWERS \\nnegativeCountAnsw = %d, neutralCountAnsw = %d, positiveCountAnsw = %d\", negativeCountAnsw,\r\n neutralCountAnsw, positiveCountAnsw);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries1 = new XYChart.Series();\r\n dataSeries1.setName(\"Predicted\");\r\n dataSeries1.getData().add(new XYChart.Data(\"Neutral\", neutralCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Positive\", positiveCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Negative\", negativeCountPred));\r\n resultChart.getData().add(dataSeries1);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries2 = new XYChart.Series();\r\n dataSeries2.setName(\"Right answers\");\r\n dataSeries2.getData().add(new XYChart.Data(\"Neutral\", neutralCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Positive\", positiveCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Negative\", negativeCountAnsw));\r\n resultChart.getData().add(dataSeries2);\r\n\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load caloric table entry by id | public CaloricTableEntry loadCaloricTableEntryById(long id); | [
"@Override\n @Transactional\n public CalendarEntry getById(final Long id) {\n return getCalendarEntryRepository().getById(id);\n }",
"public Entry getEntry(Integer id);",
"public void loadDataByTechId(TechId id);",
"@Override\n public CreditLine loadCreditLine(int id) {\n return getCurrentSession().get(CreditLine.class, id);\n }",
"public LookupTableEntry findById(int id) {\r\n\t\treturn dao.findById(id);\r\n\t}",
"@Override\n public ResourceDo loadResourceById(String id) {\n return (ResourceDo) getSqlMapClientTemplate().queryForObject(\n ST_LOAD_RESOURCE_BY_ID, id);\n }",
"public PosPrice load(Long id)throws DataAccessException\n {\n return load(PosPrice.class ,id);\n }",
"ACL load(long id) throws FxApplicationException;",
"FinCalender selectByPrimaryKey(Long id);",
"public PosRes load(Long id)throws DataAccessException\n {\n return load(PosRes.class ,id);\n }",
"public Coffee load(Long id) {\r\n return em.find(Coffee.class, id);\r\n }",
"Calories findById (Long id);",
"public ActiveRecord read(Object id) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(getTableName()).append(\" WHERE id = \").append(id);\n Row row = getAdapter().selectOne(sql.toString());\n if (row == null) throw new RecordNotFoundException(\"No record found with id \" + id);\n for (Column column : getColumns()) {\n String name = column.getName();\n Classes.setFieldValue(this, name, row.get(name));\n }\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n return this;\n }",
"UvStatDay selectByPrimaryKey(Long id);",
"SysCronJob selectByPrimaryKey(Long id);",
"ClinicalData selectByPrimaryKey(Long id);",
"WizardValuationHistoryEntity selectByPrimaryKey(Integer id);",
"public DiaEntry getDiaEntry(final long id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_NAME, ALL_COLS, ID_COL + \" = ?\", new String[]{String.valueOf(id)}, null, null, null);\n\n DiaEntry diaEntry = null;\n\n if (cursor != null && cursor.getCount() > 0) {\n cursor.moveToFirst();\n diaEntry = new DiaEntry(cursor.getString(cursor.getColumnIndex(NAME_COL)));\n diaEntry.setId(cursor.getLong(cursor.getColumnIndex(ID_COL)));\n diaEntry.setDescription(cursor.getString(cursor.getColumnIndex(DESC_COL)));\n\n Calendar calendar = null;\n\n if (!cursor.isNull(cursor.getColumnIndex(DATE_COL))) {\n calendar = Calendar.getInstance();\n calendar.setTimeInMillis(cursor.getLong(cursor.getColumnIndex(DATE_COL)) * 1000);\n }\n\n diaEntry.setDate(calendar);\n diaEntry.setMood(cursor.getInt(cursor.getColumnIndex(MOOD_COL)));\n if (cursor.getBlob(cursor.getColumnIndex(IMG_COL)) != null) {\n diaEntry.setImage(cursor.getBlob(cursor.getColumnIndex(IMG_COL)));\n }\n\n diaEntry.setCity(cursor.getString(cursor.getColumnIndex(CITY_COL)));\n }\n\n db.close();\n return diaEntry;\n }",
"private boolean load(int id) {\n Connection conn = Database.getConnection();\n PreparedStatement stmt = null;\n\n try {\n stmt = conn.prepareStatement(\"SELECT * FROM Staff WHERE staffID = ? LIMIT 1\");\n\n stmt.setInt(1, id);\n ResultSet rs = stmt.executeQuery();\n\n if (rs.next()) {\n this.id = rs.getInt(\"staffID\");\n this.position = rs.getString(\"position\");\n }\n } catch (SQLException e) {\n System.out.println(e.toString());\n return false;\n } finally {\n Database.closeStatement(conn, stmt);\n }\n\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get message at head. | public Message peek()
{
return elements[head];
} | [
"com.wookler.server.river.MessageBuf.HeaderProto getHeader();",
"public final String getHead() {\n \t\treturn head;\n \t}",
"BaseProtocol.BaseMessage.Header getHeader();",
"public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }",
"public Header getHeaderMessage() {\n Header h = null;\n if (goalMessage != null) {\n try {\n Method m = goalMessage.getClass().getMethod(\"getHeader\");\n m.setAccessible(true); // workaround for known bug http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6924232\n h = (Header)m.invoke(goalMessage);\n }\n catch (Exception e) {\n e.printStackTrace(System.out);\n }\n }\n return h;\n }",
"com.hwl.imcore.improto.ImMessageRequestHead getRequestHead();",
"public static MsgHead getHead(MsgType type) {\r\n\t\tMsgHead head = new MsgHead();\r\n\t\thead.setType(type);\r\n\t\thead.setTime(getCurrentSystemStamp());\r\n\r\n\t\treturn head;\r\n\t}",
"@Override\r\n public java.lang.String getHead() {\r\n return _contentHolder.getHead();\r\n }",
"String GetMessage(MessageHeader mh){\n\t\treturn msgBoard.get(mh);\n\t\t\n\t}",
"public MsgHdrProtoBuf getHeader() {\n return header;\n }",
"Message getNextMessage();",
"public Atom getHead ()\r\n\t{\r\n\t\treturn _head.get(0);\r\n\t}",
"public String getMessage(){\n String message;\n if(hasTalked){\n message = this.messages.get(1);\n } else {\n message = this.messages.get(0);\n }\n hasTalked = true;\n return message;\n }",
"com.wookler.server.river.MessageBuf.HeaderProtoOrBuilder getHeaderOrBuilder();",
"public String getFirstMessage() {\n return mFirstMessage;\n }",
"private int read_msghead(ByteBuffer buf, int offset) {\n\n byte[] b2 = new byte[2];\n byte[] b4 = new byte[4];\n\n buf.position(0);\n buf.get(b2, 0, 2);\n mcode = (short) getInt(b2, 2);\n buf.get(b2, 0, 2);\n mdate = (short) getInt(b2, 2);\n buf.get(b4, 0, 4);\n mtime = getInt(b4, 4);\n buf.get(b4, 0, 4);\n // out.println( \"product date is \" + dstring);\n mlength = getInt(b4, 4);\n buf.get(b2, 0, 2);\n msource = (short) getInt(b2, 2);\n if (stationId == null || stationName == null) {\n try {\n NexradStationDB.init(); // make sure database is initialized\n NexradStationDB.Station station = NexradStationDB.getByIdNumber(\"000\" + msource);\n if (station != null) {\n stationId = station.id;\n stationName = station.name;\n }\n } catch (IOException ioe) {\n log.error(\"NexradStationDB.init \" + raf.getLocation(), ioe);\n }\n }\n buf.get(b2, 0, 2);\n mdestId = (short) getInt(b2, 2);\n buf.get(b2, 0, 2);\n mNumOfBlock = (short) getInt(b2, 2);\n\n return 1;\n\n }",
"Message getPreviousMessage();",
"private String getMessage(MessageChannel channel) {\n try {\n return channel.readNextString();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public ChildMessage getHeader(){return header;}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for method StockTotalIm1ServiceImpl.getStockTotalForProcessStock | @Test
public void testGetStockTotalForProcessStock_1() throws Exception {
StockTotalIm1DTO stockTotalIm1DTO = new StockTotalIm1DTO();
List<StockTotalIm1DTO> stockTotalIm1DTOList = Lists.newArrayList(stockTotalIm1DTO);
when(repository.findOneStockTotal(any())).thenReturn(null);
stockTotalIm1Service.getStockTotalForProcessStock(1L,1L,1L,1L);
} | [
"@Test(expected = Exception.class)\n public void testFindStockTotal_1() throws Exception {\n StockTotalIm1DTO stockTotalDTO = null;\n\n stockTotalIm1Service.findStockTotal(stockTotalDTO);\n }",
"@Test\n public void testFindStockTotal_3() throws Exception {\n StockTotalIm1DTO stockTotalDTO = new StockTotalIm1DTO();\n List<StockTotalIm1DTO> stockTotalIm1DTOList = Lists.newArrayList();\n\n when(repository.findOneStockTotal(any())).thenReturn(stockTotalIm1DTOList);\n stockTotalIm1Service.findStockTotal(stockTotalDTO);\n }",
"@Test\n public void shouldGetBasketTotalPrice() {\n\n shoppingCartService.addItemToCart(shoppingCart, item1);\n shoppingCartService.addItemToCart(shoppingCart, item2);\n\n assertThat(shoppingCart.getTotalPrices()).isEqualTo(BigDecimal.valueOf(199.15));\n\n }",
"@Test\n public void getStockCount() throws Exception {\n //Register 3 products and add 200 to product 3s stock count, check only product 3 has been correctly updated\n iShop.registerProduct(iProduct1);\n iShop.registerProduct(iProduct2);\n iShop.registerProduct(iProduct3);\n for (int i = 0; i < 200; i++) {\n iShop.addStock(iProduct3.getBarCode());\n }\n assertEquals(((Shop) iShop).stockRecords.get(0).getStockCount(), 0);\n assertEquals(((Shop) iShop).stockRecords.get(1).getStockCount(), 0);\n assertEquals(((Shop) iShop).stockRecords.get(2).getStockCount(), 200);\n //Add 100 to product 1s stock count, check only product 1 has been correctly updated\n for (int i = 0; i < 100; i++) {\n iShop.addStock(iProduct1.getBarCode());\n }\n assertEquals(((Shop) iShop).stockRecords.get(0).getStockCount(), 100);\n assertEquals(((Shop) iShop).stockRecords.get(1).getStockCount(), 0);\n assertEquals(((Shop) iShop).stockRecords.get(2).getStockCount(), 200);\n //Add 50 to product 2s stock count, and reduce 50 from product 3s stock count check only product 2 and 3 have been correctly updated\n for (int i = 0; i < 50; i++) {\n iShop.buyProduct(iProduct3.getBarCode());\n iShop.addStock(iProduct2.getBarCode());\n }\n assertEquals(((Shop) iShop).stockRecords.get(0).getStockCount(), 100);\n assertEquals(((Shop) iShop).stockRecords.get(1).getStockCount(), 50);\n assertEquals(((Shop) iShop).stockRecords.get(2).getStockCount(), 150);\n }",
"@Test\n public void testGetTotalPreparationCost() {\n System.out.println(\"getTotalPreparationCost\");\n float expResult = createdModule.getTotalPreparationCost(createdModule.getPresentationOne());\n float result = importedModule.getTotalPreparationCost(importedModule.getPresentationOne());\n assertEquals(expResult, result, 0.0);\n }",
"@Test\r\n public void testTotalPrice() {\r\n System.out.println(\"\\nCalculate Total Price\");\r\n double price = 50.0;\r\n double quantity = 4.0;\r\n double expResult = 200.0;\r\n double result = InvoicePayment.totalPrice(price, quantity);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(\"Price : \"+price+\", Quantity : \"+quantity+\", Result : \" + result);\r\n }",
"@Test\n public void testGetSumCount() throws Exception {\n System.out.println(\"getSumCount\");\n A1200GroupMServiceImpl instance = (A1200GroupMServiceImpl) DIManager.getBean(\"A1200GroupMService\");\n int result = instance.getSumCount();\n System.out.println(result);\n }",
"@Test\n public void shouldGetCartTotalTax() {\n\n shoppingCartService.addItemToCart(shoppingCart, item1);\n shoppingCartService.addItemToCart(shoppingCart, item2);\n assertThat(shoppingCart.getTotalTaxes()).isEqualTo(BigDecimal.valueOf(36.65));\n }",
"@Test\n public void testGetStock() {\n \n Productos instance = new Productos();\n instance.setStock(5);\n \n int expResult = 5;\n int result = instance.getStock();\n \n assertEquals(expResult, result);\n }",
"@Test\n public void testGetTotalPreparationHours() {\n System.out.println(\"getTotalPreparationHours\");\n float expResult = createdModule.getTotalPreparationHours(createdModule.getPresentationOne());\n float result = importedModule.getTotalPreparationHours(importedModule.getPresentationOne());\n assertEquals(expResult, result, 0.0);\n }",
"@Test\n public void testGetTotalSupportCost() {\n System.out.println(\"getTotalSupportCost\");\n float expResult = createdModule.getTotalSupportCost(createdModule.getPresentationOne());\n float result = importedModule.getTotalSupportCost(importedModule.getPresentationOne());\n assertEquals(expResult, result, 0.0);\n }",
"@Test\n void totalPercentageNoOrderLine() {\n allProducts.add(new Product(null, 1, \"productTest\", 10.0, null, null, null,null));\n\n ArrayList<ProductIncome> productIncomes = productBusiness.computeProductsIncome(allProducts, allOrderLines);\n productIncomes.get(0).calculPercentage();\n assertEquals(0.0, productIncomes.get(0).getPercentage(), 0 );\n }",
"@Test\r\n public void testCalculateCartTotal() {\r\n System.out.println(\"** Testing calculateCartTotal()\");\r\n double expTest = 25.55;\r\n\r\n productInstance = new Product (6, \"EE1302\", 12.55, 6);\r\n anotherProd = new Product(7, \"CS4365\", 13.00, 2);\r\n\r\n System.out.println(\"Created new product.. 6 - EE1302 -- $12.55 - 6 in stock\");\r\n System.out.println(anotherProd);\r\n\r\n CartInstance.addToCart(productInstance);\r\n System.out.println(\"Added to cart by product instance\");\r\n CartInstance.addToCart(anotherProd);\r\n System.out.println(\"Added to cart by anotherProd\");\r\n\r\n CartInstance.printCartItems();\r\n\r\n System.out.println(\"Testing the price of the items\" );\r\n productInstance.getPrice();\r\n anotherProd.getPrice();\r\n // UITest.showCart();\r\n double actual = CartInstance.calculateCartTotal();\r\n System.out.println(CartInstance.calculateCartTotal());\r\n Assertions.assertEquals(actual, expTest);\r\n\r\n if (expTest != actual) {\r\n fail(\"calculateCartTotal() is a prototype\");\r\n }\r\n }",
"@Test(expected = Exception.class)\n public void testFindStockTransDetail_1() throws Exception {\n stockTotalIm1Service.findStockTransDetail(null);\n }",
"@Test\n public void getNumberOfSales() throws Exception {\n //Register 3 products and add 200 to product 3s stock count and then reduce it by 50, check only product 3 has been correctly updated\n iShop.registerProduct(iProduct1);\n iShop.registerProduct(iProduct2);\n iShop.registerProduct(iProduct3);\n for (int i = 0; i < 200; i++) {\n iShop.addStock(iProduct3.getBarCode());\n }\n for (int i = 0; i < 50; i++) {\n iShop.buyProduct(iProduct3.getBarCode());\n }\n assertEquals(((Shop) iShop).stockRecords.get(0).getNumberOfSales(), 0);\n assertEquals(((Shop) iShop).stockRecords.get(1).getNumberOfSales(), 0);\n assertEquals(((Shop) iShop).stockRecords.get(2).getNumberOfSales(), 50);\n //Add 100 to product 1s stock count and then reduce it by 75, check only product 1 has been correctly updated\n for (int i = 0; i < 100; i++) {\n iShop.addStock(iProduct1.getBarCode());\n }\n for (int i = 0; i < 75; i++) {\n iShop.buyProduct(iProduct1.getBarCode());\n }\n assertEquals(((Shop) iShop).stockRecords.get(0).getNumberOfSales(), 75);\n assertEquals(((Shop) iShop).stockRecords.get(1).getNumberOfSales(), 0);\n assertEquals(((Shop) iShop).stockRecords.get(2).getNumberOfSales(), 50);\n //Add 50 to product 2s stock count and then reduce it by 49, check only product 2 has been correctly updated\n for (int i = 0; i < 50; i++) {\n iShop.addStock(iProduct2.getBarCode());\n }\n for (int i = 0; i < 49; i++) {\n iShop.buyProduct(iProduct2.getBarCode());\n }\n assertEquals(((Shop) iShop).stockRecords.get(0).getNumberOfSales(), 75);\n assertEquals(((Shop) iShop).stockRecords.get(1).getNumberOfSales(), 49);\n assertEquals(((Shop) iShop).stockRecords.get(2).getNumberOfSales(), 50);\n }",
"@Test\r\n\t@Order(1)\r\n\tpublic void testTotalPrice() {\r\n\r\n\t\tSystem.out.println(\"Total Precio Test\");\r\n\r\n\t\tcarritoCompraService.addArticulo(new Articulo(\"articulo1\", 10.5));\r\n\t\tcarritoCompraService.addArticulo(new Articulo(\"articulo2\", 20.5));\r\n\t\tcarritoCompraService.addArticulo(new Articulo(\"articulo3\", 30.5));\r\n\r\n\t\tSystem.out.println(\"Precio Total : \" + carritoCompraService.totalPrice());\r\n\r\n\t\tassertEquals(carritoCompraService.totalPrice(), 61.5);\r\n\t\t\r\n\t}",
"@Test\n void testItemProcessor2() {\n\n BankTransactionItemAnalyticsProcessor actualItemProcessor2Result = (new SpringBatchConfig()).itemProcessor2();\n assertEquals(0.0, actualItemProcessor2Result.getTotalCredit());\n assertEquals(0.0, actualItemProcessor2Result.getTotalDebit());\n }",
"@Test\n\tpublic void testGetQuote() {\n StockQuote testQuote = null;\n try {\n testQuote = stockServiceImplementation.getQuote(symbol);\n } catch (StockServiceException e) {\n e.printStackTrace();\n }\n assertTrue(testQuote.getStockPrice() instanceof BigDecimal);\n\t}",
"public void VerifyCheckoutTotalPrice(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Total Price should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutOrdertotal\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Total Price in Billing is present \"+getText(locator_split(\"txtCheckoutOrdertotal\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Total Price in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Total Price title is present\");\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Total Price title is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutOrdertotal\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if (isMonotonic(password)) System.out.println("HasPartTwoDouble "+Arrays.toString(password)+": "+hasPartTwoDouble(password)); | public static boolean matchesPartTwo(int[] password) {
return isMonotonic(password) && hasPartTwoDouble(password);
} | [
"public static boolean hasPartTwoDouble(int[] password) {\n\t\tint doubleCount = 0;\n\t\tint curDouble = -1;\n\t\tfor(int i=0; i<password.length; i++) {\n\t\t\tif (password[i]!=curDouble) {\n\t\t\t\tif (doubleCount==2) return true;\n\t\t\t\t\n\t\t\t\tdoubleCount = 1;\n\t\t\t\tcurDouble = password[i];\n\t\t\t} else {\n\t\t\t\tdoubleCount++;\n\t\t\t}\n\t\t}\n\t\treturn (doubleCount==2);\n\t}",
"@Test\n\tvoid isTwoWordsSeperatedByNumSign() {\n\t\tassertFalse(PasswordChecker.isTwoWordsSeperatedByNum(\"clown/jokes\"));\n\t}",
"@Test\n\tvoid isTwoWordsSeperatedByNumOne() {\n\t\tassertFalse(PasswordChecker.isTwoWordsSeperatedByNum(\"clown4socks\"));\n\t}",
"public boolean comparePassword(String password);",
"boolean hasPassWord();",
"boolean isPassword();",
"boolean hasSufficientEntropy(String password);",
"public static void passwordValidation(String password) {\r\n\r\n\t\tint letter = 0;\r\n\t\tint counterCapital = 0;\r\n\t\tint counterMinuscule = 0;\r\n\t\tint counterSpecialCharacter = 0;\r\n\t\tint counterNumber = 0;\r\n\t\tint counterInBetweenNumber = 0;\r\n\t\tint counterInBetweenSpecialChar = 0;\r\n\t\t\r\n\t\t//Section 1\r\n\t\tfor (int i = 0; i < password.length(); i++) {\r\n\t\t\tletter = password.charAt(i); \t\t\t\t\r\n\r\n\t\t\tif (letter >= 65 && letter <= 90) {\r\n\t\t\t\tcounterCapital++;\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (letter >= 97 && letter <= 122) {\r\n\t\t\t\tcounterMinuscule++;\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif ((letter >= 33 && letter <= 47) || (letter >= 58 && letter <= 64)) {\r\n\t\t\t\tcounterSpecialCharacter++;\r\n\t\t\t}\r\n\t\t\tif (letter >= 48 && letter <= 57) {\r\n\t\t\t\tcounterNumber++;\r\n\t\t\t}\r\n\t\t\tif (((i > 0) && (i < (password.length() - 2))) && (letter >= 48 && letter <= 57)) {\r\n\t\t\t\tcounterInBetweenNumber++;\r\n\t\t\t}\r\n\t\t\tif (((i > 0) && (i < (password.length() - 2)))\r\n\t\t\t\t\t&& ((letter >= 33 && letter <= 47) || (letter >= 58 && letter <= 64))) {\r\n\t\t\t\tcounterInBetweenSpecialChar++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Section 2\r\n\t\tif (counterCapital < 1) {\r\n\t\t\tSystem.out.println(\"The password does not contain at least 1 capital letters.\");\r\n\t\t}\r\n\t\tif (counterMinuscule < 1) {\r\n\t\t\tSystem.out.println(\"The password does not contain at least 1 minuscule letters.\");\r\n\t\t}\r\n\t\tif (counterSpecialCharacter < 1) {\r\n\t\t\tSystem.out.println(\"The password does not contain at least 1 special character.\");\r\n\t\t}\r\n\t\tif (counterNumber < 2) {\r\n\t\t\tSystem.out.println(\"The password does not contain at least 2 numbers.\");\r\n\t\t}\r\n\t\tif ((counterCapital < 1) && (counterMinuscule < 1)) {\r\n\t\t\tSystem.out.println(\"The password does not contain at least 2 letters.\");\r\n\t\t}\r\n\t\tif ((counterInBetweenNumber < 1) && (counterInBetweenSpecialChar < 1)) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"The password does not contain at least one special letter or one number in the middle of the password.\");\r\n\t\t}\r\n\t\tif (password.length() < 8) {\r\n\t\t\tSystem.out.println(\"The password must be at least 8 characters long.\");\r\n\t\t}\r\n\t\tif ((counterCapital >=1)\r\n\t\t\t&&(counterMinuscule >= 1)\r\n\t\t\t\t&&(counterSpecialCharacter >= 1)\r\n\t\t\t\t\t&&(counterNumber >= 2)\r\n\t\t\t\t\t\t&&((counterCapital >= 1) && (counterMinuscule >= 1))\r\n\t\t\t\t\t\t\t&&((counterInBetweenNumber >= 1) && (counterInBetweenSpecialChar >= 1))&&(password.length() >= 8)) {\r\n\t\t\tSystem.out.println(\"The password compiles with the rules.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testIsValidPassword() {\n System.out.println(\"isValidPassword\");\n String input = \".%6gwdye\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidPassword(input);\n assertEquals(expResult, result);\n }",
"public boolean checkPassword(String password) {\n char[] scrambled = scramble(password);\n char[] expected = {\n 0xF4,\n 0xC0,\n 0x97,\n 0xF0,\n 0x77,\n 0x97,\n 0xC0,\n 0xE4,\n 0xF0,\n 0x77,\n 0xA4,\n 0xD0,\n 0xC5,\n 0x77,\n 0xF4,\n 0x86,\n 0xD0,\n 0xA5,\n 0x45,\n 0x96,\n 0x27,\n 0xB5,\n 0x77,\n 0xA4,\n 0xF1,\n 0x94,\n 0xC1,\n 0xC0,\n 0xE1,\n 0xC1,\n 0xD1,\n 0x85\n };\n return Arrays.equals(scrambled, expected);\n }",
"static boolean validatePassword(String password1, String password2){\r\n boolean validPassword = false; // returned at end of method\r\n boolean areEqual = false; \r\n boolean hasLength = false;\r\n boolean hasLetter = false;\r\n boolean hasNumber = false;\r\n boolean hasNonAlphaNum = false;\r\n boolean hasSpace = false;\r\n boolean hasIllegal = false;\r\n boolean hasRepeat = false;\r\n boolean hasIllegalFirst = false;\r\n \r\n // if passwords are the same, set areEqual to true and continue, else \r\n // stop testing. the areEqual, hasLength, and hasIllegalFirst booleans are\r\n // somewhat redundant seeing as the testing only continues if they do pass,\r\n // however i kept them in for consistency in the final test at the end of the\r\n // method\r\n if (password1.compareTo(password2) == 0){\r\n areEqual = true;\r\n //if password is at least 8 characters, haslength is set to true and \r\n //testing continues, otherwise stop testing.\r\n if (password1.length() > 7){\r\n hasLength = true;\r\n //checks that first character is not ! or ?\r\n if (password1.charAt(0) != '!' && password1.charAt(0) != '?'){\r\n hasIllegalFirst = false;\r\n //begins a count controlled loop to test each char in the string. \r\n //uses boolean helper methods to determine specific kind of char.\r\n //then the appropriate flag is set to true;\r\n for (int i = 0; i < password1.length(); i++){\r\n //sets char c to the character at index i.\r\n char c = password1.charAt(i);\r\n \r\n if (isRepeat(i, password1)){\r\n hasRepeat = true; // if the current character equals the character before and after, then it is repeated at least 3 times, hasRepeat is set to true.\r\n }\r\n if (isLetter(c)){\r\n hasLetter = true; // if the character is an alpha character, hasAlpha = true;\r\n }\r\n else if (isNumber(c)){\r\n hasNumber = true; // if the character is a number character, hasNumber = true\r\n }\r\n else if (isNonAlphaNum(c)){\r\n hasNonAlphaNum = true; // if the character is a non alphanumeric character has nonAlpha = true;\r\n }\r\n else if (isSpace(c)){\r\n hasSpace = true; // if the character is a space, hasSpace = true;\r\n }\r\n else {\r\n hasIllegal = true; // if the character was none of the above, it is an illegal character. \r\n }\r\n }//ends for statement\r\n }\r\n }\r\n }\r\n //checks flags if all are correct, then the password is valid and true is returned.\r\n // if not then false is returned.\r\n if (areEqual && hasLength && hasLetter && hasNumber && hasNonAlphaNum\r\n && !hasIllegalFirst && !hasSpace && !hasIllegal && !hasRepeat){\r\n validPassword = true; \r\n }\r\n return validPassword;\r\n }",
"public static String determinePasswordStrength(String password)\r\n {\r\n double passwordlength = password.length();\r\n ArrayList<Long> possibilties= new ArrayList<Long>();\r\n double countedPossibilities = 0;\r\n double totalPossibilties = 0;\r\n ArrayList<String> counterArray = new ArrayList<String>();\r\n String longestMatchingWord = \"\";\r\n\r\n File fileToRead = new File(\"dictionary.txt\");\r\n boolean hasUpper = false;\r\n boolean hasLower = false;\r\n boolean hasNumber = false;\r\n boolean hasSpecial = false;\r\n boolean isUpper = false;\r\n boolean isLower = false;\r\n boolean isNumber = false;\r\n boolean isSpecial = false;\r\n\r\n for(int i = 0; i < password.length(); i++)\r\n {\r\n\r\n if(\"abcdefghijklmnopkrstuvwxyz\".contains(Character.toString(password.charAt(i))) && !hasLower)\r\n {\r\n hasLower = true;\r\n countedPossibilities = countedPossibilities + 26;\r\n }\r\n else if(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".contains(Character.toString(password.charAt(i))) && !hasUpper)\r\n {\r\n hasUpper = true;\r\n countedPossibilities = countedPossibilities + 26;\r\n }\r\n else if(\"0123456789\".contains(Character.toString(password.charAt(i))) && !hasNumber)\r\n {\r\n hasNumber= true;\r\n countedPossibilities = countedPossibilities + 10;\r\n }\r\n else if(\" ,!β#$%&β()*+,-./:;<=>?@[\\\\]^_`{|}~\".contains(Character.toString(password.charAt(i))) && !hasSpecial)\r\n {\r\n hasSpecial = true;\r\n countedPossibilities = countedPossibilities + 33;\r\n }\r\n\r\n }\r\n double centuries = 0;\r\n double years = 0;\r\n double days = 0;\r\n double hours = 0;\r\n double minutes = 0;\r\n double seconds = 0;\r\n double tempcenturies = 0;\r\n double tempyears = 0;\r\n double tempdays = 0;\r\n double temphours = 0;\r\n double tempminutes = 0;\r\n double tempseconds2 = 0;\r\n double tempseconds = 0;\r\n double point = 0.00000037;\r\n double point1 = 3.8;\r\n\r\n// BigDecimal E = new BigDecimal(Math.E);\r\n// BigInteger fivehundread = new BigInteger(\"1000\");\r\n// BigInteger zero = new BigInteger(\"0\");\r\n //BigDecimal centuries = new BigDecimal(\"0\");\r\n\r\n ///////////////INSERT Dictionary Attack Here//////////////////////\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(fileToRead));\r\n String wordInFile = \"\";\r\n\r\n while ((wordInFile = reader.readLine()) != null) {\r\n //System.out.println(wordInFile);\r\n wordInFile = wordInFile.toLowerCase();\r\n if (wordInFile.length() > 3) {\r\n if (password.contains(wordInFile))\r\n {\r\n if(longestMatchingWord.length() < wordInFile.length())\r\n {\r\n longestMatchingWord = wordInFile;\r\n }\r\n }\r\n }\r\n }\r\n for (int i = 0; i < longestMatchingWord.length(); i++) {\r\n if (\"abcdefghijklmnopkrstuvwxyz\".contains(Character.toString(password.charAt(i)))) {\r\n //isLower = true;\r\n //countedPossibilities = countedPossibilities.add(BigDecimal.valueOf(26));\r\n passwordlength--;\r\n //System.out.println(passwordlength);\r\n }\r\n else if (\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".contains(Character.toString(password.charAt(i)))) {\r\n //isUpper = true;\r\n //countedPossibilities = countedPossibilities.add(BigDecimal.valueOf(26));\r\n passwordlength--;\r\n }\r\n else if (\"0123456789\".contains(Character.toString(password.charAt(i)))) {\r\n //isNumber = true;\r\n //countedPossibilities = countedPossibilities.add(BigDecimal.valueOf(10));\r\n passwordlength--;\r\n }\r\n else if (\" ,!β#$%&β()*+,-./:;<=>?@[\\\\]^_`{|}~\".contains(Character.toString(password.charAt(i)))) {\r\n //isSpecial = true;\r\n //countedPossibilities = countedPossibilities.add(BigDecimal.valueOf(33));\r\n passwordlength--;\r\n }\r\n\r\n }\r\n }\r\n catch (FileNotFoundException e)\r\n {\r\n\r\n }\r\n catch(IOException e)\r\n {\r\n System.out.println(\"didnt read file\");\r\n }\r\n\r\n // Algorithm is here\r\n //y =3.7*e(3.8x) rounded to 4 to fit into big decimal\r\n\r\n totalPossibilties = (Math.pow(countedPossibilities, passwordlength));\r\n tempseconds2 = point*Math.pow(Math.E, totalPossibilties*4);\r\n tempseconds = tempseconds2;\r\n\r\n if (tempseconds == 0)\r\n {\r\n\r\n }\r\n else if (tempseconds > 1)\r\n {\r\n\r\n }\r\n else\r\n {\r\n tempseconds = 0;\r\n }\r\n\r\n\r\n seconds = tempseconds % 60;\r\n tempminutes = tempseconds / 60;\r\n minutes = tempminutes % 60;\r\n temphours = tempminutes / 60;\r\n hours = temphours % 24;\r\n tempdays = temphours / 24;\r\n days = tempdays % 365;\r\n tempyears = tempdays / 365;\r\n\r\n if(tempyears > 500)\r\n {\r\n return (\"Greater than 500\" + \" years \");\r\n }\r\n //years = tempcenturies.divide(BigInteger.valueOf(100));\r\n //System.out.println(tempyears.toString() + \" years \" + days.toString() + \" days \" + hours.toString() + \" hours \" + minutes.toString() + \" minutes \" + seconds.toString() + \" seconds\");\r\n else\r\n {\r\n return (tempyears + \" years \" + days + \" days \" + hours + \" hours \" + minutes + \" minutes \" + seconds + \" seconds\");\r\n }\r\n }",
"private boolean hasBigLetter(Password password){\n return checkExistance(password, bigCharacters);\n }",
"boolean isSecretValid();",
"private boolean hasDigit(Password password) {\n return checkExistance(password, digits);\n }",
"@Test\n\tvoid isTwoWordsSeperatedByNumDigit() {\n\t\tPasswordChecker.addToDict(\"jokes\");\n\t\tPasswordChecker.addToDict(\"clown\");\n\t\tassertTrue(PasswordChecker.isTwoWordsSeperatedByNum(\"clown2jokes\"));\n\t}",
"public static boolean validate512(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP512(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"void checkPasswordSecure(String password);",
"@Test\n\tvoid containsDigitsNumbersAndSigns() {\n\t\tassertTrue(PasswordChecker.containsDigits(\"@@22/\"));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This first method asks the user to enter the number of batters. | int askNumberOfBatters(Scanner input) {
System.out.println("Please enter the number of batters: ");
int batterNumber;
batterNumber = getValidInteger(input);
return batterNumber;
} | [
"private void promptForTotalNumberPlayers(){\n theView.printToUser(\"How many players will be playing?\");\n try {\n //get the number of players from the user\n int tempTotalPlayers = Integer.parseInt(theModel.getUserInput());\n if(tempTotalPlayers > 1) {\n //set the total number of players in the model\n theModel.setNumberOfPlayers(tempTotalPlayers);\n }else{\n theView.printToUser(\"Please check entry and try again.\");\n promptForTotalNumberPlayers();\n }\n\n }catch(NumberFormatException e){\n //error parsing string to int, try again\n theView.printToUser(\"Please check entry and try again.\");\n promptForTotalNumberPlayers();\n }\n }",
"private void promptForNumberOfTeams(){\n //ask for number of players\n theView.printToUser(\"How many teams need to be created?\");\n String tempStringTeams = theModel.getUserInput(); //store number of teams from user\n //send value to be verified\n if (theModel.validateTeams(tempStringTeams) && theModel.verifyInteger(tempStringTeams) > 1){\n //number of teams is valid, do nothing (number of teams has been set inside the model)\n }else{\n //invalid number of teams, try again\n theView.printToUser(\"Invalid number of teams, please try again.\");\n promptForNumberOfTeams();\n }\n }",
"public static int promptForFixtureNumber(Scanner scanner, int fixtureNumber) {\r\n\t\twhile (fixtureNumber < 1 || fixtureNumber > 5) {\r\n\t\t\tSystem.out.println(\"Select fixture:\");\r\n\t\t\tfixtureNumber = scanner.nextInt();\r\n\t\t}\r\n\t\treturn fixtureNumber;\r\n\t}",
"private static void getUserInput(){\r\n\t\t\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the number of customers \");\r\n\t\t\r\n\t\twhile(!scanner.hasNextInt()) //non ints\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Invalid entry, try again: \");\r\n\t\t\tscanner.next();\r\n\t\t}\r\n\t\t\r\n\t\tnumberCustomers = scanner.nextInt();\r\n\t\t\r\n\t\tSystem.out.print(\"Enter the number of floors \");\r\n\t\t\r\n\t\twhile(!scanner.hasNextInt()) //non ints\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Invalid entry, try again: \");\r\n\t\t\tscanner.next();\r\n\t\t}\r\n\t\t\r\n\t\tnumberFloors = scanner.nextInt();\r\n\r\n\t\tscanner.close();\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\tScanner input=new Scanner(System.in);\n\tint number=1;\n\twhile(number <=5) {\n\tSystem.out.println(\"Please tell me your name\");\n\tString name=input.nextLine();\n System.out.println(\"Nice to meet you \"+name);\n number++;\n \n\t}\n\tSystem.out.println(\"-------------------------\");\n\t//play a lottery where we need to enter from 1 to 100\n\t//lucky number is 7;\n\t //keep asking user to enter number until they enter a lucky number;\n\t\n\n\t\n\t}",
"private static void promptMineCount() {\n try {\n mineCountStr = JOptionPane.showInputDialog(null,\n \"Enter in the desired number of mines \" +\n \"(default is 10): \");\n\n // set mines to 10 or 2 if less than 1 or over cell count\n if (Integer.parseInt(mineCountStr) < 1 ||\n Integer.parseInt(mineCountStr) >\n Integer.parseInt(boardSizeStr) *\n Integer.parseInt(boardSizeStr)) {\n if (boardSize > 3)\n mineCountStr = \"10\";\n else\n mineCountStr = \"2\";\n }\n\n } catch (NumberFormatException e) {\n if (boardSize > 3)\n mineCountStr = \"10\";\n else\n mineCountStr = \"2\";\n }\n\n mineCount = Integer.parseInt(mineCountStr);\n }",
"public static void promptUser() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.printf(\"Enter a positive natural number to initiate the Hailstone sequence: \");\r\n\t\t\r\n\t\t// store n\r\n\t\tint n = scan.nextInt();\r\n\t\t\r\n\t\t// request validation\r\n\t\tvalidateInput(n);\r\n\t}",
"public void setNoOfSBeds(int index)\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter the number of single beds in room \" + index);\n\t\t\n\t\ttry//tries to turn the input string into an int\n {\n sBeds = Integer.parseInt(s.nextLine());\n \n }\n catch (NumberFormatException ex)//if the NumberFormatException error is thrown in the try, it is \"catched\" and this code is executed\n {\n \tSystem.out.println(\"Your input was not a valid integer\");\n \tsetNoOfSBeds(index);\n }\n\t}",
"public void setInputNumber(int count){\r\n this.count=count;\r\n }",
"String promptForCruiserNumber();",
"private static int requestStartingFunds() {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"How much money would you like to bring to Las Vegas?\\t\");\n return scanner.nextInt();\n }",
"public static void main(String[] args) {\n System.out.println(Integer.parseInt(JOptionPane.showInputDialog(\"Enter a number\"))+1);\r\n \r\n \r\n //Try creating a dialog, parsing it, and initializing an int in a single line.\r\n //You should have only one semicolon (;) in this line.\r\n\r\n \r\n }",
"private static void setBudget() {\n\t\tSystem.out.println(\"How much is the budget:\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint input = scan.nextInt();\n\t\tbudget = input;\n\t\tSystem.out.println(\"Budget Entry successfull:\"+budget);\n\t}",
"public void promptForRoomCapacity(){\n System.out.println(\"Please enter room capacity\");\n }",
"public void getNumberFromUser(){\r\n\t\tSystem.out.println(\"enter a value\");\r\n\t\tthis.numberOfPrimes = input.nextInt();\r\n\t\tthis.primes = new int[numberOfPrimes];\r\n\t}",
"public void promptSize() {\n welcomeTA.setText(\"What size of data would you like?\\nPlease enter a number\" +\n \" between 0 and 500000 below\\nin the text box and then press Enter.\\n\");\n }",
"public void setNumsBaby (int count) {\n numsBaby = count;\n }",
"void bossGadgetChoice() {\n System.out.println(\"\\nYou must use the correct gadget to beat your enemy!!\");\n System.out.println(\"Which gadget would you like to use?\");\n\n System.out.println(\"Enter [1] for impact web | Enter [2] for web bomb | Enter [3] for electricWeb\");\n userGadget = input.nextInt();\n\n bossAttack();\n }",
"public void setNoOfDBeds(int index)\n\t\t{\n\t\t\tScanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Please enter the number of double beds in room \" + index);\n\t\t\t\n\t\t\ttry//tries to turn the input string into an int\n\t {\n\t dBeds = Integer.parseInt(s.nextLine());\n\t \n\t }\n\t catch (NumberFormatException ex)//if the NumberFormatException error is thrown in the try, it is \"catched\" and this code is executed\n\t {\n\t \tSystem.out.println(\"Your input was not a valid integer\");\n\t \tsetNoOfDBeds(index);\n\t }\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scrape all relevant information for this chapter. | public void generate() throws IOException {
Document document = scraper.parseHTMLDocument(url);
this.chapterTitle = scraper.parseChapterTitle(document);
this.text = scraper.parseChapterText(document);
this.chapterNumber = scraper.parseChapterNumber(document);
} | [
"@Override\n protected void extractChapText(Chapter chapter) {\n StringBuilder chapterText = new StringBuilder();\n\n Elements content = chapter.rawHtml.select(chapTextSelector);\n Iterator<Element> iterator = content.iterator();\n while (iterator.hasNext()) {\n chapterText.append(iterator.next().html());\n if (iterator.hasNext()) chapterText.append(\"<hr />\");\n }\n chapter.contentFromString(chapterText.toString().replace(\"blockquote\", \"div\"));\n }",
"private void getAllChapter() {\n mChapterViewModel.prepareIntentAction(getIntent()).observe(this, chapterItems -> {\n\n mActivityChapterBinding.chapterShimmerViewContainer.setVisibility(View.GONE);\n mActivityChapterBinding.chapterShimmerViewContainer.stopShimmer();\n\n if (chapterItems == null) return;\n\n if (mChapterViewModel.isSourseDownload) {\n //if sourse of data from data base\n adapter.setIsDownload(mChapterViewModel.isSourseDownload);\n\n adapter.setmItemList(chapterItems);\n\n adapter.setBookId(mChapterViewModel.mBooksItem != null ? mChapterViewModel.mBooksItem.getBookID() : 0);\n\n } else {\n //if sourse of data from internet\n\n mChapterViewModel.setStateForChapterList(chapterItems).observe(this, chapters -> {\n if (chapters == null) return;\n\n adapter.setmItemList(chapters);\n\n adapter.setBookId(mChapterViewModel.mBooksItem != null ? mChapterViewModel.mBooksItem.getBookID() : 0);\n\n });\n }\n });\n\n }",
"private void downloadChapters() {\n Document rootFile = ctx.chapterList.parseHtml(BASE_URI);\n Elements chapterAddresses = rootFile.select(\"div[class=chapter-list] a[href]\");\n for (Element chapterAddr : chapterAddresses) {\n Optional<URLResource> chapterUrl = URLResource.of(chapterAddr.absUrl(\"href\"));\n if (chapterUrl.isPresent()) {\n\t String chapterName = chapterAddr.ownText();\n\t if (!chapterName.endsWith(\".html\")) {\n\t chapterName += \".html\";\n\t }\n\t Path chapterPath = ctx.chaptersDir.resolve(chapterName);\n\t ctx.add(chapterUrl.get(), new FileResource(chapterPath));\n }\n }\n ctx.download();\n }",
"public abstract void parseChapter(XMLObject xml, Chapter chapter);",
"private void parseBookDetails(Response response) throws Exception{\r\n \r\n \t\t// Prepare HTML for parsing.\r\n \t\tDocument html = response.parse();\r\n \r\n \t List<PhysicalBook> physicalBooks = new ArrayList<PhysicalBook>();\r\n \t Elements tableRows = html.select(\"table.bibItems\").select(\"tr.bibItemsEntry\");\r\n \t \r\n \t // Create all our PhysicalBooks.\r\n \t for (Element row : tableRows) {\r\n \t \tElements columns = row.getElementsByTag(\"td\"); \r\n \t \tString library = columns.get(0).text();\r\n \t \tString shelf = columns.get(1).text();\r\n \t \tString status = columns.get(2).text();\r\n \t \tString message = columns.get(3).text();\r\n \t \tPhysicalBook physicalBook = new PhysicalBook(library, shelf, status, message);\r\n \t \tphysicalBooks.add(physicalBook);\r\n \t }\r\n \r\n \t // Select all rows containing detailed information.\r\n \t Elements rows = html.select(\"div#orders\").select(\"table.bibDetail\").select(\"tr\");\r\n \t String description = \"\", notes = \"\", isbn = \"\";\r\n \r\n \t // Loop through all rows.\r\n \t for(int i=1;i<rows.size();i++) {\r\n \t \t\r\n \t \t// If we find a physical description,\r\n \t \tif(rows.get(i).select(\"td.bibInfoLabel\").text().equals((String) \"Fysisk beskrivning\")){\r\n \t \t\t// Save the text present on row #1,\r\n \t \t\tdescription += (rows.get(i)).select(\"td.bibInfoData\").text();\r\n \t\t\t\tint n = i+1;\r\n \t\t\t\t// And if there are rows without labels following it,\r\n \t\t\t\t// they are also part of the description. \r\n \t\t\t\twhile((rows.get(n).select(\"td.bibInfoLabel\").size() == 0)){\r\n \t\t\t\t\tdescription += (rows.get(n)).select(\"td.bibInfoData\").text();\r\n \t\t\t\t\tn++;\r\n \t\t\t\t}\r\n \t \t}\r\n \t \t\r\n \t \t// If we find a note,\r\n \t \tif(rows.get(i).select(\"td.bibInfoLabel\").text().equals((String) \"Anmrkning\")) {\r\n \t \t\t// Save the text on row #1\r\n \t \t\tnotes += (rows.get(i)).select(\"td.bibInfoData\").text();\r\n \t\t\t\tint n = i+1;\r\n \t\t\t\t// And save text of possible following rows that has no label.\r\n \t\t\t\twhile((rows.get(n).select(\"td.bibInfoLabel\").size() == 0)) {\r\n \t\t\t\t\tnotes += (rows.get(n)).select(\"td.bibInfoData\").text();\r\n \t\t\t\t\tn++;\r\n \t\t\t\t}\r\n \t \t}\r\n \t \t\r\n \t \t// If we find an ISBN, save it.\r\n \t \tif(rows.get(i).select(\"td.bibInfoLabel\").text().equals((String) \"ISBN\")){\r\n \t \t\tisbn = (rows.get(i)).select(\"td.bibInfoData\").text();\r\n \t \t}\r\n \t }\r\n \t \r\n\t\tElements table = html.select(\"table.bibDetail\").first().select(\"tr\");\r\n\t\tfor(int i=0;i<table.size();i++){\r\n\t\t\tif( table.get(i).select(\"td.bibInfoLabel\").text().equals((String) \"Upphov\")){\r\n\t\t\t\tnewBook.setAuthor(table.get(i).select(\"td.bibInfoData\").text());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif( table.get(i).select(\"td.bibInfoLabel\").text().equals((String) \"Titel\")){\r\n\t\t\t\tString[] temp =(table.get(i).select(\"td.bibInfoData\").text().split(\"/\"));\r\n\t\t\t\tnewBook.setName(temp[0]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( table.get(i).select(\"td.bibInfoLabel\").text().equals((String) \"Utgivning\")){\r\n\t\t\t\t\r\n\t\t\t\tnewBook.setPublisher(table.get(i).select(\"td.bibInfoData\").text());\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n \t // Update newBook with this information.\r\n \t newBook.setPhysicalBooks(physicalBooks);\r\n \t newBook.setIsbn(isbn);\r\n \t newBook.setNotes(notes);\r\n \t newBook.setPhysicalDescription(description);\r\n \t \r\n \t message.obj = newBook;\r\n \t}",
"private void getBooks(String author, String aurl, String apath)\n\t\t\tthrows IOException {\n\n\t\ttry {\n\t\t\tDocument doc = Jsoup.connect(aurl).timeout(10 * 1000).get();\n\t\t\tElements subLists = doc.select(\"div.work\");\n\t\t\tif (subLists != null && subLists.size() > 0) {\n\t\t\t\tgetBooksList(author, aurl, doc, apath);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tElements booksList = doc.getElementsByTag(\"td\");\n\n\t\t\tint count = 0;\n\t\t\tString bookname = \"\";\n\t\t\tint i = 0;\n\t\t\tif (booksList != null) {\n\t\t\t\tint size = booksList.size();\n\t\t\t\tfor (i = 0; i < size; i++) {\n\t\t\t\t\tElement bookItem = booksList.get(i);\n\t\t\t\t\tString bookText = bookItem.getElementsByTag(\"a\").attr(\n\t\t\t\t\t\t\t\"abs:href\");\n\t\t\t\t\tif (bookText.contains(\"#\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tbookname = bookItem.text();\n\t\t\t\t\tif (bookText.isEmpty() || bookText == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (skipBooks.contains(bookname))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (authorNames.containsKey(bookname))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tgetBooks(bookname, bookText, apath);\n\t\t\t\t\tcount++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tif (doc.select(\"title\") != null\n\t\t\t\t\t\t&& doc.select(\"title\").size() > 0)\n\t\t\t\t\tbookname = doc.select(\"title\").first().text();\n\t\t\t\telse if (doc.select(\"p.pagehead\") != null\n\t\t\t\t\t\t&& doc.select(\"p.pagehead\").size() > 0)\n\t\t\t\t\tbookname = doc.select(\"p.pagehead\").first().text();\n\t\t\t\telse if (doc.select(\"h1\") != null\n\t\t\t\t\t\t&& doc.select(\"h1\").size() > 0)\n\t\t\t\t\tbookname = doc.select(\"h1\").first().text();\n\t\t\t\telse\n\t\t\t\t\tbookname = author;\n\t\t\t\tgetContent(aurl, bookname, apath);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// ConsoleView.writeInConsole(\"Something went wrong when extracting books of Author \"\n\t\t\t// + author + e);\n\t\t}\n\t}",
"private List<Elements> extractHTMLInfo(String url) throws IOException {\r\n\r\n //All required info to be collected is within the <section> tag\r\n Element sectionTag = Jsoup.connect(url).get().select(\"section\").get(0);\r\n\r\n List<Elements> list = new ArrayList();\r\n\r\n //Banner img Tag\r\n list.add(sectionTag.select(\"img\"));\r\n\r\n //TimeTag\r\n list.add(sectionTag.select(\"header\").select(\"time\"));\r\n\r\n //Article Title\r\n list.add(sectionTag.select(\"header\").select(\"h2 a\"));\r\n\r\n //Author\r\n list.add(sectionTag.select(\"header\").select(\"p a\"));\r\n\r\n //Content Body HTML\r\n list.add(sectionTag.select(\"article\").select(\"div\"));\r\n\r\n return list;\r\n }",
"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 Results[] getPageInfo(Document doc){\n\t\tResults[] results = null;\n\t\tString json_info = \"\";\n\t\t\n\t\t//title info\n\t\tElements titles = doc.select(\"h2[itemprop=name]\");\n\t\t//clean up titles and place into an array\n\t\tint titles_length = titles.size();\n\t\tString[] titles_str = new String[titles_length];\n\t\tfor (int i = 0; i < titles_str.length; i++){\n\t\t\tString title_clean = Jsoup.parse(titles.get(i).toString()).text();\n\t\t\ttitles_str[i] = title_clean;\n\t\t\t//System.out.println(titles_str[i]);\n\t\t}\n\t\t\n\t\t//price info\n\t\tElements prices = doc.select(\"span[itemprop=price]\");\n\t\t//clean pricing data and place into array\n\t\tint prices_length = prices.size();\n\t\tString[] prices_str = new String[prices_length];\n\t\tfor (int i = 0; i < prices_str.length; i++){\n\t\t\t//String prices_clean = prices.get(i).toString().replaceAll(\"<[^>]*>\", \"\");\n\t\t\tString prices_clean = Jsoup.parse(prices.get(i).toString()).text();\n\t\t\tprices_str[i] = prices_clean;\n\t\t\t//System.out.println(prices_str[i]);\n\t\t}\n\t\t\n\t\t//seller info\n\t\t//going to grab seller data from json at top (price data in this is not accurate)\n\t\tString docstring = doc.toString();\n\t\tString[] lines = docstring.split(\"\\n\");\n\t\tfor (int i = 0; i < lines.length; i++){\n\t\t\t//found json\n\t\t\tif (lines[i].contains(\"var jsonSPURefactor\")){\n\t\t\t\tjson_info = lines[i];\n\t\t\t\t//no need to continue\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//split into fields\n\t\tString[] json_split = json_info.split(\",\");\n\t\tString[] json_sellers = new String[50];\n\t\tint seller_num = 0;\n\t\t//only need sellerName field\n\t\tfor (int i = 0; i < json_split.length; i++){\n\t\t\tif (json_split[i].contains(\"sellerName\")){\n\t\t\t\tjson_sellers[seller_num] = json_split[i].substring(14, json_split[i].length() - 1);\n\t\t\t\tseller_num++;\n\t\t\t}\n\t\t}\n\t\t//can now create result objects\n\t\t//using titles_str[], prices_str[], and json_sellers[]\n\t\tresults = new Results[titles_str.length];\n\t\tfor (int i = 0; i < titles_str.length; i ++){\n\t\t\tresults[i] = new Results(titles_str[i],prices_str[i],json_sellers[i]);\n\t\t}\n\t\treturn results;\n\t}",
"public void crawl() throws IOException, SAXException {\n\t\tString urlString = \"https://en.wikibooks.org/wiki/Java_Programming\";\n\t\tString OracleString = \"https://docs.oracle.com/javase/tutorial/java/TOC.html\";\n\t\t\n\t\tDocument document = Jsoup.connect(urlString).get();\n\t\tElements qlinks= document.select(\"a[href]\");\n\t\t\n\t\tfor(Element link :qlinks) {\n\t\t\tif(link.equals(\"https:\\\\en.wikibooks.org\\\\wiki\\\\Java_Programming\\\\Print_version\")) continue;\n\t\t \n\t\t\tif(link.attr(\"href\").contains(\"Print_version\") )continue;\n\t\t\tif (link.attr(\"abs:href\").contains(\"wiki/Java_Programming\")) {\n\t\t\t\tthis.crawlwiki(link.attr(\"abs:href\"));\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tthis.crawlOracle(OracleString);\n\n\t}",
"public void torrentScrape() {\n\t\tAlfred.getTorrentScraper().scrape();\n\t}",
"private void parseIndex() throws IOException {\n\t\tDocument doc = Jsoup.connect(WOLFF + \"/bioscopen/cinestar/\").get();\n\t\tElements movies = doc.select(\".table_agenda td[width=245] a\");\n\t\t\n\t\tSet<String> urls = new HashSet<String>();\n\t\tfor(Element movie : movies) {\n\t\t\turls.add(movie.attr(\"href\"));\n\t\t}\n\t\t\n\t\tfor(String url: urls) {\n\t\t\tparseMovie(url);\n\t\t}\n\t}",
"public void extractCollegeDetails() throws Exception {\n\t\t\n\t\tPDDocument pdDoc = PDDocument.load(new File(sourceFilePath));\n\t\tshort fromPage = 44;\n\t\tshort toPage = 336;\n\t\t\n\t\tfor(short i=fromPage;i<toPage;i++){\n\t\t\tif(isSinglePage(i)){\n\t\t\t\tsinglePageStripper.extractRegions(pdDoc.getPage(i));\n\t\t\t\t\n\t\t\t\tString headerDetails = singlePageStripper.getTextForRegion( \"headerDetails_1\" );\n\t\t\t\tString collegeDetails = singlePageStripper.getTextForRegion( \"collegeDetails_1\" );\n\t\t\t\tString branchDetails = singlePageStripper.getTextForRegion( \"branchDetails_1\" );\n\t\t\t\tString hostelDetails = singlePageStripper.getTextForRegion( \"hostelDetails_1\" );\n\t\t\t\t\n\t\t\t\tupdateCollegeDetails(headerDetails, branchDetails, collegeDetails, hostelDetails);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdoublePageStripper.extractRegions(pdDoc.getPage(i));\n\t\t\t\t\n\t\t\t\tString collegeDetails = doublePageStripper.getTextForRegion( \"collegeDetails_1\" );\n\t\t\t\tString branchDetails = doublePageStripper.getTextForRegion( \"branchDetails_1\" );\n\t\t\t\tString hostelDetails = doublePageStripper.getTextForRegion( \"hostelDetails_1\" );\n\t\t\t\tString headerDetails = doublePageStripper.getTextForRegion( \"headerDetails_1\" );\n\t\t\t\t\n\t\t\t\tupdateCollegeDetails(headerDetails, branchDetails, collegeDetails, hostelDetails);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tString collegeDetails_2 = doublePageStripper.getTextForRegion( \"collegeDetails_2\" );\n\t\t\t\tString branchDetails_2 = doublePageStripper.getTextForRegion( \"branchDetails_2\" );\n\t\t\t\tString hostelDetails_2 = doublePageStripper.getTextForRegion( \"hostelDetails_2\" );\n\t\t\t\tString headerDetails_2 = doublePageStripper.getTextForRegion( \"headerDetails_2\" );\n\t\t\t\t\n\t\t\t\tupdateCollegeDetails(headerDetails_2, branchDetails_2, collegeDetails_2, hostelDetails_2);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* System.out.println(\"--------------------headerDetails------------------------------------------------\");\n\t\tSystem.out.println(headerDetails);\n\t\tSystem.out.println(\"--------------------collegeDetails------------------------------------------------\");\n\t\tSystem.out.println(collegeDetails);\n\t\tSystem.out.println(\"---------------------branchDetails-----------------------------------------------\");\n\t\tSystem.out.println(branchDetails);\n\t\tSystem.out.println(\"---------------------hostelDetails-----------------------------------------------\");\n\t\tSystem.out.println(hostelDetails);\n\t\t\n\t\t\n\t\tSystem.out.println(\"--------------------headerDetails_2------------------------------------------------\");\n\t\tSystem.out.println(headerDetails_2);\n\t\tSystem.out.println(\"--------------------collegeDetails_2------------------------------------------------\");\n\t\tSystem.out.println(collegeDetails_2);\n\t\tSystem.out.println(\"---------------------branchDetails_2-----------------------------------------------\");\n\t\tSystem.out.println(branchDetails_2);\n\t\tSystem.out.println(\"---------------------hostelDetails_2-----------------------------------------------\");\n\t\tSystem.out.println(hostelDetails_2);\t\t\n\t\t*/\n\t}",
"public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }",
"private void parseSchedule() throws IOException {\n\n\t\tDocument doc = Jsoup.parse(response.toString());\n\n\t\tElements CourseNames = doc.select(\"span.subhead\");\n\n\t\tDatastore ds = new Datastore(_req, _resp, new ArrayList<String>());\n\n\t\tds.deleteCourses();\n\n\t\tint courseID = 1;\n\t\t\n\t\tint sectionID = 1;\n\n\t\tfor(Element e :CourseNames) {\n\n\t\t\tString[] courseData = new String[11];\n\n\t\t\tString courseName = getName(e.text());\n\n\t\t\tSystem.out.println(courseName);\n\n\t\t\tds.addCourse(courseID+\"\", courseName);\n\n\t\t\tElements tr = e.parent().parent().parent().getElementsByClass(\"body\");\n\n\t\t\tfor(Element t : tr) {\n\n\t\t\t\tif(t.tagName() == \"tr\" && t.hasClass(\"copy\") && !t.attr(\"bgcolor\").equals(\"#666666\") && !t.hasClass(\"bold\")) {\n\n\t\t\t\t\tcourseData[0] = sectionID + \"\";\n\n\t\t\t\t\tcourseData[1] = courseName;\n\n\t\t\t\t\tfor(int i = 2; i <= 9; i++) {\n\n\t\t\t\t\t\tString data = (!t.child(i).html().equals(\" \") ? t.child(i).html() : \"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(i == 8 && _req.getParameter(\"TestInstructor\") != null && data != null && courseID < 7){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tds.addTestInstructor(data, getEmailFromUWM(data), courseData[3]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(i + \" \" + t.child(i).html());\n\n\t\t\t\t\t\tcourseData[i] = data;\n\t\t\t\t\t}\n\n\t\t\t\t\tcourseData[10] = courseID + \"\";\n\n\t\t\t\t\tds.addSection(courseData);\n\n\t\t\t\t\tsectionID++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcourseID++;\n\t\t}\n\t}",
"public Chapter[] getChapters(){\r\n Chapter[] ret = null;\r\n if(chapters != null && !chapters.isEmpty()){\r\n int size = chapters.size();\r\n ret = new Chapter[size];\r\n chapters.copyInto(ret);\r\n }\r\n return ret;\r\n }",
"private void browseBooks() {\n System.out.println(\"Title: Genre||\\n\");\n for (Book b: library.getBooks()) {\n System.out.println(b.getTitle() + \": \" + b.getCategory());\n }\n printInstructions();\n }",
"protected void parseContents(){\r\n\t\tdoc = Jsoup.parse(Jsoup.clean(response, Whitelist.relaxed()));\r\n\t}",
"public String getChapterName() {\n return chapterName;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Cable'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseCable(Cable object) {
return null;
} | [
"public T caseEtherCATCable(EtherCATCable object) {\r\n\t\treturn null;\r\n\t}",
"public T caseBusCable(BusCable object) {\r\n\t\treturn null;\r\n\t}",
"public T caseCancion(Cancion object) {\n\t\treturn null;\n\t}",
"public T caseCompositeSwitchInfo(CompositeSwitchInfo object) {\n\t\treturn null;\n\t}",
"public T caseCabinet(Cabinet object) {\n\t\treturn null;\n\t}",
"public T caseCodeableConcept(CodeableConcept object) {\n\t\treturn null;\n\t}",
"public T caseCSCContainer(CSCContainer object) {\n\t\treturn null;\n\t}",
"public T caseConcierto(Concierto object) {\n\t\treturn null;\n\t}",
"public T caseCoding(Coding object) {\n\t\treturn null;\n\t}",
"public T caseISA(ISA object) {\n\t\treturn null;\n\t}",
"public String getTypeCable() {\n\t\treturn this.typeCable;\n\t}",
"public T caseCard(Card object) {\n\t\treturn null;\n\t}",
"public T caseInputInterface(InputInterface object)\n {\n return null;\n }",
"public T caseCommunication(Communication object) {\n\t\treturn null;\n\t}",
"public T caseConductor(Conductor object) {\n\t\treturn null;\n\t}",
"public T caseIConnectedUnit(IConnectedUnit object) {\r\n\t\treturn null;\r\n\t}",
"public T caseConnectable(IConnectable object) {\r\n return null;\r\n }",
"public T caseBinary(Binary object) {\n\t\treturn null;\n\t}",
"public T caseInterface(Interface object)\n {\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column x$statement_analysis.rows_sent_avg | public void setRows_sent_avg(BigDecimal rows_sent_avg) {
this.rows_sent_avg = rows_sent_avg;
} | [
"public BigDecimal getRows_sent_avg() {\n return rows_sent_avg;\n }",
"public void setRows_examined_avg(BigDecimal rows_examined_avg) {\n this.rows_examined_avg = rows_examined_avg;\n }",
"public void setRows_affected_avg(BigDecimal rows_affected_avg) {\n this.rows_affected_avg = rows_affected_avg;\n }",
"public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }",
"public final void averageValueOfRequest() throws SQLException {\n BigDecimal value = daoRepositoryImpl.averageValueOfRequest();\n LOGGER.info(\"Average value of request: \" + value);\n xmlWriter.writeReportsToXmlFile(\"averageValueOfRequest\",\n new AverageValueOfRequest(value));\n }",
"public BigDecimal getRows_affected_avg() {\n return rows_affected_avg;\n }",
"public void setAvg(double avg)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(AVG$14);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(AVG$14);\r\n }\r\n target.setDoubleValue(avg);\r\n }\r\n }",
"public void setAvgScore(double avgScore) {\r\n\t\tthis.avgScore = avgScore;\r\n\t}",
"public void xsetAvg(org.apache.xmlbeans.XmlDouble avg)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDouble target = null;\r\n target = (org.apache.xmlbeans.XmlDouble)get_store().find_attribute_user(AVG$14);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlDouble)get_store().add_attribute_user(AVG$14);\r\n }\r\n target.set(avg);\r\n }\r\n }",
"private void sentimentAverage(BatchDetectSentimentResult batchDetectSentimentResult) {\n for (BatchDetectSentimentItemResult item : batchDetectSentimentResult.getResultList()) {\n sentimentCarrier.getSentimentAverage().put(\"NEGATIVE\",\n sentimentCarrier.getSentimentAverage().get(\"NEGATIVE\") + item.getSentimentScore().getNegative());\n sentimentCarrier.getSentimentAverage().put(\"POSITIVE\",\n sentimentCarrier.getSentimentAverage().get(\"POSITIVE\") + item.getSentimentScore().getPositive());\n sentimentCarrier.getSentimentAverage().put(\"MIXED\",\n sentimentCarrier.getSentimentAverage().get(\"MIXED\") + item.getSentimentScore().getMixed());\n sentimentCarrier.getSentimentAverage().put(\"NEUTRAL\",\n sentimentCarrier.getSentimentAverage().get(\"NEUTRAL\") + item.getSentimentScore().getNeutral());\n }\n }",
"public void setAvgRating(float avgRating) {\n this.avgRating = avgRating;\n }",
"com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg getAvg();",
"public void setRows_sent(BigDecimal rows_sent) {\n this.rows_sent = rows_sent;\n }",
"public void setAverageScore(BigDecimal averageScore) {\n this.averageScore = averageScore;\n }",
"public void calculateAvgSentiment(){\n double sum = 0.0;\n for (LemmaList ltl: relevantLemmas.values()){\n sum += ltl.getSentiment();\n }\n avgSentiment = sum/relevantLemmas.size();\n }",
"public void setUserCntWeekavg(String userCntWeekavg) {\n\t\tthis.userCntWeekavg = userCntWeekavg;\n\t}",
"public double getAvg()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(AVG$14);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"public void setAveragePageviews(Double averagePageviews) {\r\n this.averagePageviews = averagePageviews;\r\n }",
"public void setAvgSpend(BigDecimal avgSpend) {\n this.avgSpend = avgSpend;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the state of the entry. Caller must hold the mutex of this object. | void setState(EntryState state); | [
"public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }",
"void setEntry (final Entry entry) {\n if (this.entry != null) {\n stopListening ();\n }\n\n final Entry old_entry = this.entry;\n\n this.entry = entry;\n\n if (old_entry == entry) {\n return;\n } else {\n if (old_entry != null) {\n removeFeatureChangeListener (old_entry);\n }\n\n if (entry != null) {\n // the Entry object acts as a proxy for FeatureChange events, other\n // objects can can addFeatureChangeListener () once on the Entry object\n // instead of calling it for every Feature.\n addFeatureChangeListener (getEntry ());\n }\n }\n\n if (this.entry != null) {\n startListening ();\n }\n }",
"public void setSelection(E entry) {\n\t\tint index = indexOf(entry);\n\t\tif (index >= 0) {\n\t\t\t// the element we are looking for is in the spinner\n\t\t\tsetSelection(index);\n\t\t} else {\n\t\t\t// the element is supposed to be still loading\n\t\t\tentryCache = entry;\n\t\t}\n\t}",
"void setEntry(String index, T entry);",
"public abstract void setJposEntry( JposEntry entry ) ;",
"public void setItState(int value) {\n this.itState = value;\n }",
"public void set(String state, Integer index, Element value) {\r\n\t\tif (data.keySet().contains(state))\r\n\t\t\tdata.get(state).set(index, value);\r\n\t}",
"public E set ( int index, E anEntry)\n {\n if (index < 0 || index >= size)\n throw new IndexOutOfBoundsException(Integer.toString(index));\n\n Node<E> node = getNode(index); // calling private method\n E result = node.data;\n node.data = anEntry;\n return result;\n }",
"public void setAppEntry(ApplicationsState.AppEntry entry) {\n mAppEntry = entry;\n }",
"public void setState(Long state) {\n this.state = state;\n }",
"protected void setState(IMAP.IMAPState state)\n {\n __state = state;\n }",
"protected abstract void setEnable(E entry, boolean enable)\n\t\t\tthrows ALEException;",
"public void setState(State newState) {this.state = newState;}",
"protected void setState(ItemState state) {\n this.state = state;\n }",
"public void setLockState(boolean b) {\n if(b = true) {\n System.out.println(\"Hit True\");\n note.setEditable(false);\n lockState = true;\n }\n else {\n System.out.println(\"Hit False\");\n note.setEditable(true);\n super.lockState = false;\n }\n }",
"final protected void setEntityState(int newState)\n {\n state = newState;\n }",
"public void setstate(int a){\r\n state = a;\r\n }",
"public synchronized void setState(ImageState state) {\n LOGGER.info(\"ics.core.Image.setState(): Setting state of image \"\n + uuid.toString() + \" from \" + this.state + \" to \" + state);\n this.state = state;\n }",
"public void setNode(FreeCellState node) {\r\n\t\tkey = node.rawkey();\r\n\r\n\t\t// force repaint.\r\n\t\trepaint();\r\n\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the Location of Node at index | int getLoc(int index) {
boundsCheck(index);
index *= SIZEOF_NODE;
return little2Big(tree.getInt(index));
} | [
"public long getNodeIndex();",
"Location(int index, BTreeNode node) {\n this.index = index;\n this.node = node;\n }",
"private static String findNode(int index){\n return indexTable.get(index);\n }",
"public long getNodeIndex(){\n return nodeIndex;\n }",
"public final int nodeOffset(int nodeIndex) {\r\n\t\treturn nodeIndex << 1;\r\n\t}",
"public Node getAtIndex(int index) {\n \treturn waypoints.get(index);\n }",
"public int getNodeIndexAt(int index)\n {\n if (index < 0 || index > 1)\n {\n throw new IllegalArgumentException();\n }\n \n return this.nodeList[index];\n }",
"public Integer getNodeIdx() {\n return nodeIdx;\n }",
"private Node<T> getNodeAt(int index) {\r\n Node<T> node = firstNode;\r\n for (int i = 0; i < index; i++) {\r\n node = node.getNextNode();\r\n }\r\n return node;\r\n }",
"public int getIndex(int position);",
"private int getCellIndex(Node node) {\r\n return (Integer)node.getProperty(getIndexProperty());\r\n }",
"public String getLocator(Integer index) {\n\n\t\tString relLocator = \".//\";\n\n\t\tif (getBasicLocator().contains(\"[\")) {\n\t\t\trelLocator += getBasicLocator().replace(\"]\", \" and position()=%d ]\");\n\t\t} else {\n\t\t\trelLocator += \"%s[%d]\";\n\t\t}\n\n\t\treturn String.format(relLocator, index);\n\t}",
"public String getLocationOfIndex(int index)\r\n\t{\r\n\t\treturn location.getLocations().get(index);\r\n\t}",
"public Location getLocation(int index){\n return locations.get(index);\n }",
"public Location getLocation(int index) {\n\t\treturn locations.get(index);\n\t}",
"public int getBlockIndex() {\n return mCursorPosition;\n }",
"long getIndex();",
"int getChildIndex();",
"public abstract Node<T> get(int index);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JsMethod__Group__0__Impl" $ANTLR start "rule__JsMethod__Group__1" InternalMyDsl.g:12243:1: rule__JsMethod__Group__1 : rule__JsMethod__Group__1__Impl rule__JsMethod__Group__2 ; | public final void rule__JsMethod__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:12247:1: ( rule__JsMethod__Group__1__Impl rule__JsMethod__Group__2 )
// InternalMyDsl.g:12248:2: rule__JsMethod__Group__1__Impl rule__JsMethod__Group__2
{
pushFollow(FOLLOW_3);
rule__JsMethod__Group__1__Impl();
state._fsp--;
pushFollow(FOLLOW_2);
rule__JsMethod__Group__2();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__JsMethod__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12220:1: ( rule__JsMethod__Group__0__Impl rule__JsMethod__Group__1 )\n // InternalMyDsl.g:12221:2: rule__JsMethod__Group__0__Impl rule__JsMethod__Group__1\n {\n pushFollow(FOLLOW_13);\n rule__JsMethod__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group__1();\n\n state._fsp--;\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 final void rule__JsMethodArgs__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12517:1: ( rule__JsMethodArgs__Group__1__Impl )\n // InternalMyDsl.g:12518:2: rule__JsMethodArgs__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__JsMethodArgs__Group__1__Impl();\n\n state._fsp--;\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 final void rule__Js__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10404:1: ( rule__Js__Group__1__Impl rule__Js__Group__2 )\n // InternalMyDsl.g:10405:2: rule__Js__Group__1__Impl rule__Js__Group__2\n {\n pushFollow(FOLLOW_3);\n rule__Js__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Js__Group__2();\n\n state._fsp--;\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 final void rule__JsMethod__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12463:1: ( rule__JsMethod__Group_6__1__Impl )\n // InternalMyDsl.g:12464:2: rule__JsMethod__Group_6__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group_6__1__Impl();\n\n state._fsp--;\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 final void rule__JsMethod__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12436:1: ( rule__JsMethod__Group_6__0__Impl rule__JsMethod__Group_6__1 )\n // InternalMyDsl.g:12437:2: rule__JsMethod__Group_6__0__Impl rule__JsMethod__Group_6__1\n {\n pushFollow(FOLLOW_77);\n rule__JsMethod__Group_6__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group_6__1();\n\n state._fsp--;\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 final void rule__JsMethodArgs__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12490:1: ( rule__JsMethodArgs__Group__0__Impl rule__JsMethodArgs__Group__1 )\n // InternalMyDsl.g:12491:2: rule__JsMethodArgs__Group__0__Impl rule__JsMethodArgs__Group__1\n {\n pushFollow(FOLLOW_13);\n rule__JsMethodArgs__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsMethodArgs__Group__1();\n\n state._fsp--;\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 final void rule__JsMethod__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12274:1: ( rule__JsMethod__Group__2__Impl rule__JsMethod__Group__3 )\n // InternalMyDsl.g:12275:2: rule__JsMethod__Group__2__Impl rule__JsMethod__Group__3\n {\n pushFollow(FOLLOW_115);\n rule__JsMethod__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group__3();\n\n state._fsp--;\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 final void rule__Js__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10377:1: ( rule__Js__Group__0__Impl rule__Js__Group__1 )\n // InternalMyDsl.g:10378:2: rule__Js__Group__0__Impl rule__Js__Group__1\n {\n pushFollow(FOLLOW_13);\n rule__Js__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Js__Group__1();\n\n state._fsp--;\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 final void rule__JsMethod__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12394:1: ( ( ( rule__JsMethod__Group_6__0 )? ) )\n // InternalMyDsl.g:12395:1: ( ( rule__JsMethod__Group_6__0 )? )\n {\n // InternalMyDsl.g:12395:1: ( ( rule__JsMethod__Group_6__0 )? )\n // InternalMyDsl.g:12396:2: ( rule__JsMethod__Group_6__0 )?\n {\n before(grammarAccess.getJsMethodAccess().getGroup_6()); \n // InternalMyDsl.g:12397:2: ( rule__JsMethod__Group_6__0 )?\n int alt78=2;\n int LA78_0 = input.LA(1);\n\n if ( (LA78_0==129) ) {\n alt78=1;\n }\n switch (alt78) {\n case 1 :\n // InternalMyDsl.g:12397:3: rule__JsMethod__Group_6__0\n {\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group_6__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getJsMethodAccess().getGroup_6()); \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 final void rule__JsModule__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12085:1: ( rule__JsModule__Group__1__Impl rule__JsModule__Group__2 )\n // InternalMyDsl.g:12086:2: rule__JsModule__Group__1__Impl rule__JsModule__Group__2\n {\n pushFollow(FOLLOW_3);\n rule__JsModule__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsModule__Group__2();\n\n state._fsp--;\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 final void rule__JsMethod__Group__7() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12409:1: ( rule__JsMethod__Group__7__Impl )\n // InternalMyDsl.g:12410:2: rule__JsMethod__Group__7__Impl\n {\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group__7__Impl();\n\n state._fsp--;\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 final void rule__Method__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:13371:1: ( rule__Method__Group__1__Impl rule__Method__Group__2 )\n // InternalDsl.g:13372:2: rule__Method__Group__1__Impl rule__Method__Group__2\n {\n pushFollow(FOLLOW_4);\n rule__Method__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Method__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__JsMethod__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12382:1: ( rule__JsMethod__Group__6__Impl rule__JsMethod__Group__7 )\n // InternalMyDsl.g:12383:2: rule__JsMethod__Group__6__Impl rule__JsMethod__Group__7\n {\n pushFollow(FOLLOW_117);\n rule__JsMethod__Group__6__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group__7();\n\n state._fsp--;\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 final void rule__JavaCode__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:26034:1: ( rule__JavaCode__Group__1__Impl )\n // InternalDsl.g:26035:2: rule__JavaCode__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__JavaCode__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__JsMethod__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12301:1: ( rule__JsMethod__Group__3__Impl rule__JsMethod__Group__4 )\n // InternalMyDsl.g:12302:2: rule__JsMethod__Group__3__Impl rule__JsMethod__Group__4\n {\n pushFollow(FOLLOW_116);\n rule__JsMethod__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group__4();\n\n state._fsp--;\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 final void rule__JsModule__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12058:1: ( rule__JsModule__Group__0__Impl rule__JsModule__Group__1 )\n // InternalMyDsl.g:12059:2: rule__JsModule__Group__0__Impl rule__JsModule__Group__1\n {\n pushFollow(FOLLOW_13);\n rule__JsModule__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__JsModule__Group__1();\n\n state._fsp--;\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 final void rule__Json__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10566:1: ( rule__Json__Group__1__Impl rule__Json__Group__2 )\n // InternalMyDsl.g:10567:2: rule__Json__Group__1__Impl rule__Json__Group__2\n {\n pushFollow(FOLLOW_3);\n rule__Json__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Json__Group__2();\n\n state._fsp--;\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 final void ruleJsMethod() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:1591:2: ( ( ( rule__JsMethod__Group__0 ) ) )\n // InternalMyDsl.g:1592:2: ( ( rule__JsMethod__Group__0 ) )\n {\n // InternalMyDsl.g:1592:2: ( ( rule__JsMethod__Group__0 ) )\n // InternalMyDsl.g:1593:3: ( rule__JsMethod__Group__0 )\n {\n before(grammarAccess.getJsMethodAccess().getGroup()); \n // InternalMyDsl.g:1594:3: ( rule__JsMethod__Group__0 )\n // InternalMyDsl.g:1594:4: rule__JsMethod__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__JsMethod__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getJsMethodAccess().getGroup()); \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 final void rule__MethodDecl__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:4595:1: ( rule__MethodDecl__Group__1__Impl rule__MethodDecl__Group__2 )\r\n // InternalGo.g:4596:2: rule__MethodDecl__Group__1__Impl rule__MethodDecl__Group__2\r\n {\r\n pushFollow(FOLLOW_9);\r\n rule__MethodDecl__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__MethodDecl__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XSetLiteral__Group__4" $ANTLR start "rule__XSetLiteral__Group__4__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7254:1: rule__XSetLiteral__Group__4__Impl : ( '}' ) ; | public final void rule__XSetLiteral__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7258:1: ( ( '}' ) )
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7259:1: ( '}' )
{
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7259:1: ( '}' )
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7260:1: '}'
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4());
}
match(input,56,FOLLOW_56_in_rule__XSetLiteral__Group__4__Impl14967); if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XSetLiteral__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8864:1: ( ( '}' ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8865:1: ( '}' )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8865:1: ( '}' )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8866:1: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4()); \n }\n match(input,49,FOLLOW_49_in_rule__XSetLiteral__Group__4__Impl18221); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4()); \n }\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 final void rule__XSetLiteral__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7247:1: ( rule__XSetLiteral__Group__4__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7248:2: rule__XSetLiteral__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4__Impl_in_rule__XSetLiteral__Group__414939);\n rule__XSetLiteral__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8853:1: ( rule__XSetLiteral__Group__4__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8854:2: rule__XSetLiteral__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4__Impl_in_rule__XSetLiteral__Group__418193);\n rule__XSetLiteral__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7967:1: ( ( '}' ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7968:1: ( '}' )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7968:1: ( '}' )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7969:1: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4()); \n }\n match(input,50,FOLLOW_50_in_rule__XSetLiteral__Group__4__Impl16408); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4()); \n }\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 final void rule__XSetLiteral__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7956:1: ( rule__XSetLiteral__Group__4__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7957:2: rule__XSetLiteral__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4__Impl_in_rule__XSetLiteral__Group__416380);\n rule__XSetLiteral__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8966:1: ( ( '}' ) )\r\n // InternalDroneScript.g:8967:1: ( '}' )\r\n {\r\n // InternalDroneScript.g:8967:1: ( '}' )\r\n // InternalDroneScript.g:8968:2: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4()); \r\n }\r\n match(input,59,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XSetLiteral__Group__4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8955:1: ( rule__XSetLiteral__Group__4__Impl )\r\n // InternalDroneScript.g:8956:2: rule__XSetLiteral__Group__4__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XSetLiteral__Group__4__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XSetLiteral__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7218:1: ( rule__XSetLiteral__Group__3__Impl rule__XSetLiteral__Group__4 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7219:2: rule__XSetLiteral__Group__3__Impl rule__XSetLiteral__Group__4\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__3__Impl_in_rule__XSetLiteral__Group__314878);\n rule__XSetLiteral__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4_in_rule__XSetLiteral__Group__314881);\n rule__XSetLiteral__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group_3_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7379:1: ( rule__XSetLiteral__Group_3_1__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7380:2: rule__XSetLiteral__Group_3_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group_3_1__1__Impl_in_rule__XSetLiteral__Group_3_1__115192);\n rule__XSetLiteral__Group_3_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8824:1: ( rule__XSetLiteral__Group__3__Impl rule__XSetLiteral__Group__4 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8825:2: rule__XSetLiteral__Group__3__Impl rule__XSetLiteral__Group__4\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__3__Impl_in_rule__XSetLiteral__Group__318132);\n rule__XSetLiteral__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4_in_rule__XSetLiteral__Group__318135);\n rule__XSetLiteral__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7168:1: ( ( '#' ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7169:1: ( '#' )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7169:1: ( '#' )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7170:1: '#'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getNumberSignKeyword_1()); \n }\n match(input,54,FOLLOW_54_in_rule__XSetLiteral__Group__1__Impl14785); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getNumberSignKeyword_1()); \n }\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 final void rule__XSetLiteral__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8743:1: ( ( () ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8744:1: ( () )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8744:1: ( () )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8745:1: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getXSetLiteralAction_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8746:1: ()\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8748:1: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getXSetLiteralAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XSetLiteral__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7316:1: ( rule__XSetLiteral__Group_3__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7317:2: rule__XSetLiteral__Group_3__1__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group_3__1__Impl_in_rule__XSetLiteral__Group_3__115068);\n rule__XSetLiteral__Group_3__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7137:1: ( ( () ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7138:1: ( () )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7138:1: ( () )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7139:1: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getXSetLiteralAction_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7140:1: ()\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7142:1: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getXSetLiteralAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XSetLiteral__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7230:1: ( ( ( rule__XSetLiteral__Group_3__0 )? ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7231:1: ( ( rule__XSetLiteral__Group_3__0 )? )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7231:1: ( ( rule__XSetLiteral__Group_3__0 )? )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7232:1: ( rule__XSetLiteral__Group_3__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getGroup_3()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7233:1: ( rule__XSetLiteral__Group_3__0 )?\n int alt57=2;\n int LA57_0 = input.LA(1);\n\n if ( ((LA57_0>=RULE_ID && LA57_0<=RULE_STRING)||LA57_0==25||(LA57_0>=33 && LA57_0<=34)||LA57_0==39||(LA57_0>=42 && LA57_0<=47)||(LA57_0>=54 && LA57_0<=55)||LA57_0==57||(LA57_0>=60 && LA57_0<=61)||LA57_0==63||(LA57_0>=67 && LA57_0<=75)||LA57_0==84) ) {\n alt57=1;\n }\n switch (alt57) {\n case 1 :\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7233:2: rule__XSetLiteral__Group_3__0\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group_3__0_in_rule__XSetLiteral__Group__3__Impl14908);\n rule__XSetLiteral__Group_3__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getGroup_3()); \n }\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 final void rule__XSetLiteral__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7125:1: ( rule__XSetLiteral__Group__0__Impl rule__XSetLiteral__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7126:2: rule__XSetLiteral__Group__0__Impl rule__XSetLiteral__Group__1\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__0__Impl_in_rule__XSetLiteral__Group__014693);\n rule__XSetLiteral__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XSetLiteral__Group__1_in_rule__XSetLiteral__Group__014696);\n rule__XSetLiteral__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\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 final void rule__XSetLiteral__Group_3__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7327:1: ( ( ( rule__XSetLiteral__Group_3_1__0 )* ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7328:1: ( ( rule__XSetLiteral__Group_3_1__0 )* )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7328:1: ( ( rule__XSetLiteral__Group_3_1__0 )* )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7329:1: ( rule__XSetLiteral__Group_3_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getGroup_3_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7330:1: ( rule__XSetLiteral__Group_3_1__0 )*\n loop58:\n do {\n int alt58=2;\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==52) ) {\n alt58=1;\n }\n\n\n switch (alt58) {\n \tcase 1 :\n \t // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7330:2: rule__XSetLiteral__Group_3_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XSetLiteral__Group_3_1__0_in_rule__XSetLiteral__Group_3__1__Impl15095);\n \t rule__XSetLiteral__Group_3_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop58;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getGroup_3_1()); \n }\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 final void ruleXSetLiteral() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:864:2: ( ( ( rule__XSetLiteral__Group__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:865:1: ( ( rule__XSetLiteral__Group__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:865:1: ( ( rule__XSetLiteral__Group__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:866:1: ( rule__XSetLiteral__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSetLiteralAccess().getGroup()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:867:1: ( rule__XSetLiteral__Group__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:867:2: rule__XSetLiteral__Group__0\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__0_in_ruleXSetLiteral1785);\n rule__XSetLiteral__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSetLiteralAccess().getGroup()); \n }\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 final void rule__XSetLiteral__Group_3_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8985:1: ( rule__XSetLiteral__Group_3_1__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8986:2: rule__XSetLiteral__Group_3_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group_3_1__1__Impl_in_rule__XSetLiteral__Group_3_1__118446);\n rule__XSetLiteral__Group_3_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getOrderedTestNamesByOrderingFacilityAndTest for a given Reporting facility and Ordered Test, sends a collection of SRTLabTestDT This collection will have one DT | private Collection<Object> getOrderedTestNamesByOrderingFacilityAndTest(String
orderingFacility, String orderedTest) {
ArrayList<Object> dtList = null;
ArrayList<Object> returnList = null;
if(cachedFacilityList != null)
{
dtList = (ArrayList<Object> ) cachedFacilityList.get(orderingFacility);
if(dtList != null)
{
Iterator<Object> it = dtList.iterator();
SRTLabTestDT srtLabTestDT = null;
while (it.hasNext()) {
srtLabTestDT = (SRTLabTestDT) it.next();
if ( (srtLabTestDT.getLabTestCd()).equalsIgnoreCase(orderedTest)) {
returnList = new ArrayList<Object> ();
returnList.add(srtLabTestDT);
break;
}
}
}
}
return returnList;
} | [
"private Collection<Object> getOrderedTestNamesByOrderingFacility(String labCLIAid)\n{\n ArrayList<Object> dtList = null;\n if(cachedFacilityList != null)\n dtList = (ArrayList<Object> )cachedFacilityList.get(labCLIAid);\n return dtList;\n\n }",
"public Collection<Object> getOrderedTestNames(Map<String,String> filter) throws\n NEDSSSystemException , InvalidSRTFilterKeysException {\n\n\n\n ArrayList<Object> returnSet = null;\n String programArea = null;\n String condition = null;\n String orderingFacility = null;\n String orderedTest = null;\n\n programArea = (String) filter.get(SRTFilterKeys.PROGRAM_AREA_CODE);\n condition = (String) filter.get(SRTFilterKeys.CONDITION_CODE);\n orderingFacility = (String) filter.get(SRTFilterKeys.REPORTING_FACILITY_ID);\n orderedTest = (String) filter.get(SRTFilterKeys.ORDERED_TEST_CODE);\n\n if (filter.size() == 1) {\n if (orderingFacility != null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacility(orderingFacility);\n else {\n throw new InvalidSRTFilterKeysException(\"Invalid Filter Key Exception\");\n\n }\n }\n else\n {\n if (programArea != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByPA(programArea, orderingFacility);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByPA(programArea, \"DEFAULT\");\n }\n\n else if (condition != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByCondition(condition, orderingFacility);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByCondition(condition, \"DEFAULT\");\n }\n\n else if(orderedTest != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacilityAndTest(orderingFacility, orderedTest);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacilityAndTest(\"DEFAULT\",orderedTest);\n }\n else\n throw new NEDSSSystemException(\"Invalid Filter Key Exception\");\n\n }\n\n if (returnSet == null)\n return getOrderedTestNamesByOrderingFacility(\"DEFAULT\");\n else\n return returnSet;\n}",
"private Collection<Object> getOrderedTestNamesByCondition(String condition,String labId)\n {\n ArrayList<Object> dtList = null;\n HashMap<Object,Object> ofMap = null;\n if(cachedConditionCdFacilityList != null)\n {\n ofMap = (HashMap<Object,Object>) cachedConditionCdFacilityList.get(condition);\n\n if (ofMap != null)\n dtList = (ArrayList<Object> ) ofMap.get(labId);\n\n }\n return dtList;\n }",
"private Collection<Object> getOrderedTestNamesByPA(String programArea,String labId)\n{\n\n ArrayList<Object> dtList = null;\n HashMap<Object,Object> ofMap = null;\n\n if(cachedProgAreaFacilityList != null)\n {\n ofMap = (HashMap<Object,Object>) cachedProgAreaFacilityList.get(programArea);\n\n if (ofMap != null)\n dtList = (ArrayList<Object> ) ofMap.get(labId);\n }\n return dtList;\n}",
"private ArrayList<Object> getOrderedTestCollection() {\n\n if (cachedLabTest != null) {\n return cachedLabTest;\n }\n //loads cachedLabTest\n loadCachedLabTestCollection();\n\n String mapFlag = propertyUtil.getSRTFilterProperty(NEDSSConstants.LABTEST_PROGAREA_MAPPING);\n if(mapFlag != null && mapFlag.equalsIgnoreCase(NEDSSConstants.YES))\n {\n\n cachedProgAreaFacilityList = new HashMap<Object,Object>();\n cachedConditionCdFacilityList = new HashMap<Object,Object>();\n\n SRTOrderedTestDAOImpl dao = new SRTOrderedTestDAOImpl();\n\n String labId = null;\n String programArea = null;\n String conditionCd = null;\n Collection<Object> ltMap = (ArrayList<Object> ) dao.getLabTestProgAreaMapping();\n\n if (ltMap != null) {\n Iterator<Object> it = ltMap.iterator();\n int size = ltMap.size();\n SRTLabTestDT labDt = null;\n while (it.hasNext()) {\n\n TestResultTestFilterDT testResults = (TestResultTestFilterDT) it.next();\n labDt = convertToSRTLabTestDT(testResults);\n labId = testResults.getLaboratoryId();\n programArea = testResults.getProgAreaCd();\n conditionCd = testResults.getConditionCd();\n\n if (programArea != null && labId != null) {\n addToCachedProgAreaList(programArea, labId, labDt);\n }\n if (conditionCd != null && labId != null) {\n addToCachedConditionCdList(conditionCd, labId, labDt);\n }\n }\n }\n }\n\n return cachedLabTest;\n }",
"private void fetchTests() {\n List<Test> allTests = mDb.testDao().getAll();\r\n for (Test test : allTests){\r\n tests.add(String.format(Locale.getDefault(),\" %s \\n Test ID: %d\",\r\n mDb.patientDao().getPatientName(test.getPatientId()), // patient full name\r\n test.getTestId()));\r\n }\r\n }",
"@Test\n public void testGetFlightPathAnalisysResultsGroupedByAircraftType() {\n System.out.println(\"getFlightPathAnalisysResultsGroupedByAircraftType\");\n String aircrafType = \"A380\";\n ExportCSVController instance = this.instance;\n List<String> expResult = new LinkedList<>();\n List<String> result = instance.getFlightPathAnalisysResultsGroupedByAircraftType(aircrafType);\n assertEquals(expResult, result);\n \n }",
"@NotNull\n private List<OpaTestCase> getTestsInExecutionOrder() {\n // We're using LinkedHashMap to preserve insertion order\n LinkedHashMap<String, List<OpaTestCase>> groupedTests = opaTestCases.stream()\n .collect(Collectors.groupingBy(OpaTestCase::getName, LinkedHashMap::new, Collectors.toList()));\n groupedTests.values().forEach(Collections::reverse);\n return groupedTests.values().stream().flatMap(List::stream).collect(Collectors.toList());\n }",
"public HashMap<String, Object> sendListFacilityNames(){\n\t\tHashMap<String, Object> request = new HashMap<String, Object>();\n\t\trequest.put(\"service_type\", Constants.LIST_FACILITY);\n\t\t\n\t\treturn this.sendRequest(request);\n\t}",
"@Test\n public void testGetListOfAircraftTypes() {\n System.out.println(\"getListOfAircraftTypes\");\n AircraftModel acModel = new AircraftModel();\n acModel.setId(\"PASSENGER\");\n Simulation sim = new Simulation();\n sim.getFlightPlan().getAircraft().setAircraftModel(acModel);\n p.getSimulationsList().getSimulationsList().add(sim);\n this.instance = new ExportCSVController(p);\n ExportCSVController instance = this.instance;\n \n List<String> expResult = new LinkedList<>();\n expResult.add(acModel.getId());\n List<String> result = instance.getListOfAircraftTypes();\n assertEquals(expResult, result);\n \n }",
"private void loadCachedLabTestCollection()\n {\n cachedFacilityList = new HashMap<Object,Object>();\n SRTOrderedTestDAOImpl dao = new SRTOrderedTestDAOImpl();\n cachedLabTest= (ArrayList<Object> ) convertToSRTLabTestDT(dao.getAllOrderedTests());\n\n //load cachedFacilityList\n Iterator<Object> iter = cachedLabTest.iterator();\n while(iter.hasNext()){\n SRTLabTestDT srtLabTestDT = (SRTLabTestDT)iter.next();\n if(srtLabTestDT.getLaboratoryId()!= null ){\n this.addToCachedFacilityList(srtLabTestDT.getLaboratoryId(),srtLabTestDT);\n }// end if labId !=null\n }//end while\n\n }",
"public void getSortingDet(TestInterviewReport testInt) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tObject[] code = new Object[1];\r\n\t\tcode[0] = testInt.getSchdReqCode();\r\n\t\r\n\t\t\tString sortQuery = \"SELECT SORT_BY,SORT_BY_ORDER,SORT_THENBY,SORT_THENBY_ORDER,SORT_THENBY1,SORT_THENBY1_ORDER FROM HRMS_REC_SCHDREP_SORT\"\r\n\t\t\t\t+ \" WHERE SCHDREP_CODE=\" + testInt.getSchdReqCode();\r\n\t\tObject[][] sorting = getSqlModel().getSingleResult(sortQuery);\r\n\t\tif (sorting != null && sorting.length > 0) {\r\n\t\t\ttestInt.setSortBy(checkNull(String.valueOf(sorting[0][0])));\r\n\t\t\tif (String.valueOf(sorting[0][1]).trim().equals(\"A\")) {\r\n\t\t\t\ttestInt.setSortRadio(\"A\");\r\n\t\t\t\ttestInt.setRadioOne(\"A\");\r\n\t\t\t} else if (String.valueOf(sorting[0][1]).trim().equals(\"D\")) {\r\n\t\t\t\ttestInt.setSortRadio(\"D\");\r\n\t\t\t\ttestInt.setRadioOne(\"D\");\r\n\t\t\t}\r\n\t\t\ttestInt.setThenBY(checkNull(String.valueOf(sorting[0][2])));\r\n\t\t\tif (String.valueOf(sorting[0][3]).trim().equals(\"A\")) {\r\n\t\t\t\ttestInt.setThenRadio(\"A\");\r\n\t\t\t\ttestInt.setRadioTwo(\"A\");\r\n\t\t\t} else if (String.valueOf(sorting[0][3]).trim().equals(\"D\")) {\r\n\t\t\t\ttestInt.setThenRadio(\"D\");\r\n\t\t\t\ttestInt.setRadioTwo(\"D\");\r\n\t\t\t}\r\n\t\t\ttestInt.setSecondBy(checkNull(String.valueOf(sorting[0][4])));\r\n\t\t\tif (String.valueOf(sorting[0][5]).trim().equals(\"A\")) {\r\n\t\t\t\ttestInt.setThanRadio(\"A\");\r\n\t\t\t\ttestInt.setRadioThree(\"A\");\r\n\t\t\t} else if (String.valueOf(sorting[0][5]).trim().equals(\"D\")) {\r\n\t\t\t\ttestInt.setThanRadio(\"D\");\r\n\t\t\t\ttestInt.setRadioThree(\"D\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\ttestInt.setButtonFlag(true);\r\n\t\t}\r\n\r\n\t}",
"public void testInOrderDFT() {\n }",
"public ArrayList<Test> getTests() {\n String testQuery = \"SELECT * FROM test ORDER BY Name\";\n ArrayList<Test> tests = new ArrayList<>();\n try {\n PreparedStatement stmt = mConnection.prepareStatement(testQuery);\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n tests.add(new Test(rs.getInt(\"TestID\"),\n rs.getString(\"Name\"),\n rs.getString(\"Settings\")));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return tests;\n }",
"@Test\n public void sortByTraderWhereFromTYUT() {\n transactionList.stream().map(Transaction::getTrade)\n .filter(i -> i.getCity().equals(\"ε€ͺεηε·₯ε€§ε¦\"))\n .distinct()\n .sorted(Comparator.comparing(Trader::getName))\n .forEach(System.out::println);\n }",
"public ArrayList<String> populateSectionGroupsName(String from, String to){ \r\n\tConnection con=null;\r\n\r\n\tArrayList<String> testNameList=new ArrayList<String>();\r\n\r\ntry {\r\n\t\r\n con = Connect.prepareConnection();\r\n con.setAutoCommit(false);\r\n \r\n ResultSet rs=null;\r\n\r\n PreparedStatement ps = null;\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\"); \r\n\t\r\n\tjava.util.Date fromdate = sdf.parse(from); \r\n\tjava.sql.Timestamp timeobj1 = new java.sql.Timestamp(fromdate.getTime()); \r\n\t\r\n\tjava.util.Date todate = sdf.parse(to); \r\n\tjava.sql.Timestamp timeobj2 = new java.sql.Timestamp(todate.getTime()); \r\n\t\r\n ps = con.prepareStatement(\r\n \"SELECT t.Test_name, t.TestId FROM testheader t where Test_status=? AND sheet_format=? AND Conduct_date BETWEEN ? AND ? AND t.TestId Not IN (Select distinct TestId from correctans where group_code not in (select distinct(group_code) from group_table)) order by Test_name\");\r\n ps.setString(1, message.getString(\"TestReady\"));\r\n ps.setString(2, \"GRC\");\r\n ps.setTimestamp(3, timeobj1);\r\n ps.setTimestamp(4, timeobj2);\r\n \r\n rs = ps.executeQuery();\r\n \r\n \t while(rs.next()){\r\n \t\t testNameList.add(rs.getString(1));\r\n }\r\n con.commit();\r\n }\r\n catch(Exception e){\r\n \tlog.error(\"Error in retrieving testname for link groups to section \" + e);\r\n }\r\n finally{\r\n \tConnect.freeConnection(con);\r\n }\r\n \treturn testNameList;\r\n}",
"@Test\n public void customertest4()\n {\n ArrayList<String> needsInString = new ArrayList<String>();\n \n for(Need needs : listneeds)\n {\n needsInString.add(needs.getNeedName());\n }\n \n assertEquals(cust.getList(), needsInString);\n }",
"@Test\r\n\tpublic void testSortingCriteria() {\r\n\r\n\t\tCountry hungary = testMock.get(\"Hungary\");\r\n\t\tCountry sweden = testMock.get(\"Sweden\");\r\n\t\tCountry denmark = testMock.get(\"Denmark\");\r\n\r\n\t\tList<Country> testListOfCountries = new ArrayList<Country>();\r\n\t\ttestListOfCountries.add(hungary);\r\n\t\ttestListOfCountries.add(sweden);\r\n\t\ttestListOfCountries.add(denmark);\r\n\r\n\t\tList<Country> ccHigh = vCtrl.getHighestStdVAT(jvData, 3, \"current\", \"AZ\");\r\n\t\tassertEquals(testListOfCountries, ccHigh);\r\n\t}",
"public ArrayList<String> populateNameListProcess(String from, String to){\r\n\tConnection con=null;\r\n\t\tArrayList<String> testNameList=new ArrayList<String>();\r\n\t\r\n\ttry {\r\n\t\t\r\n con = Connect.prepareConnection();\r\n con.setAutoCommit(false);\r\n ResultSet rs=null;\r\n\r\n PreparedStatement ps = null;\r\n \r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\"); \r\n\t\t\r\n\t\tjava.util.Date fromdate = sdf.parse(from); \r\n\t\tjava.sql.Timestamp timest = new java.sql.Timestamp(fromdate.getTime()); \r\n\t\t\r\n\t\tjava.util.Date todate = sdf.parse(to); \r\n\t\tjava.sql.Timestamp timeen = new java.sql.Timestamp(todate.getTime()); \r\n\t\t\r\n\t\t\r\n ps = con.prepareStatement(\r\n \"select distinct t.Test_name from testheader t where t.upload_status=? AND (t.Test_Status=? OR t.Test_Status=?) AND (t.TestId IN (Select distinct TestId from correctans))AND t.Conduct_Date<=now() AND t.Conduct_date BETWEEN ? AND ? order by Test_name\");\r\n ps.setString(1, message.getString(\"sheetsUploaded\"));\r\n ps.setString(2, message.getString(\"processingStart\"));\r\n ps.setString(3, message.getString(\"TestReady\"));\r\n ps.setTimestamp(4, timest);\r\n ps.setTimestamp(5, timeen);\r\n \r\n rs = ps.executeQuery();\r\n \r\n \t while(rs.next()){\r\n \t\t log.info(\"Test names in Process Sheet interface \"+rs.getString(1));\r\n \t\t testNameList.add(rs.getString(1));\r\n }\r\n \r\n \t con.commit();\r\n \t \r\n }\r\n catch(Exception e){\r\n \tlog.error(\"Error in retrieving test names for process sheet interface\" + e);\r\n }\r\n finally{\r\n \tConnect.freeConnection(con);\r\n }\r\n \treturn testNameList;\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check that video capture file is not present in result if not requested | @Test(groups={"it"})
public void testReportContainsNoVideoCapture() throws Exception {
try {
System.setProperty(SeleniumTestsContext.VIDEO_CAPTURE, "false");
executeSubTest(1, new String[] {"com.seleniumtests.it.stubclasses.StubTestClassForDriverTest"}, ParallelMode.METHODS, new String[] {"testDriver"});
// read 'testDriver' report. This contains calls to HtmlElement actions
String detailedReportContent1 = readTestMethodResultFile("testDriver");
Assert.assertFalse(detailedReportContent1.contains("Video capture: <a href='videoCapture.avi'>file</a>"));
// check shortcut to video is NOT present in detailed report
Assert.assertFalse(detailedReportContent1.matches(".*<th>Last State</th><td><a href=\"screenshots/testDriver_8-1_Test_end--\\w+.png\"><i class=\"fas fa-file-image\" aria-hidden=\"true\"></i></a><a href=\"videoCapture.avi\"><i class=\"fas fa-video\" aria-hidden=\"true\"></i></a></td>.*"));
// check shortcut to video is NOT present in summary report
String mainReportContent = readSummaryFile();
Assert.assertFalse(mainReportContent.matches(".*<td class=\"info\"><a href=\"testDriver/screenshots/testDriver_8-1_Test_end--\\w+.png\"><i class=\"fas fa-file-image\" aria-hidden=\"true\"></i></a><a href=\"testDriver/videoCapture.avi\"><i class=\"fas fa-video\" aria-hidden=\"true\"></i></a></td>.*"));
} finally {
System.clearProperty(SeleniumTestsContext.VIDEO_CAPTURE);
}
} | [
"public boolean hasVideo();",
"boolean isVideoSupported();",
"public boolean isVideo()\n {return false;\n }",
"public boolean hasVideo() {\n\t\treturn this.recordingProperties.hasVideo();\n\t}",
"public boolean hasVideo() {\n\treturn video != null;\n }",
"@OnClick(R.id.iv_video)\n void pickVideo() {\n if (checkPermission()) {\n if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT)) {\n Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);\n\n File mediaFile = new File(\n Environment.getExternalStorageDirectory().getAbsolutePath() + \"/video.mp4\");\n\n videoUri = Uri.fromFile(mediaFile);\n\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);\n intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 60);\n\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Environment.getExternalStorageDirectory().getPath() + \"videocapture_example.mp4\");\n startActivityForResult(intent, 200);\n } else {\n Toast.makeText(this, getResources().getString(R.string.no_camera), Toast.LENGTH_LONG).show();\n }\n }\n// @Override\n// protected void onActivityResult ( int requestCode, int resultCode, @Nullable Intent data){\n// super.onActivityResult(requestCode, resultCode, data);\n// if (resultCode == Activity.RESULT_OK\n// && requestCode == SandriosCamera.RESULT_CODE\n// && data != null) {\n// if (data.getSerializableExtra(SandriosCamera.MEDIA) instanceof Media) {\n// Media media = (Media) data.getSerializableExtra(SandriosCamera.MEDIA);\n//\n// Log.e(\"File\", \"\" + media.getPath());\n// Log.e(\"Type\", \"\" + media.getType());\n// Toast.makeText(getApplicationContext(), \"Media captured.\", Toast.LENGTH_SHORT).show();\n// }\n// }\n// }\n\n }",
"private boolean extractDurationAndBitrateFromVideoFileUsingAvprobe(\n String deviceFileName, Map<String, String> results)\n throws DeviceNotAvailableException, ParseException {\n CLog.i(\"Check if the recorded file has some data in it: \" + deviceFileName);\n IFileEntry video = getDevice().getFileEntry(deviceFileName);\n if (video == null || video.getFileEntry().getSizeValue() < 1) {\n mTestRunHelper.reportFailure(\"Video Entry info failed\");\n return false;\n }\n\n final File recordedVideo = getDevice().pullFile(deviceFileName);\n CLog.i(\"Recorded video file: \" + recordedVideo.getAbsolutePath());\n\n CommandResult result =\n RunUtil.getDefault()\n .runTimedCmd(\n CMD_TIMEOUT_MS,\n AVPROBE_STR,\n \"-loglevel\",\n \"info\",\n recordedVideo.getAbsolutePath());\n\n // Remove file from host machine\n FileUtil.deleteFile(recordedVideo);\n\n if (result.getStatus() != CommandStatus.SUCCESS) {\n mTestRunHelper.reportFailure(AVPROBE_STR + \" command failed\");\n return false;\n }\n\n String data = result.getStderr();\n CLog.i(\"data: \" + data);\n if (data == null || data.isEmpty()) {\n mTestRunHelper.reportFailure(AVPROBE_STR + \" output data is empty\");\n return false;\n }\n\n Matcher m = Pattern.compile(REGEX_IS_VIDEO_OK).matcher(data);\n if (!m.find()) {\n final String errMsg =\n \"Video verification failed; no matching verification pattern found\";\n mTestRunHelper.reportFailure(errMsg);\n return false;\n }\n\n String duration = m.group(1);\n long durationInMilliseconds = convertDurationToMilliseconds(duration);\n String bitrate = m.group(2);\n long bitrateInKilobits = convertBitrateToKilobits(bitrate);\n\n results.put(RESULT_KEY_VERIFIED_DURATION, Long.toString(durationInMilliseconds / 1000));\n results.put(RESULT_KEY_VERIFIED_BITRATE, Long.toString(bitrateInKilobits));\n return true;\n }",
"public boolean videoCaptureEnabled();",
"boolean hasCompressVideo();",
"public boolean videoSupported();",
"boolean isVideoEnabled();",
"private void captureVideo(String videoName) {\n Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);\n\n // Uri videoUri = Uri.fromFile(mediaFile);\n Uri videoUri = FileProvider.getUriForFile(mActivity, mActivity.getPackageName() + \".provider\", getOutputMediaFile(MEDIA_TYPE_VIDEO));\n capVidUri = videoUri;\n intent.putExtra(MediaStore.EXTRA_OUTPUT, videoUri);\n intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 10);\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); //0 lower quality 1 higher quality\n\n if (ActivityCompat.checkSelfPermission(mActivity, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(mActivity, R.string.camera_permission_required, Toast.LENGTH_SHORT).show();\n\n ActivityCompat.requestPermissions(mActivity, new String[]{Manifest.permission.CAMERA}, 1);\n\n return;\n } else {\n\n startActivityForResult(intent, VIDEO_CAPTURE);\n }\n\n }",
"private boolean mediaFilesExistOnDevice(ITestDevice device, Dimension mvpr)\n throws DeviceNotAvailableException{\n int resIndex = RES_176_144;\n while (resIndex <= RES_1920_1080) {\n Dimension copiedResolution = resolutions[resIndex];\n if (copiedResolution.width > mvpr.width || copiedResolution.height > mvpr.height) {\n break; // we don't need to check for resolutions greater than or equal to this\n }\n String deviceShortFilePath = getDeviceShortDir(device, copiedResolution);\n String deviceFullFilePath = getDeviceFullDir(device, copiedResolution);\n if (!device.doesFileExist(deviceShortFilePath) ||\n !device.doesFileExist(deviceFullFilePath)) {\n // media files of valid resolution not found on the device, and must be pushed\n return false;\n }\n resIndex++;\n }\n return true;\n }",
"@Override\n public void cameraNotFound() {\n\n }",
"private boolean isVideoExists(GetMethod aGetMethod) {\n\t\t/* This already called while this class is instantiated\n\t\tif (mHttpClient == null) {\n\t\t\tmHttpClient = prepareHttpClient();\n\t\t}*/\n try {\n \tint r = mHttpClient.executeMethod(aGetMethod);\n \tSystem.out.println(\"--> \" + r);\n\t\t\tif (HttpURLConnection.HTTP_OK == r) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (HttpException e) {\n\t\t\t//mm.. silence the exception and just print the stacktrace?\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\tthrow new DownloadInterruptedException(\"Problem while getting the video due to IOException. Message: \" +\n\t\t\t\t\tioe.getMessage(),ioe);\n\t\t} \n\t\treturn false;\n\t}",
"private void takeVideoIntent(){\n Intent takeVideo = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);\n if(takeVideo.resolveActivity(getPackageManager())!=null){\n File videoFile = null;\n try{\n videoFile = createVideoFile();\n }catch(IOException ex){\n ex.getMessage();\n }\n if(videoFile!=null){\n Uri provideVideo = FileProvider.getUriForFile(getApplicationContext(),\"com.example.android.fileProvider\",videoFile);\n takeVideo.putExtra(MediaStore.EXTRA_OUTPUT, provideVideo);\n startActivityForResult(takeVideo, REQUEST_VIDEO_CAPTURE);\n }\n }\n }",
"private static void validateWebcam() {\n String osName = System.getProperty(\"os.name\", \"\");\n String osVersion = System.getProperty(\"os.version\", \"\");\n if (osName.startsWith(\"Mac\") && osVersion.startsWith(\"10.15\")) {\n System.err.println(\"Demo doesn't currently work for os.version=\" + osVersion);\n System.err.println(\"See https://github.com/hazelcast/hazelcast-jet-demos/issues/88\");\n System.exit(1);\n }\n }",
"@LargeTest\n public void testVideoCapture() throws InterruptedException {\n int beforeCount = getValidFileCountFromFilesystem();\n mCameraHelper.goToVideoMode();\n Thread.sleep(CAPTURE_TIMEOUT);\n // Capture video using front camera\n mCameraHelper.goToFrontCamera();\n mCameraHelper.captureVideo(VIDEO_LENGTH);\n pushButton(DESC_BTN_DONE);\n Thread.sleep(CAPTURE_TIMEOUT);\n int afterCount = getValidFileCountFromFilesystem();\n assertTrue(\"Camera didnt capture video\", afterCount > beforeCount);\n // Capture video using back camera\n beforeCount = getValidFileCountFromFilesystem();\n mCameraHelper.goToBackCamera();\n mCameraHelper.captureVideo(VIDEO_LENGTH);\n pushButton(DESC_BTN_DONE);\n Thread.sleep(CAPTURE_TIMEOUT);\n afterCount = getValidFileCountFromFilesystem();\n assertTrue(\"Camera didnt capture video\", afterCount > beforeCount);\n }",
"@SuppressWarnings(\"unused\")\n public boolean videoAuthorized(){\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reprint Bill Button Click event, calls reprint bill function | public void reprintBill() {
//ReprintVoid(Byte.parseByte("1"));
tblOrderItems.removeAllViews();
AlertDialog.Builder DineInTenderDialog = new AlertDialog.Builder(this);
LayoutInflater UserAuthorization = (LayoutInflater) this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View vwAuthorization = UserAuthorization.inflate(R.layout.dinein_reprint, null);
final ImageButton btnCal_reprint = (ImageButton) vwAuthorization.findViewById(R.id.btnCal_reprint);
final EditText txtReprintBillNo = (EditText) vwAuthorization.findViewById(R.id.txtDineInReprintBillNumber);
final TextView tv_inv_date = (TextView) vwAuthorization.findViewById(R.id.tv_inv_date);
tv_inv_date.setText(tvDate.getText().toString());
btnCal_reprint.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DateSelection(tv_inv_date);
}
});
DineInTenderDialog.setIcon(R.drawable.ic_launcher).setTitle("RePrint Bill")
.setView(vwAuthorization).setNegativeButton("Cancel", null)
.setPositiveButton("RePrint", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
if (txtReprintBillNo.getText().toString().equalsIgnoreCase("")) {
messageDialog.Show("Warning", "Please enter Bill Number");
setInvoiceDate();
return;
} else if (tv_inv_date.getText().toString().equalsIgnoreCase("")) {
messageDialog.Show("Warning", "Please enter Bill Date");
setInvoiceDate();
return;
} else {
try {
int billStatus =0;
int billNo = Integer.valueOf(txtReprintBillNo.getText().toString());
String date_reprint = tv_inv_date.getText().toString();
tvDate.setText(date_reprint);
Date date = new SimpleDateFormat("dd-MM-yyyy").parse(date_reprint);
Cursor LoadItemForReprint = db.getItemsFromBillItem_new(
billNo, String.valueOf(date.getTime()));
if (LoadItemForReprint.moveToFirst()) {
Cursor cursor = db.getBillDetail_counter(billNo, String.valueOf(date.getTime()));
if (cursor != null && cursor.moveToFirst()) {
billStatus = cursor.getInt(cursor.getColumnIndex("BillStatus"));
if (billStatus == 0) {
messageDialog.Show("Warning", "This bill has been deleted");
setInvoiceDate();
return;
}
String pos = cursor.getString(cursor.getColumnIndex("POS"));
String custStateCode = cursor.getString(cursor.getColumnIndex("CustStateCode"));
if (pos != null && !pos.equals("") && custStateCode != null && !custStateCode.equals("") && !custStateCode.equalsIgnoreCase(pos)) {
chk_interstate.setChecked(true);
int index = getIndex_pos(custStateCode);
spnr_pos.setSelection(index);
//System.out.println("reprint : InterState");
} else {
chk_interstate.setChecked(false);
spnr_pos.setSelection(0);
//System.out.println("reprint : IntraState");
}
fTotalDiscount = cursor.getFloat(cursor.getColumnIndex("TotalDiscountAmount"));
float discper = cursor.getFloat(cursor.getColumnIndex("DiscPercentage"));
reprintBillingMode = cursor.getInt(cursor.getColumnIndex("BillingMode"));
tvDiscountPercentage.setText(String.format("%.2f", discper));
tvDiscountAmount.setText(String.format("%.2f", fTotalDiscount));
tvBillNumber.setText(txtReprintBillNo.getText().toString());
tvIGSTValue.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("IGSTAmount"))));
tvTaxTotal.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("CGSTAmount"))));
tvServiceTaxTotal.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("SGSTAmount"))));
tvSubTotal.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("TaxableValue"))));
tvBillAmount.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("BillAmount"))));
LoadItemsForReprintBill(LoadItemForReprint);
Cursor crsrBillDetail = db.getBillDetail_counter(Integer.valueOf(txtReprintBillNo.getText().toString()));
if (crsrBillDetail.moveToFirst()) {
customerId = (crsrBillDetail.getString(crsrBillDetail.getColumnIndex("CustId")));
}
}
} else {
messageDialog.Show("Warning",
"No Item is present for the Bill Number " + txtReprintBillNo.getText().toString() +", Dated :"+tv_inv_date.getText().toString());
setInvoiceDate();
return;
}
if(reprintBillingMode ==4 && billStatus ==2)
{
strPaymentStatus = "Cash On Delivery";
}
else
strPaymentStatus = "Paid";
isReprint = true;
PrintNewBill();
// update bill reprint count
int Result = db
.updateBillRepintCounts(Integer.parseInt(txtReprintBillNo.getText().toString()));
ClearAll();
if (!(crsrSettings.getInt(crsrSettings.getColumnIndex("Tax")) == 1)) { // reverse tax
REVERSETAX = true;
}else
{
REVERSETAX = false;
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).show();
} | [
"public void RePrintData(ActionEvent actionEvent) {\n try {\n BindingContext bCtx = BindingContext.getCurrent();\n DCBindingContainer bindings = (DCBindingContainer) bCtx.getCurrentBindingsEntry();\n DCIteratorBinding iter = (DCIteratorBinding) bindings.findIteratorBinding(\"reprintsIterator\");\n\n oracle.binding.OperationBinding oper = bindings.getOperationBinding(\"rePrintDocuments\");\n int rowNo = iter.getCurrentRowIndexInRange();\n\n oper.getParamsMap().put(\"row\", \"\" + rowNo);\n\n //Execute a method\n oper.execute();\n\n //show poppup\n RichPopup.PopupHints hints = new RichPopup.PopupHints();\n getPopup(\"confirmReprint\").show(hints);\n \n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void onPendingButtonClick(java.awt.event.MouseEvent evt) {\n pendingInvoice();\n }",
"public void refreshReprint(ActionEvent actionEvent) {\n try {\n BindingContext bCtx = BindingContext.getCurrent();\n DCBindingContainer bindings = (DCBindingContainer) bCtx.getCurrentBindingsEntry();\n DCIteratorBinding iter = (DCIteratorBinding) bindings.findIteratorBinding(\"reprintsIterator\");\n\n oracle.binding.OperationBinding oper = bindings.getOperationBinding(\"RetrieveMassRePrintBundles\");\n oper.execute();\n \n iter.executeQuery();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void reprint() {\n HashMap<Integer, Invoice> invoiceHashMap = new HashMap<>();\n printHeader(\"List of Invoices\");\n MainApp.invoices.forEach((invoice -> {\n System.out.println(\"Receipt #\" + invoice.getOrderID() + \", Paid On: \" + DateTimeFormatHelper.formatMillisToDateTime(invoice.getCompletedAt()));\n invoiceHashMap.put(invoice.getOrderID(), invoice);\n }));\n printBreaks();\n invoiceHashMap.put(-1, null);\n int selection = ScannerHelper.getIntegerInput(\"Select invoice to reprint receipt: \", new ArrayList<>(invoiceHashMap.keySet()), \"Invalid Receipt Number. Please select a valid receipt number or enter -1 to cancel\");\n if (selection == -1) {\n System.out.println(\"Receipt Cancelled\");\n return;\n }\n Invoice selected = invoiceHashMap.get(selection);\n ArrayList<String> receipts;\n if (selected.getReceipt().equals(\"-\")) {\n // No receipt, generate and save\n receipts = generateReceipt(selected, selected.getTotal(), selected.getAmountPaid(), selected.getPaymentType());\n } else {\n String filePath = RECEIPT_SUBFOLDER + selected.getReceipt();\n try {\n BufferedReader reader = FileIOHelper.getFileBufferedReader(filePath);\n receipts = reader.lines().collect(Collectors.toCollection(ArrayList::new));\n } catch (IOException e) {\n System.out.println(\"Failed to load receipt. Regenerating\");\n receipts = generateReceipt(selected, selected.getTotal(), selected.getAmountPaid(), selected.getPaymentType());\n }\n }\n\n System.out.println(\"Reprinting Receipt...\");\n System.out.println();\n System.out.println();\n receipts.forEach(System.out::println);\n System.out.println(\"\\n\");\n }",
"private void printButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printButtonActionPerformed\n new PrintUI(revise, this,displaying,true).setVisible(true);\n }",
"public void printBill () {\n logger.info(\"Calling getPhoneBill to print\");\n Boolean customerValid = validatePrintCall();\n if(customerValid == false) {\n return;\n }\n\n String customer = customerNameInput.getValue().trim();\n\n phoneBillService.getBill(customer, new AsyncCallback<PhoneBill>() {\n\n @Override\n public void onFailure(Throwable ex) {\n alertOnException(ex);\n }\n\n @Override\n public void onSuccess(PhoneBill bill) {\n if(bill == null) {\n alerter.alert(\"That customer doesn't exist\");\n return;\n }\n\n String prettyBill = bill.prettyPrintCalls(bill, \"Bill for: \"+bill.getCustomer());\n billResultsTextarea.setVisible(true);\n billResultsTextarea.setValue(prettyBill);\n }\n });\n\n }",
"public void insulinRecharge(MouseEvent event) {\r\n\t\t\tinsulinLevel = 100;\r\n\t\t\tinsulinCapacity.setProgress(1);\r\n\t\t\taddMessagetoBox(\"Insulin Bank is Refilled! \", Color.GREEN);\r\n\t\t\t\r\n\t\t}",
"public void printTicket()\n {\n // Simulate the printing of a ticket.\n System.out.println(\"##################\");\n System.out.println(\"# The BlueJ Line\");\n System.out.println(\"# Ticket\");\n System.out.println(\"# \" + price + \" cents.\");\n System.out.println(\"##################\");\n System.out.println();\n // Update the total collected with the balance.\n total += balance;\n \n //call refundBalance\n refund = refundBalance();\n //this will ensure that the excess cash inserted will be returned to customer\n \n \n //print out the amount to be refunded\n //System.out.println(\"refundBalance\");\n \n \n // Clear the balance.\n balance = 0;\n }",
"private void btn_bankReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_bankReportActionPerformed\n generateBankReport();\n }",
"private void rbtn_book_round_tripActionPerformed(java.awt.event.ActionEvent evt) {\n \n }",
"private void action_updateReprint(HttpServletRequest request, HttpServletResponse response) throws NumberFormatException, ParseException {\r\n try {\r\n Map<String, String> params = new HashMap<String, String>();\r\n params.put(\"updateReprintNumber\", Utils.checkString(request.getParameter(\"reprintNumber\")));\r\n params.put(\"updateReprintDate\", Utils.checkString(request.getParameter(\"reprintDate\")));\r\n if (!validator(params, request, response)) {\r\n if (currentReprint.getNumber() != Integer.parseInt(params.get(\"updateReprintNumber\"))) {\r\n currentReprint.setNumber(Integer.parseInt(params.get(\"updateReprintNumber\")));\r\n currentReprint.setDirty(true);\r\n }\r\n DateFormat format = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n java.util.Date date = format.parse(params.get(\"updateReprintDate\"));\r\n java.sql.Date sqlDate = new java.sql.Date(date.getTime());\r\n if (!currentReprint.getDate().equals(sqlDate)) {\r\n currentReprint.setDate(sqlDate);\r\n currentReprint.setDirty(true);\r\n }\r\n getDataLayer().storeReprint(currentReprint);\r\n reprintId = 0;\r\n action_createNotifyMessage(request, response, SUCCESS, updateMessage, true);\r\n }\r\n } catch (NumberFormatException | ParseException | DataLayerException ex) {\r\n action_error(request, response, \"Errore nel salvare la ristampa:: \" + ex.getMessage(), 510);\r\n }\r\n }",
"public void refreshPrint(ActionEvent actionEvent) {\n try {\n BindingContext bCtx = BindingContext.getCurrent();\n DCBindingContainer bindings = (DCBindingContainer) bCtx.getCurrentBindingsEntry();\n DCIteratorBinding iter = (DCIteratorBinding) bindings.findIteratorBinding(\"printsIterator\");\n \n oracle.binding.OperationBinding oper = bindings.getOperationBinding(\"RetrieveMassPrint\");\n oper.execute();\n \n iter.executeQuery();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void printBill() {\n System.out.println(\"BILL FOR TABLE #\" + id);\n for (MenuItem item : bill.getItems()) {\n if (item.getPrice() == 0.0) {\n System.out.println(item.getQuantity() + \" \" + item.getName() + \": $\" + String.format(\"%.2f\", item.getTotal()) + \" Sent back because: \" + item.getComment() + \".\");\n } else {\n System.out.println(item.getQuantity() + \" \" + item.getName() + \": $\" + String.format(\"%.2f\", item.getTotal()));\n }\n for (Ingredient addedIng : item.getExtraIngredients()) {\n System.out.println(\"add \" + item.getQuantity() + \" \" + addedIng.getName() + \": $\" + String.format(\"%.2f\", addedIng.getPrice() * item.getQuantity()));\n }\n for (Ingredient removedIng : item.getRemovedIngredients()) {\n System.out.println(\"remove \" + item.getQuantity() + \" \" + removedIng.getName() + \": -$\" + String.format(\"%.2f\", removedIng.getPrice() * item.getQuantity()));\n }\n\n }\n System.out.println(\"Total: $\" + getBillPrice() + \"\\n\");\n }",
"public void addPrintReceiptButtonListener(ActionListener listenForPrintReceiptButton)\n {\n printReceiptButton.addActionListener(listenForPrintReceiptButton); \n }",
"public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }",
"private void refreshDataBill() {\n refreshDataReservationRoomTypeDetailRoomPriceDetails();\r\n\r\n txtTotalRoomCost.setText(ClassFormatter.currencyFormat.cFormat(calculationTotalRoomCost()));\r\n txtTotalDiscount.setText(ClassFormatter.currencyFormat.cFormat(calculationTotalDiscount()));\r\n txtTotalServiceCharge.setText(ClassFormatter.currencyFormat.cFormat(calculationTotalServiceCharge()));\r\n txtTotalTax.setText(ClassFormatter.currencyFormat.cFormat(calculationTotalTax()));\r\n txtTotalBillExtendRoom.setText(ClassFormatter.currencyFormat.cFormat(calculationTotalBillExtendRoom()));\r\n }",
"private void refreshCartJButtonActionPerformed(java.awt.event.ActionEvent evt) {\n cartRefresh();\n }",
"public void makePrintButton() {\r\n JButton print = new JButton(\"Print out account details\");\r\n new Button(print, main);\r\n// print.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// print.setPreferredSize(new Dimension(2500, 100));\r\n// print.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n print.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n printLeagueOfLegendsAccount();\r\n }\r\n });\r\n// main.add(print);\r\n }",
"private void refreshButtonClicked(ActionEvent event) {\n\n PriceFinder refreshedPrice = new PriceFinder(); // generates a new price to set as a temp item's new price\n\n itemView.testItem.setPrice(refreshedPrice.returnNewPrice());\n configureUI(); // essentially pushes the new item information to the panel\n\n showMessage(\"Item price updated! \");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates the connection context. | boolean isConnectionContextValid(); | [
"boolean isConnectionContextValidForLogin();",
"public abstract boolean validateConnection();",
"public void validateContext(EvaluationContext context) {\n if (null == this.context) {\n this.context = context;\n }\n }",
"void validateConnection() throws DatabaseException;",
"private boolean checkConnectionSettings(Context context)\n\t{\n\t\t// Check connection settings\n\t\tboolean isSuccessful = true;\n\t\tString errorText = \"--> Missing connection settings on executing command on server\";\n\n\t\ttry\n\t\t{\n\t\t\tif (this.host == null || this.host.length() == 0)\n\t\t\t{\n\t\t\t\terrorText += \"\\n--> Parameter 'Host' not set\";\n\t\t\t\tisSuccessful = false;\n\t\t\t}\n\n\t\t\tif (this.port <= 0)\n\t\t\t{\n\t\t\t\terrorText += \"\\n--> Parameter 'Port' not set\";\n\t\t\t\tisSuccessful = false;\n\t\t\t}\n\n\t\t\tif (this.keyApplicationPrivateKey == null || this.keyApplicationPrivateKey.length() == 0)\n\t\t\t{\n\t\t\t\terrorText += \"\\n--> Parameter 'ClientPrivateKey' not set\";\n\t\t\t\tisSuccessful = false;\n\t\t\t}\n\n\t\t\tif (isSuccessful == false)\n\t\t\t{\n\t\t\t\tcontext.getNotificationManager().notifyError(context, ResourceManager.notification(context, \"Application\", \"ErrorOnProcessingCommandOnClient\"), errorText, null);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tcontext.getNotificationManager().notifyError(context, ResourceManager.notification(context, \"Application\", \"ErrorOnProcessingCommandOnClient\"), errorText, e);\n\t\t}\n\n\t\t// Return\n\t\treturn isSuccessful;\n\t}",
"public void checkValid() {\n \t\tif (!isValid()) {\n \t\t\tthrow new IllegalStateException(Msg.BUNDLE_CONTEXT_INVALID_EXCEPTION);\n \t\t}\n \t}",
"public void checkConnection() {\n connection.check();\n }",
"public abstract void validateConnection() throws InvalidCredentialsException, IOException;",
"protected boolean validateConnection(Connection connection)\n throws SQLException {\n return connection != null && !connection.isClosed()\n && connection.isValid(DEFAULT_RETRY_WAIT_INTERVAL);\n }",
"boolean isValid() {\r\n if (inUse) {\r\n return true;\r\n } else {\r\n try {\r\n Connection conn = pooledConn.getConnection();\r\n\r\n conn.close();\r\n\r\n return true;\r\n } catch (SQLException e) {\r\n return false;\r\n }\r\n }\r\n }",
"public String getDatabaseConnectionPoolShouldValidate(){\n \t\treturn getProperty(\"org.sagebionetworks.pool.connection.validate\");\n \t}",
"void validateInitialized() {\n\t\tif (webContextThreadLocal.get() == null)\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"Attempted to access null web context.\");\n\n\t\t// we can determine if this was initialized based on whether or not the\n\t\t// tenant id was set.\n\t\tif (webContextThreadLocal.get().getTenantId() == Integer.MIN_VALUE)\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"Attempted to access uninitialized web context\");\n\t}",
"protected void validate() {\n super.validate();\n\n if (durableConsumers && durableSubscriptionName == null) {\n // JMS topic consumer for JMS destination ''{0}'' is configured to use durable subscriptions but it does not have a durable subscription name.\n ConfigurationException ce = new ConfigurationException();\n ce.setMessage(JMSConfigConstants.MISSING_DURABLE_SUBSCRIPTION_NAME, new Object[]{destinationJndiName});\n throw ce;\n }\n }",
"private boolean validConnectionName() {\r\n\t\treturn (ConnName().equals(\"\"));\r\n\t}",
"public boolean check_connection()\n {\n try\n {\n return !connection.isClosed();\n }\n catch(SQLException e)\n {\n return false;\n }\n }",
"private void checkRep() {\n\t\tassert (!(this.from.equals(null) || this.to.equals(null) \n\t\t\t\t || this.label.equals(null))): \n\t\t\t\t \"None of the Connection class' fields can be null\";\n\t}",
"public boolean ensureConnection() {\r\n\r\n Connection conn;\r\n\r\n try {\r\n conn = dataSource.getConnection();\r\n if (conn != null && conn.isValid(15)) {\r\n conn.close();\r\n return true;\r\n }\r\n\r\n } catch (SQLException ex) {\r\n logger.error(\"Error ensuring connection\", ex);\r\n }\r\n\r\n return false;\r\n }",
"protected void validateConfiguration() {}",
"public void CheckConnection() {\n\t\tconn = SqlConnection.DbConnector();\n\t\tif (conn == null) {\n\t\t\tSystem.out.println(\"Connection Not Successful\");\n\t\t\tSystem.exit(1);\n\t\t} else {\n\t\t\tSystem.out.println(\"Connection Successful\");\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for top spacings. | public List<Integer> getTopSpacings() {
return topSpacings;
} | [
"public List<Integer> getTopVerticalSpacings() {\n return topVerticalSpacings;\n }",
"public int getTopN() {\n return topN_;\n }",
"public int getTopN() {\n return topN_;\n }",
"public Integer getTopbs() {\n return topbs;\n }",
"@VTID(35)\r\n double getTop();",
"public Integer getTop() {\n return top;\n }",
"public Card getTopCard(){\n\t\treturn this.getCard(4);\n\t\t\n\t}",
"public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}",
"public Integer getTopK() {\n return this.topK;\n }",
"public int getTop() {\n\treturn top;\n }",
"public Card getTopCard()\n\t{\n\t\treturn this.getCard(4);\n\t}",
"int getTopN();",
"public String getTopnum() {\n return topnum;\n }",
"int getTop();",
"public int getTopUnits() {\n\t\treturn top;\n\t}",
"public double getTopScore() {\n return topScore;\n }",
"LinkedHashMap<String, Integer> getTopScores() {\n return this.topScores;\n }",
"public List<Integer> getBottomSpacings() {\n return bottomSpacings;\n }",
"public int getTopCard()\n {\n return this.topCard;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overwrite displayed project records in the ViewerFrame. The reason behind overwriting is changes to the EphrinSummaryFile.tsv file. | public void notifyOverwriteProjectRecords(ArrayList<ProjectRecordUnit> projectRecordUnits) {
System.out.println("Main::notifyOverwriteProjectRecords " + projectRecordUnits.size() + " records");
summaryFileWriter = SummaryFileWriter.getInstance();
if (summaryFileWriter.OverwriteProjectRecords(projectRecordUnits)) {
viewerFrame.overwriteRecordUnits(retrieveRecordUnits());
viewerFrame.updateEphrinStatus(projectRecordUnits.size() + " records successfully saved to "
+ Constants.PROPERTY_SUMMARY_FILE_FULLPATH, false);
} else {
viewerFrame.updateEphrinStatus("Alert!! Something went wrong while saving project records!!", true);
}
} | [
"private void resetProjectDataPanel() {\r\n this.listProjectsViewController.setProjectTagsText(\"\");\r\n this.listProjectsViewController.setProjectTagsDescription(\"\");\r\n this.listProjectsViewController.setProjectEndTime(\"\");\r\n this.listProjectsViewController.setProjectAuthorText(\"\");\r\n this.listProjectsViewController.setProjectCollaboratorsText(\"\");\r\n }",
"private void updateProject(){\r\n\t\tnoc.setFlowControl(getFlowControlSelected());\r\n\t\tnoc.setNumRotX(getDimXSelected());\r\n\t\tnoc.setNumRotY(getDimYSelected());\r\n\t\tnoc.setVirtualChannel(Integer.valueOf(getVirtualChannelSelected()).intValue());\r\n\t\tnoc.setScheduling(getSchedulingSelected());\r\n\t\tnoc.setFlitSize(Integer.valueOf(getFlitWidthSelected()).intValue());\r\n\t\tnoc.setBufferDepth(Integer.valueOf(getBufferDepthSelected()).intValue());\r\n\t\tnoc.setAlgorithm(getRoutingAlgorithmSelected());\r\n\t\t//noc.setSCTB(hasSCTestBench());\r\n\t\tnoc.setSCTB(true);\r\n\t\tproject.setNoCGenerate(true);\r\n\r\n\t\tif(getFlowControlSelected().equalsIgnoreCase(\"Handshake\")){\r\n\t\t\tnoc.setCyclesPerFlit(2);\r\n\t\t\tnoc.setCyclesToRoute(7);\r\n\t\t\tproject.setPowerEstimated(true);\r\n\t\t}\r\n\t\telse if(getFlowControlSelected().equalsIgnoreCase(\"CreditBased\")){\r\n\t\t\tnoc.setCyclesPerFlit(1);\r\n\t\t\tnoc.setCyclesToRoute(5);\r\n\t\t\t\r\n\t\t\tif(noc.getScheduling().equalsIgnoreCase(\"RoundRobin\"))\r\n\t\t\t\tproject.setPowerEstimated(true);\r\n\t\t\telse\r\n\t\t\t\tproject.setPowerEstimated(false);\r\n\t\t}\r\n\r\n\t\t//write the project file.\r\n\t\tproject.write();\r\n\t}",
"public void updateProjectArea()\n {\n projectTableView.getItems().clear();\n if (adapterProject != null)\n {\n finalProjectList = adapterProject.getAllProjects();\n for (int i = 0; i < finalProjectList.size(); i++)\n {\n projectTableView.getItems().add(finalProjectList.getProjectByIndex(i));\n }\n }\n }",
"private void resetProject() {\n\t\tthis.projectFile = null;\n\t\tthis.projectName = \"untitled.drawing\";\n\t}",
"private void overrideProject(Project newProject) {\n\t\tfor (Project project : projects) {\r\n\t\t\tif (project.getTitle().compareTo(newProject.getTitle()) == 0) {\r\n\t\t\t\tprojects.removeValue(project, false);\r\n\t\t\t\tprojects.add(newProject);\r\n\t\t\t\tonProjectChanged();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void projectModified() { }",
"public void updateReportView() {\n String report = \"\";\n String line;\n try {\n BufferedReader buffRead = new BufferedReader(new FileReader(\"./src/data/report/report.txt\"));\n while ((line = buffRead.readLine()) != null) {\n report += line + \"\\n\";\n }\n txtAReport.setText(report);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void updateLog(){\n Object rowData[] = new Object[3];\n rowData[0] = logmodel.getEntry(logmodel.getSize()-1).getDate();\n rowData[1] = logmodel.getEntry(logmodel.getSize()-1).getName();\n rowData[2] = logmodel.getEntry(logmodel.getSize()-1).getStatus();\n model.addRow(rowData);\n logmodel.saveToLogFile();\n }",
"@Override\n public void redo() {\n project.removeDevTeam(team, start, end);\n }",
"public void redoProjectProperties()\n\t{\n\t\tprojectProperties.revalidate();\n projectProperties.repaint();\n\t}",
"private void refreshCurrentRunInfo() {\r\n\r\n\t\tif(currentRun == null || currentRun.isNew()){\r\n\t\t\twriteToProbeLogWindow(\"\", false);\r\n\t\t\tdecorateProbeStatus(ProbeRunStatus.Inactive);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// refresh the run info from the db\r\n\t\t\tcurrentRun = probeRunDAO.findProbeRunById(currentRun.id);\r\n\t\t\twriteToProbeLogWindow(currentRun.logText, false);\r\n\t\t\tdecorateProbeStatus(currentRun.status);\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void undo() {\n project.addDevTeam(team, start, end);\n }",
"private void refreshTabProjectInfo()\n {\n logger.logComment(\"> Refreshing the Tab for project info...\");\n \n if (initialisingProject && projManager.getCurrentProject() != null)\n {\n this.jTextAreaProjDescription.setText(projManager.getCurrentProject().getProjectDescription());\n jTextAreaProjDescription.setCaretPosition(0);\n }\n \n if (projManager.getCurrentProject() == null ||\n projManager.getCurrentProject().getProjectStatus() == Project.PROJECT_NOT_INITIALISED)\n {\n this.jPanelCellClicks.removeAll();\n this.jPanelSimConfigClicks.removeAll();\n this.jPanelCellGroupClicks.removeAll();\n \n logger.logComment(\"Removed all...\");\n jPanelMainInfo.repaint();\n \n \n this.jLabelMainNumCells.setEnabled(false);\n this.jLabelSimConfigs.setEnabled(false);\n this.jTextAreaProjDescription.setText(welcomeText);\n \n this.jLabelProjDescription.setEnabled(false);\n this.jTextFieldProjName.setText(\"\");\n this.jLabelName.setEnabled(false);\n \n this.jLabelNumCellGroups.setEnabled(false);\n this.jLabelProjFileVersion.setEnabled(false);\n this.jLabelMainLastModified.setEnabled(false);\n \n this.jTextFieldProjFileVersion.setText(\"\");\n this.jTextFieldMainLastModified.setText(\"\");\n \n \n this.jTextAreaProjDescription.setEditable(false);\n Button tempButton = new Button();\n tempButton.setEnabled(false);\n jTextAreaProjDescription.setBackground(tempButton.getBackground());\n jTextAreaProjDescription.setForeground(Color.darkGray);\n this.jScrollPaneProjDesc.setEnabled(false);\n \n }\n else\n {\n \n this.jLabelMainNumCells.setEnabled(true);\n this.jLabelSimConfigs.setEnabled(true);\n this.jLabelProjDescription.setEnabled(true);\n this.jLabelName.setEnabled(true);\n this.jLabelNumCellGroups.setEnabled(true);\n this.jLabelProjFileVersion.setEnabled(true);\n this.jLabelMainLastModified.setEnabled(true);\n \n \n this.jTextAreaProjDescription.setEditable(true);\n \n this.jTextFieldProjName.setText(projManager.getCurrentProject().getProjectName());\n \n //this.jTextFieldNumRegions.setText(this.projManager.getCurrentProject().regionsInfo.getRowCount() + \"\");\n //this.jTextFieldNumCells.setText(this.projManager.getCurrentProject().cellManager.getNumberCellTypes() + \"\");\n \n //this.jTextFieldNumCellGroups.setText(this.projManager.getCurrentProject().cellGroupsInfo.getNumberCellGroups() + \"\");\n \n \n jPanelSimConfigClicks.removeAll();\n for (SimConfig simConfig: projManager.getCurrentProject().simConfigInfo.getAllSimConfigs())\n {\n ClickLink cl = new ClickLink(simConfig.getName(), simConfig.getDescription());\n \n this.jPanelSimConfigClicks.add(cl);\n \n \n cl.addMouseListener(new MouseListener()\n {\n //String cellGroup = cellGroup;\n public void mouseClicked(MouseEvent e)\n {\n \n jTabbedPaneMain.setSelectedIndex(jTabbedPaneMain.indexOfTab(GENERATE_TAB));\n \n String clicked = e.getComponent().getName();\n \n jComboBoxSimConfig.setSelectedItem(clicked);\n \n doGenerate();\n };\n \n public void mousePressed(MouseEvent e)\n {};\n \n public void mouseReleased(MouseEvent e)\n {};\n \n public void mouseEntered(MouseEvent e)\n {};\n \n public void mouseExited(MouseEvent e)\n {};\n \n });\n }\n \n \n \n jPanelCellClicks.removeAll();\n for (Cell cell: projManager.getCurrentProject().cellManager.getAllCells())\n {\n ClickLink cl = new ClickLink(cell.getInstanceName(), cell.getCellDescription());\n this.jPanelCellClicks.add(cl);\n \n \n cl.addMouseListener(new MouseListener()\n {\n //String cellGroup = cellGroup;\n public void mouseClicked(MouseEvent e)\n {\n \n jTabbedPaneMain.setSelectedIndex(jTabbedPaneMain.indexOfTab(CELL_TYPES_TAB));\n \n String clicked = e.getComponent().getName();\n \n Cell clickedCell = projManager.getCurrentProject().cellManager.getCell(clicked);\n \n jComboBoxCellTypes.setSelectedItem(clickedCell);\n \n // logger.logComment(\"Name: \"+ clicked, true);\n // int index = projManager.getCurrentProject().cellGroupsInfo.getAllCellGroupNames().indexOf(clicked);\n // jTableCellGroups.setRowSelectionInterval(index, index);\n \n //System.out.println(\"mouseClicked\");\n //setText(\"Ouch\");\n };\n \n public void mousePressed(MouseEvent e)\n {};\n \n public void mouseReleased(MouseEvent e)\n {};\n \n public void mouseEntered(MouseEvent e)\n {};\n \n public void mouseExited(MouseEvent e)\n {};\n \n });\n }\n \n jPanelCellGroupClicks.removeAll();\n for (String cellGroup: projManager.getCurrentProject().cellGroupsInfo.getAllCellGroupNames())\n {\n \n ClickLink cl = new ClickLink(cellGroup, \"Cell Group: \"+cellGroup+\"<br>\"+\n \"Cell Type: \"+projManager.getCurrentProject().cellGroupsInfo.getCellType(cellGroup));\n this.jPanelCellGroupClicks.add(cl);\n \n \n cl.addMouseListener(new MouseListener()\n {\n //String cellGroup = cellGroup;\n public void mouseClicked(MouseEvent e)\n {\n \n jTabbedPaneMain.setSelectedIndex(jTabbedPaneMain.indexOfTab(CELL_GROUPS_TAB));\n \n String clicked = e.getComponent().getName();\n logger.logComment(\"Name: \"+ clicked);\n int index = projManager.getCurrentProject().cellGroupsInfo.getAllCellGroupNames().indexOf(clicked);\n jTableCellGroups.setRowSelectionInterval(index, index);\n \n //System.out.println(\"mouseClicked\");\n //setText(\"Ouch\");\n };\n \n public void mousePressed(MouseEvent e)\n {};\n \n public void mouseReleased(MouseEvent e)\n {};\n \n public void mouseEntered(MouseEvent e)\n {};\n \n public void mouseExited(MouseEvent e)\n {};\n \n });\n }\n \n \n \n this.jTextFieldProjFileVersion.setText(projManager.getCurrentProject().getProjectFileVersion());\n \n long timeModified = projManager.getCurrentProject().getProjectFile().lastModified();\n \n SimpleDateFormat formatter = new SimpleDateFormat(\"H:mm:ss, MMM d, yyyy\");\n \n java.util.Date modified = new java.util.Date(timeModified);\n \n this.jTextFieldMainLastModified.setText(formatter.format(modified));\n \n this.jTextAreaProjDescription.setEditable(true);\n \n jTextAreaProjDescription.setBackground((new JTextArea()).getBackground());\n jTextAreaProjDescription.setForeground((new JTextArea()).getForeground());\n \n this.jScrollPaneProjDesc.setEnabled(true);\n }\n }",
"public void newFile() {\n // reset data to empty cell values\n resetData(data);\n // set table value items to empty data\n tableView.setItems(data);\n }",
"public void updateProject(Project theProject) {\n\t\tmyProject = theProject;\n\t}",
"public String edit(int index) throws SchwIoException {\n PastWorkoutSessionRecord editedRecord;\n editedRecord = pastFiles.get(index - 1);\n PastWorkoutSessionRecord newRecord = editedRecord.edit();\n pastFiles.set(index - 1, newRecord);\n storage.writePastRecords(pastFiles);\n logger.log(Level.INFO, \"Edit completed.\");\n return newRecord.getFilePath();\n }",
"public void refreshProjectInfos() {\n\t\tif (getTaskManager().getTaskCount() == 0 && resp.nbPeople() == 0)\n\t\t\tgetStatusBar().setSecondText(\"\");\n\t\telse\n\t\t\tgetStatusBar().setSecondText(\n\t\t\t\t\tcorrectLabel(language.getText(\"task\")) + \" : \" + getTaskManager().getTaskCount() + \" \" + correctLabel(language.getText(\"resources\")) + \" : \" + resp.nbPeople());\n\t}",
"public void clearProject()\n\t{\n\t\tstoreViewState();\n\t\tproject.clearProject();\n\t\tcheckStatus();\n\t}",
"private void updateSourceView() {\n StringWriter sw = new StringWriter(200);\n try {\n new BibEntryWriter(new LatexFieldFormatter(Globals.prefs.getLatexFieldFormatterPreferences()),\n false).write(entry, sw, frame.getCurrentBasePanel().getBibDatabaseContext().getMode());\n sourcePreview.setText(sw.getBuffer().toString());\n } catch (IOException ex) {\n LOGGER.error(\"Error in entry\" + \": \" + ex.getMessage(), ex);\n }\n\n fieldList.clearSelection();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method: createWindow purpose: This method creates a window with openGL and setup the display area. | private void createWindow() throws Exception
{
Display.setFullscreen(false);
DisplayMode d[] = Display.getAvailableDisplayModes();
for (int i = 0; i < d.length; i++)
{
if (d[i].getWidth() == 640 && d[i].getHeight() == 480
&& d[i].getBitsPerPixel() == 32)
{
displayMode = d[i];
break;
}
}
Display.setDisplayMode(displayMode);
Display.setTitle("Final Project");
Display.create();
} | [
"public void createWindow ()\n {\n this.setResizable(false);\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\n this.setPreferredSize(new Dimension(game.getWIDTH(), game.getHEIGHT()));\n this.setMinimumSize(new Dimension(game.getWIDTH(), game.getHEIGHT()));\n this.setMaximumSize(new Dimension(game.getWIDTH(), game.getHEIGHT()));\n this.setLocationRelativeTo(null);\n this.setVisible(true);\n this.add(game);\n\n //Starting the GamePanel thread!\n game.start();\n }",
"private void createWindow() throws Exception {\r\n Display.setFullscreen(false);\r\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\r\n Display.setTitle(\"Program 2\");\r\n Display.create();\r\n }",
"public native void createRenderWindowGlContext(final int width, final int height);",
"public native void createRenderWindow(final int width, final int height, final long handle);",
"static void createAndDisplayFrame() {\n\t\tif(!HAS_GUI) return;\n\t\t\n\t\tRenderer.canvas.setMinimumSize(new java.awt.Dimension(1, 1));\n\t\tRenderer.canvas.setPreferredSize(Renderer.getWindowSize());\n\t\tJFrame frame = new JFrame(NAME);\n\t\tframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\tframe.setLayout(new BorderLayout()); // sets the layout of the window\n\t\tframe.add(Renderer.canvas, BorderLayout.CENTER); // Adds the game (which is a canvas) to the center of the screen.\n\t\tframe.pack(); //squishes everything into the preferredSize.\n\t\t\n\t\ttry {\n\t\t\tBufferedImage logo = ImageIO.read(Game.class.getResourceAsStream(\"/resources/logo.png\"));\n\t\t\tframe.setIconImage(logo);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tframe.setLocationRelativeTo(null); // the window will pop up in the middle of the screen when launched.\n\t\t\n\t\tframe.addComponentListener(new ComponentAdapter() {\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tfloat w = frame.getWidth() - frame.getInsets().left - frame.getInsets().right;\n\t\t\t\tfloat h = frame.getHeight() - frame.getInsets().top - frame.getInsets().bottom;\n\t\t\t\tRenderer.SCALE = Math.min(w / Renderer.WIDTH, h / Renderer.HEIGHT);\n\t\t\t}\n\t\t});\n\t\t\n\t\tframe.addWindowListener(new WindowListener() {\n\t\t\tpublic void windowActivated(WindowEvent e) {}\n\t\t\tpublic void windowDeactivated(WindowEvent e) {}\n\t\t\tpublic void windowIconified(WindowEvent e) {}\n\t\t\tpublic void windowDeiconified(WindowEvent e) {}\n\t\t\tpublic void windowOpened(WindowEvent e) {}\n\t\t\tpublic void windowClosed(WindowEvent e) {System.out.println(\"window closed\");}\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.out.println(\"window closing\");\n\t\t\t\tif(isConnectedClient())\n\t\t\t\t\tclient.endConnection();\n\t\t\t\tif(isValidServer())\n\t\t\t\t\tserver.endConnection();\n\t\t\t\t\n\t\t\t\tquit();\n\t\t\t}\n\t\t});\n\t\t\n\t\tframe.setVisible(true);\n\t}",
"public void setupOpenGL() {\n try {\n PixelFormat pixelFormat = new PixelFormat();\n ContextAttribs contextAtrributes = new ContextAttribs(3, 2)\n .withForwardCompatible(true)\n .withProfileCore(true);\n\n DisplayMode displayMode = new DisplayMode(WIDTH, HEIGHT);\n Display.setDisplayMode(displayMode);\n Display.setTitle(WINDOW_TITLE);\n Display.create(pixelFormat, contextAtrributes);\n\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n } catch (LWJGLException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n // Setup an XNA like background color\n GL11.glClearColor(0.4f, 0.6f, 0.9f, 0f);\n\n // Map the internal OpenGL coordinate system to the entire screen\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n\n this.exitOnGLError(\"Error in setupOpenGL\");\n }",
"public GameWindow() {\n\t\tthis.initWindow();\n\t}",
"protected WorldWindow createWorldWindow() {\n\t\treturn new WorldWindowGLJPanel();\r\n\t\t//return new WorldWindow();\r\n\t}",
"public void createWindow(int x, int y, int width, int height, int bgColor, String title, String displayText) {\r\n\t\tWindow winnie = new Window(x, y, width, height, bgColor, title);\r\n\t\twinnie.add(displayText);\r\n\t\twindows.add(winnie);\r\n\t}",
"public static void createDisplay() {\n ContextAttribs attribs = new ContextAttribs(3, 2).withForwardCompatible(true)\n .withProfileCore(true);\n\n try {\n if (!goFullscreen) {\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\n } else {\n Display.setFullscreen(true);\n }\n Display.create(new PixelFormat(), attribs);\n Display.setVSyncEnabled(true);\n Display.setTitle(\"Our First Display!\");\n GL11.glEnable(GL13.GL_MULTISAMPLE);\n } catch (LWJGLException e) {\n e.printStackTrace();\n }\n\n GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());\n lastFrameTime = getCurrentTime();\n }",
"public void buildGraphicalObjects()\n\t{\n\t\ttry\n\t\t{\n\t\t\tDisplay.setDisplayMode(new DisplayMode(this.WINDOW_DIMENSION, this.WINDOW_DIMENSION));\n\t\t\tDisplay.create();\n\t\t}\n\t\tcatch(LWJGLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tDisplay.destroy();\n\t\t}\n\t\t\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\t//Not sure what this does but apparently it's \"Not important\"\n\t\tGL11.glLoadIdentity();\n\t\t//Initialize the orthoprojection so upper left corner is 0x0y, \n\t\t//Param 1 : zero X coordinate: 0.\"Left\"\n\t\t//Param 2 : max X coordinate: \"width\" constant \"Right:\n\t\t//Param 3 : zero Y coordinate: 0 \"Bottom\"\n\t\t//Param 4 : max Y coordinate: \"height\" constant \"top\n\t\t//Param 5&6 are used for 3d, so set to +/- 1 for now.\n\t\tGL11.glOrtho(0,this.WINDOW_DIMENSION, this.WINDOW_DIMENSION, 0, 1,-1);\n\t\t//No explanation here. I guess it defines how openGL renders the objects\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\t\n\t}",
"private void GameWindowInit() {\n\t\tGameWindow gameWindow = new GameWindow();\n\t\tadd(gameWindow);\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t\tsetVisible(true);\n\t}",
"private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }",
"NativeWindow createWindow(CreationParams p);",
"private void makeWindow() {\n\t\tpack();\n\t\tsetTitle(\"Pokemon Game\");\n\t\tsetLocationRelativeTo(null); // center this window on the screen\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE); // when this window is closed, exit this application\n\t\tsetVisible(true); \n\t}",
"private void setWindow()\r\n {\n this.setTitle(\"MemoryGame\");\r\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n this.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);\r\n this.setVisible(true);\r\n }",
"private void initDisplay() throws LWJGLException {\n\n\t\tDisplay.setDisplayMode(Display.getDesktopDisplayMode());\n\t\tDisplay.setFullscreen(true);\n\t\twidth = Display.getDisplayMode().getWidth();\n\t\theight = Display.getDisplayMode().getHeight();\n\t\tDisplay.create();\n\t\tDisplay.setVSyncEnabled(true);\n\t}",
"public void start() {\r\n try {\r\n // Using command line args instead \r\n // System.setProperty(\"org.lwjgl.librarypath\", new File(\"lib/lwjgl-2.9.2/native/windows\").getAbsolutePath());\r\n createWindow();\r\n initGL();\r\n render();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private void setup2DGraphics() {\n\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\t\tGL11.glOrtho(0, width, 0, height, 1, -1);\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move through the string looking for negations | private String MoveNegationsInward(String string) {
for ( int i = 0; i < string.length(); i++){
// Remove double negation
if (string.charAt(i) == '~' && string.charAt(i+1) == '~'){
string = string.substring(0,i) + string.substring(i+2);
}
// Distribute negations
if (string.charAt(i) == '~' && string.charAt(i+1) == '('){
//Remove the negation
string = string.substring(0,i) + "(~"+string.substring(i+2);
int right = 1;
int rightIndex = i+2;
//Distribute the negation over the next expression according to DeMorgan's laws
int j = 0;
for ( j = 1; i+j < string.length() && right != 0; j++){
if (string.charAt(i+j) == '('){
right++;
continue;
}
if (right == 1){
//Move within the brackets and change | to & and vice versa. Also add ~
if (string.charAt(i+j) == '|' || string.charAt(i+j) == '&'){
//string = string.substring(0,rightIndex)+MoveNegationsInward(string.substring(rightIndex,i+j))+string.substring(i+j);
if (string.charAt(i+j) == '|'){
string = string.substring(0,i+j)+"&"+string.substring(i+j+1);
} else if (string.charAt(i+j) == '&'){
string = string.substring(0,i+j)+"|"+string.substring(i+j+1);
}
string = string.substring(0, i+j+1)+"~"+string.substring(i+j+1);
string = string.substring(0,rightIndex)+MoveNegationsInward(string.substring(rightIndex,i+j+1))+string.substring(i+j+1);
}
}
if (string.charAt(i+j) == ')'){
right--;
continue;
}
}
}
}
//System.out.println("Returning: "+string);
return string;
} | [
"public static String negation(String s) {\r\n \tif(s.charAt(0) == '~') s = s.substring(1);\r\n\t\telse s = \"~\"+ s;\r\n \treturn s;\r\n }",
"@Override\n public CharMatcher negate() {\n return new Negated(this);\n }",
"private boolean isNegative(String sentence) {\n if (sentence.contains(\" not \") || sentence.contains(\" no \") || sentence.contains(\" non \") ||\n sentence.contains(\" not-\") || sentence.contains(\" no-\") || sentence.contains(\" non-\") ||\n sentence.contains(\" dont \") || sentence.contains(\" don't \") || sentence.contains(\" didn't \") ||\n sentence.contains(\" n't \") || sentence.contains(\" never \")) {\n return true;\n }\n else if (sentence.startsWith(\"not \") || sentence.startsWith(\"no \") || sentence.startsWith(\"non \") ||\n sentence.startsWith(\"not-\") || sentence.startsWith(\"no-\") || sentence.startsWith(\"non-\") ||\n sentence.startsWith(\"dont \") || sentence.startsWith(\"don't \") || sentence.startsWith(\"didn't \") ||\n sentence.startsWith(\"n't \") || sentence.startsWith(\"never \")) {\n return true;\n }\n return false;\n }",
"public ArrayList NegativeSentenceDetection() {\n String phraseNotation = \"RB|CC\";//@\" + phrase + \"! << @\" + phrase;\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n ArrayList negativeLists = new ArrayList();\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n for (Tree inChild : innerChild) {\n negativeLists.add(inChild.getLeaves().get(0).yieldWords().get(0).word());\n }\n }\n return negativeLists;\n }",
"public void testNegativeLookahead(){\n String inputText = \"this will match a so long as it does not follow as 'ab'. Anything after\" +\n \"is still fair game to be matched with the same criteria.\";\n String negativeLookahead = \"a(?!b)\";\n\n boolean doesMatch = Pattern.matches(negativeLookahead, inputText);\n assertEquals(true, doesMatch);\n }",
"public static int checkNegation(FragmentAnnotation fragment) {\n\t\t\n\t\tString negationPattern = \"(no|non|not|n't|kein|keine|keinen|nein|nessun|nessuna|nessuno)\";\n\n\t\tint negationPos = -1;\n\t\tString text = fragment.getCoveredText();\n\t\t\n\t\tPattern p = Pattern.compile(\"\\\\b\" + negationPattern + \"\\\\b\",Pattern.CASE_INSENSITIVE);\n\t\tMatcher m = p.matcher(text);\n\n\t\tif (m.find()) {\t\t\t\n\t\t\tnegationPos = text.indexOf(m.group(1));\n\t\t}\n\t\t\n\t\treturn negationPos;\n\t}",
"private void parseNotExp()\r\n {\r\n parseAtomExp();\r\n while (current.kind == Kind.TOKEN_DOT || current.kind == Kind.TOKEN_LBRACK) {\r\n if (current.kind == Kind.TOKEN_DOT) {\r\n advance();\r\n if (current.kind == Kind.TOKEN_LENGTH) {\r\n advance();\r\n return;\r\n }\r\n eatToken(Kind.TOKEN_ID);\r\n eatToken(Kind.TOKEN_LPAREN);\r\n parseExpList();\r\n eatToken(Kind.TOKEN_RPAREN);\r\n } else {\r\n advance();\r\n parseExp();\r\n eatToken(Kind.TOKEN_RBRACK);\r\n }\r\n }\r\n return;\r\n }",
"public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD bdd;\n \n bdd = a.not();\n \n a.free();\n \n return bdd;\n }\n }",
"protected String stripNegativeContraction(String word)\n\t{\n\t\tString root = irregularVerbContractions.get(word);\n\t\tif (root != null) return root;\n\n\t\tint x = word.length() - 3;\n\t\tif (x > 0 && word.substring(x).equals(\"n't\"))\n\t\t{\n\t\t\treturn word.substring(0, x);\n\t\t}\n\t\treturn word;\n\t}",
"public boolean doubleNegative(String review){\n String noSpaceReview = review.replaceAll(\"\\\\s+\", \"\").toLowerCase();\n\n for(String str : sentences){\n str = str.replaceAll(\"\\\\s+\", \"\");\n if(noSpaceReview.contains(str)){\n return true;\n }\n }\n return false;\n }",
"private boolean isNegative(String number){\n return number.startsWith(MINUS_SIGN);\n }",
"public Object visitBitwiseNegationExpression(GNode n) {\n Object a, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n \n dostring = false;\n \n if (a instanceof Long) {\n result = ~ (Long) a;\n }\n else {\n return \"~ \" + parens(a);\n }\n \n return result;\n }",
"public String notReplace(String str) {\n if (str.length() < 2) return str;\n str = str + \" \";\n for (int i = 0; i <= str.length() - 2; i++){\n if (str.substring(i, i+2).equals(\"is\")){\n if (i == 0 || !Character.isLetter(str.charAt(i-1))){\n if (Character.isLetter(str.charAt(i+2))){\n break;\n }else{\n str = str.substring(0, i) + \"is not\" + str.substring(i+2);\n }\n }\n }\n }\n return str.trim();\n}",
"private static boolean isNegationWordDE(String word){\r\n\t\tList<String> negationWords = Arrays.asList(new String [] {\"kein\", \"keins\", \"keine\", \"keinem\", \"keinem\", \"keiner\", \"keins\", \"keinerlei\", \"nicht\", \"nichts\", \"ohne\"});\r\n\t\treturn negationWords.contains(word);\r\n\t}",
"boolean getNegated();",
"public boolean isMatchNegated() {\n return matchNegated;\n }",
"boolean isNegated();",
"TextStyle negate();",
"public abstract boolean skipString(String s) throws IOException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stampa l'indirizzo IP e la porta del client, il messaggio di PING e l'azione intrapresa dal server in seguito alla sua ricezione (PING non inviato,oppure PING ritardato di x ms). | public void stampaOK(){
System.out.println("IP: " + client_ip + " Port: " + client_port + " " + messaggio);
System.out.println("PING inviato dopo: " + latency);
} | [
"private void ping()\n {\n pinged = false;\n if(client != null){client.send_message(\"{\\\"type\\\": \\\"PING\\\"}\");}\n }",
"private void startPingTimer() {\n\n Timer timer = new Timer();\n TimerTask task = new TimerTask() {\n @Override\n public void run() {\n\n if (pong) {\n send(\"<ping/>\");\n pong = false;\n } else {\n System.out.println(\"[CLIENT] No pong received. Client will now be disconnected.\");\n clientController.onMissingPong();\n closeConnection();\n timer.cancel();\n }\n\n }\n };\n timer.scheduleAtFixedRate(task, 0, 20000);\n\n }",
"public void setPongRespondIP(IPAddress ip) {\n this.ip = ip;\n }",
"public static void sendPingRequest(String ipAddress)\n throws UnknownHostException, IOException {\n ArrayList<Long> time=new ArrayList<>();\n InetAddress geek = InetAddress.getByName(ipAddress);\n System.out.println(\"Sending Ping Request to \" + ipAddress);\n long currentTime = System.currentTimeMillis();\n\n if (InetAddress.getByName(ipAddress).isReachable(5000) ) {\n System.out.println(\"pinged successfully in \" + currentTime );\n currentTime = System.currentTimeMillis() - currentTime;\n time.add(currentTime);\n } else {\n System.out.println(\"PIng failed.\");\n return;\n }\n printMedian(time);\n }",
"public void ping() throws Exception {\n try {\n // buffer up a nonce request\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PingItem.writeRequest(true, baos);\n // write the id\n long id = RemoteTrancheServer.getNextId();\n // make the output\n OutGoingBytes ogb = new OutGoingBytes(id, baos.toByteArray(), OutGoingBytes.PING);\n // make the callback\n CheckForErrorCallback cfec = new CheckForErrorCallback(id, this, \"Ping.\");\n // add the callback to the queue\n addCallback(id, cfec);\n // add the bytes to send\n addToQueue(ogb);\n // notify the listeners\n fireCreatedBytesToUpload(id, ogb.bytes.length);\n // waits for the response from the server\n cfec.checkForError();\n } catch (Exception e) {\n debugErr(e);\n ConnectionUtil.reportExceptionHost(host, e);\n throw e;\n }\n }",
"public void ping()\t\r\n\t{\r\n\t\tif(!client.ping(2000))\r\n\t\t{\r\n\t\t\tSystem.out.println(this.serverUri + \" doesn't respond to ping, exiting...\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(this.serverUri + \" responds to ping\");\r\n\t\t}\r\n\t}",
"public void recordPingTime(long now) {\n pingTime = now;\n }",
"private void icmpInTimestamps() {\n\n String icmpIncommingTimestamps = \"\";\n int totalDatagrams = Integer.parseInt(ipInReceives());\n\n // 89% of datagrams are successful\n icmpIncommingTimestamps = String.valueOf((int)(totalDatagrams * .89));\n\n oidValues.put(\".1.3.6.1.2.1.5.10\", icmpIncommingTimestamps);\n }",
"public void pingToClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n try {\n socketOut.writeObject(\"\");\n } catch (IOException e) {\n //e.printStackTrace();\n }\n }\n });\n t.start();\n }",
"public void onPing();",
"private void sendPingMessages() {\n List<ID> members = lastView.getMembers();\n for (ID addr : members) {\n if (!receivedAcks.contains(addr)) {\n JGAddress dest = new JGAddress(addr);\n if (isInfoEnabled) {\n logger.info(\"quorum check: sending request to {}\", addr);\n }\n try {\n pingPonger.sendPingMessage(channel, myAddress, dest);\n } catch (Exception e) {\n logger.info(\"Failed sending Ping message to \" + dest);\n }\n }\n }\n }",
"private MeasureResult doTCPPing(String ip){\n \tMeasureResult result = new MeasureResult(ip);\n \tlong[] delays = new long[5];\n \tint errorCount = 0;\n\t\ttry{\n\t\t\tfor(int i=0; i<5; i++){\n\t\t\t\tlong t1 = System.currentTimeMillis();\n\t\t\t\tSocket socket = new Socket();\n\t\t\t\ttry{\n\t\t\t\t\tsocket.connect(new InetSocketAddress(ip, 80), 1000);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\terrorCount++;\n\t\t\t\t}\n\t\t\t\tlong t2 = System.currentTimeMillis();\n\t\t\t\tsocket.close();;\n\t\t\t\tdelays[i] = t2 - t1;\n\t\t\t\t//NetProphetLogger.logDebugging(\"doTCPPing\", \"rs1: \"+delays[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tNetProphetLogger.logError(\"doTCPPing\",e.toString());\n\t\t\te.printStackTrace();\n\t\t\terrorCount = 5;\n\t\t}\n\t\t\n\t\tresult.lossRate = (float) (((float)errorCount/5.0) * 100.0);\n\t\tint tmp = 0;\n\t\tfor(int i=0; i<5; i++)\n\t\t\ttmp += delays[0];\n\t\tresult.avgDelay = tmp / 5;\n\t\treturn result;\n\t\n }",
"private static void unicast_send(int id, String msg) throws IOException {\n\n \tSocket socket = new Socket(IPs.get(id), Ports.get(id));\n\n try(PrintWriter out = new PrintWriter(socket.getOutputStream(), true)){\n \tout.println(serverId + \" \" + msg);\n \tSystem.out.println(\"Sent \"+ msg +\" to process \"+ id +\", system time is ΒΒΒΒΒΒΒΒΒΒΒΒΒ\"+ new Timestamp(System.currentTimeMillis()).toString());\n }\n socket.close();\n }",
"private String getServerIP() {\r\n\t\tString serverIP = \"192\" + \".\" + \"168\" + \".\" + j + \".\" + i;\r\n\t\tif (i < 255) {\r\n\t\t\ti++;\r\n\t\t\tserverCount++;\r\n\t\t} else {\r\n\t\t\ti = 0;\r\n\t\t\tj++;\r\n\t\t}\r\n\t\treturn serverIP;\r\n\t}",
"public long getPing()\n\t{\n\t\t\n\t\treturn clientPing;\n\t\t\n\t}",
"static void ping (String socket) {\n\t\tSystem.out.println(\"You are trying to ping: \"+socket);\n\t}",
"private void reportStatsOnClient(Socket socket, int n){\n InetAddress addr = socket.getInetAddress();\n report(\"client \" + n + \"'s host name is \" + addr.getHostName());\n report(\"client \" + n + \"'s IP Address is \" + addr.getHostAddress());\n report(\"starting thread for client \" + n + \" at \" + \n LocalDateTime.now().format(FORMATTER));\n }",
"private void processPongPacket(){\n if (!server.isCoordinator()) {\n server.setTimeElapsed(0);\n server.setWaitingOnReply(false);\n }\n }",
"public void sendHeartbeat();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the material folder control. | @FxThread
private @NotNull ChooseFolderControl getMaterialFolderControl() {
return notNull(materialFolderControl);
} | [
"public static String getMediaFolderName() {\n\treturn ResourceLoader.getString(\"NAME_MEDIA_FOLDER\");\n }",
"public Composite getCurrentFolderComposite(){\r\n\t\tif(compositeMap.get(compositeIndex) == null){\r\n\t\t\tComposite composite = new Composite(folderReference, SWT.NONE);\r\n\t\t\tGridLayout fillLayout = new GridLayout(1, true);\r\n\t\t\tGridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);\r\n\t\t\t\r\n\t\t\tcomposite.setLayout(fillLayout);\r\n\t\t\tcomposite.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tcompositeMap.put(compositeIndex, composite);\r\n\t\t}\r\n\t\t\r\n\t\treturn compositeMap.get(compositeIndex);\r\n\t}",
"public BoxFolder getFolder() {\n return mFolder;\n }",
"public Folder getFolder() {\n\t\treturn folder;\n\t}",
"public File getWorldFolder() {\r\n return storageProvider.getFolder();\r\n }",
"public String getFolderName() {\r\n return folderName;\r\n }",
"public String getFolderName() {\r\n return folderName;\r\n }",
"public FolderItemEditor getEditor();",
"private JPanel getDirectoryPanel() {\n\t\tif (directoryPanel == null) {\n\t\t\tdirectoryPanel = new JPanel();\n\t\t\tdirectoryPanel.add(getBtnCreateDirectory());\n\t\t\tdirectoryPanel.add(getBtnRenameDirectory());\n\t\t}\n\t\treturn directoryPanel;\n\t}",
"public String getDBFolder ( ) {\r\n\t\treturn \"mag\";\r\n\t}",
"protected ResourceReference getFolderOpen()\n\t{\n\t\treturn FOLDER_OPEN;\n\t}",
"private Folder getFolder(PageContext pageContext){\n\t\treturn (Folder) pageContext.getAttribute(AttributeConst.FOLDER, PageContext.REQUEST_SCOPE);\n\t}",
"Folder getDropTargetFolder(IsWidget widget, Element el);",
"public Object folderPath() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().folderPath();\n }",
"String getFolderAsString();",
"public Path getIvmlFolder() {\n return createPathWithFallback(ModelKind.IVML);\n }",
"public Path getVilFolder() {\n return createPathWithFallback(ModelKind.VIL);\n }",
"java.lang.String getECMFolderType();",
"java.lang.String getFolderId();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function to call Vacation_grant scenarios sheet Created by Gandhi Date Created: 03/18/19 Usage:NVacation_grant changes | public void Vacation_grant() throws Throwable {
String pass = "Vacation_grant";
Vacation_grnt(pass);
} | [
"public void Vacation_grnt(String Grant) throws Throwable\r\n\r\n\t{\r\n\t\tString supid = \"\";\r\n\t\tString tempsupid = \"\";\r\n\t\tString Emp = \"\";\r\n\r\n\t\tString exp = \"\";\r\n\t\tString TCN =\"\";\r\n\t\tString SeniorityDate =\"\";\r\n\t\tString Benefit = \"\";\r\n\r\n\t\t// String employee = \"\";\r\n\t\tExcelRead Vacation_grant = new ExcelRead(sTDFileName, Grant);\r\n\t\tWebDriverWait wait = new WebDriverWait(oBrowser, 500);\r\n\t\t// Validate if Timesheet link exist\r\n\t\t// Loops through each row in excel sheet\r\n\t\tint inofRows = Vacation_grant.rowCount();\r\n\t\tSystem.out.println(\"Total number of rows are :\" + inofRows);\r\n\t\tfor (int i = 1; i < inofRows; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tTCN = Vacation_grant.getCellData(\"TEST#\", i);\r\n\t\t\t\tSystem.out.println(TCN);\r\n\t\t\t\tsupid = Vacation_grant.getCellData(\"SupID\", i);\r\n\t\t\t\tSystem.out.println(supid);\r\n\t\t\t\tSystem.out.println(tempsupid);\r\n\t\t\t\tif (!supid.equals(tempsupid)) {\r\n\t\t\t\t\tSystem.out.println(\"Inside\");\r\n\t\t\t\t\tif (i > 1) {\r\n\t\t\t\t\t\toBrowser.switchTo().defaultContent();\r\n\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.logOut_xp)).click();\r\n\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.confirm_xp)).click();\r\n\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttempsupid = supid; \r\n\t\t\t\t\t// Enter User ID\r\n\t\t\t\t\tSystem.out.println(\"***\");\r\n\t\t\t\t\t// Enter User ID\r\n\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.uID_xp)).clear();\r\n\t\t\t\t\tsetText(oUIObj.uID_xp, Vacation_grant.getCellData(\"SupID\", i));\r\n\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Sign In\", \"Validate Sign In\",\r\n\t\t\t\t\t\t\t\"UserName entered as \" + Vacation_grant.getCellData(\"SupID\", i));\r\n\t\t\t\t\t// Enter Password\r\n\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.password_xp)).clear();\r\n\t\t\t\t\tsetText(oUIObj.password_xp, Vacation_grant.getCellData(\"SupPass\", i));\r\n\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Sign In\", \"Validate Sign In\",\r\n\t\t\t\t\t\t\t\"Password entered as \" + Vacation_grant.getCellData(\"SupPass\", i));\r\n\t\t\t\t\t// oBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t// Clicking on SignIn\r\n\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\tcontrolClick(oUIObj.signIn_xp, \"SignIn Button\");\r\n\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Sign In\", \"Validate Sign In\", \"Clicked on Signin Button\");\r\n\t\t\t\t\tEmp = Vacation_grant.getCellData(\"Employee\", i);\r\n\t\t\t\t\t// Call timesheet function\r\n\t\t\t\t\t//timeSheetAK();\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tif(oBrowser.findElement(By.xpath(oUIObj.uiTimeSheet_xp)).isDisplayed())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tWebElement timesheet=oBrowser.findElement(By.xpath(oUIObj.uiTimeSheet_xp));\r\n\t\t\t\t\t\t\thighlightElement(timesheet);\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.uiTimeSheet_xp)).click();\r\n\t\t\t\t\t\t\t//Enter Employee number\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tcSideframe();\r\n\t\t\t\t\t\t\tsetText(oUIObj.UIemployeeTS_xp, Emp);\r\n\t\t\t\t\t\t\tcontrolClick(oUIObj.uiLoad_xp,\"Load Button\");\r\n\t\t\t\t\t\t\tThread.sleep(1500);\r\n\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Load\", \"Validate Load\",\"Clicked on Load Button\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\t\tSystem.out.println(\"Load Button is not displayed\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Enter Empolyee clock-in information\r\n\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\toBrowser.switchTo().defaultContent();\r\n\t\t\t\tcSideframe(); \r\n\t\t\t\t// Loading Employee number\r\n\t\t\t\tEmp = Vacation_grant.getCellData(\"Employee\", i);\r\n\t\t\t\tif (!(Emp.equals(\"\"))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\toBrowser.switchTo().defaultContent();\r\n\t\t\t\t\t\toBrowser.switchTo().frame(oBrowser.findElement(By.id(\"contentFrame\")));\r\n\t\t\t\t\t\tSystem.out.println(\"Entered into content frame\");\r\n\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t// oBrowser.findElement(By.xpath(oUIObj.uiEmployeeAllinput_xp)).sendKeys(Emp);\r\n\t\t\t\t\t\tSystem.out.println(\"Enter Employee Id\");\r\n\t\t\t\t\t\tsetText(oUIObj.uiLoadEmptxt_xp, Emp);\r\n\r\n\t\t\t\t\t\tSystem.out.println(\"click on Timesheets Load button\");\r\n\t\t\t\t\t\tcontrolClick(oUIObj.uiLoadH_xp, \" Load button\");\r\n\t\t\t\t\t\tThread.sleep(1500);\r\n\t\t\t\t\t\tSystem.out.println(\"Pass:Employee selected successfully\");\r\n\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Employee\", \"Validate Employee\",\r\n\t\t\t\t\t\t\t\t\"successfully selected employee\" + Emp + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\t\t\t\tcontrolClick(oUIObj.UIEmployeeinfor_xp, \"link\");\r\n\t\t\t\t\t\tBenefit = Vacation_grant.getCellData(\"Benefit Code\", i);\r\n\t\t\t\t\t\tSystem.out.println(\"Benefit value \" + Benefit);\r\n\t\t\t\t\t\tif (!Benefit.equals(\"\")) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Enter emp Benefit value\");\r\n\t\t\t\t\t\t\t\tsetText(oUIObj.UIEmpBenefit_xp, Benefit);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Pass:Entered Benefit successfully\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Benefit\", \"Validate Benefit\",\r\n\t\t\t\t\t\t\t\t\t\t\"successfully Entered Benefit as\" + Benefit + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Fail: Unable to enter Benefit\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"Benefit\", \"Validate Benefit\",\r\n\t\t\t\t\t\t\t\t\t\t\"Failed to enter Benefit as\" + Benefit + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\tSeniorityDate = Vacation_grant.getCellData(\"Seniority Date\", i);\r\n\t\t\t\t\t\tSystem.out.println(\"SeniorityDate \" +SeniorityDate);\r\n\t\t\t\t\t\tif (!SeniorityDate.equals(\"\")) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Enter emp SeniorityDate\"); \r\n\t\t\t\t\t\t\t\tWebElement hiredate = oBrowser.findElement(By.xpath(oUIObj.UISeniorityDate_xp));\r\n\t\t\t\t\t\t\t\tActions act = new Actions(oBrowser);\r\n\t\t\t\t\t\t\t\tact.click(hiredate).sendKeys(Keys.chord(Keys.CONTROL, \"a\")).build().perform();\r\n\t\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UISeniorityDate_xp)).sendKeys(SeniorityDate);\r\n\t\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\t\thiredate.sendKeys(Keys.TAB);\r\n\t\t\t\t\t\t\t\tThread.sleep(1500); \r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Pass:Entered SeniorityDate successfully\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"SeniorityDate\", \"Validate SeniorityDate\",\r\n\t\t\t\t\t\t\t\t\t\t\"successfully Entered SeniorityDate as\" + SeniorityDate + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Fail: Unable to enter SeniorityDate\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"SeniorityDate\", \"Validate SeniorityDate\",\r\n\t\t\t\t\t\t\t\t\t\t\"Failed to enter SeniorityDate as\" + SeniorityDate + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString DailyAvgHours = Vacation_grant.getCellData(\"Daily Average Hours\", i);\r\n\t\t\t\t\t\tSystem.out.println(\"DailyAvgHours \");\r\n\t\t\t\t\t\tif (!DailyAvgHours.equals(\"\")) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Enter emp DailyAvgHours\");\r\n\t\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UI_AvgDailyHours_xp)).clear();\r\n\t\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UI_AvgDailyHours_xp)).sendKeys(DailyAvgHours);\r\n\t\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\t\t//setText(oUIObj.UISick_xp, StartSick);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Pass:Entered DailyAvgHours successfully\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"DailyAvgHours\", \"Validate DailyAvgHours\",\r\n\t\t\t\t\t\t\t\t\t\t\"successfully Entered DailyAvgHours as\" + DailyAvgHours + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Fail: Unable to enter DailyAvgHours\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"DailyAvgHours\", \"Validate DailyAvgHours\",\r\n\t\t\t\t\t\t\t\t\t\t\"Failed to enter DailyAvgHours as\" + DailyAvgHours + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString OverrideStart = Vacation_grant.getCellData(\"Override Start\", i);\r\n\t\t\t\t\t\tSystem.out.println(\"OverrideStart \");\r\n\t\t\t\t\t\tif (!OverrideStart.equals(\"\")) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Enter emp OverrideStart\"); \r\n\t\t\t\t\t\t\t\tWebElement overridestart = oBrowser.findElement(By.xpath(oUIObj.UIoverridestartdate_xp));\r\n\t\t\t\t\t\t\t\tActions act = new Actions(oBrowser);\r\n\t\t\t\t\t\t\t\tact.click(overridestart).sendKeys(Keys.chord(Keys.CONTROL, \"a\")).build().perform();\r\n\t\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UIoverridestartdate_xp)).sendKeys(OverrideStart);\r\n\t\t\t\t\t\t\t\tThread.sleep(1500);\r\n\t\t\t\t\t\t\t\toverridestart.sendKeys(Keys.TAB);\r\n\r\n\t\t\t\t\t\t\t\t//setText(oUIObj.UIoverridestartdate_xp, OverrideStart);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Pass:Entered OverrideStart successfully\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"OverrideStart\", \"Validate OverrideStart\",\r\n\t\t\t\t\t\t\t\t\t\t\"successfully Entered OverrideStart as\" + OverrideStart + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Fail: Unable to enter OverrideStart\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"OverrideStart\", \"Validate OverrideStart\",\r\n\t\t\t\t\t\t\t\t\t\t\"Failed to enter OverrideStart as\" + OverrideStart + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString InitialVacation = Vacation_grant.getCellData(\"Initial Vacation\", i);\r\n\t\t\t\t\t\tSystem.out.println(\"InitialVacation \");\r\n\t\t\t\t\t\tif (!InitialVacation.equals(\"\")) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Enter emp InitialVacation\");\r\n\t\t\t\t\t\t\t\tsetText(oUIObj.UIEmpInitVac_xp, InitialVacation);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Pass:Entered InitialVacation successfully\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"InitialVacation\", \"Validate InitialVacation\",\r\n\t\t\t\t\t\t\t\t\t\t\"successfully Entered InitialVacation as\" + InitialVacation + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Fail: Unable to enter InitialVacation\");\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"InitialVacation\", \"Validate InitialVacation\",\r\n\t\t\t\t\t\t\t\t\t\t\"Failed to enter InitialVacation as\" + InitialVacation + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcontrolClick(oUIObj.UIEmpBasicsubmit_xp, \"submit button\");\r\n\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Submit in employee\",\r\n\t\t\t\t\t\t\t\t\"Validate Submit button in employee details screen\",\r\n\t\t\t\t\t\t\t\t\"successfully Entered employee details as\" + \" for the TC-\"\r\n\t\t\t\t\t\t\t\t\t\t+ TCN); \r\n\t\t\t\t\t} \r\n\t\t\t\t\tcatch (Exception e) { \r\n\t\t\t\t\t} \r\n\t\t\t\t\tString Dates = Vacation_grant.getCellData(\"Check Date\", i);\r\n\t\t\t\t\tif (!(Dates.equals(\"\")))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.uIEmpDate_xp)).click();\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tWebElement frame1 = oBrowser.findElement(By.id(\"wb_expandableframe1\"));\r\n\t\t\t\t\t\t\toBrowser.switchTo().frame(frame1);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Entered into sub frame in content frame\");\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tWebElement TimeCodeTY = oBrowser.findElement(By.xpath(oUIObj.UIStart_xp));\r\n\t\t\t\t\t\t\tActions act = new Actions(oBrowser);\r\n\t\t\t\t\t\t\tact.click(TimeCodeTY).sendKeys(Keys.chord(Keys.CONTROL, \"a\")).build().perform();\r\n\t\t\t\t\t\t\tSystem.out.println(\"Start date cleared\");\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tSystem.out.println(\"++SDay+++\" + Dates);\r\n\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UIStart_xp)).sendKeys(Dates);\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tTimeCodeTY.sendKeys(Keys.TAB);\r\n\t\t\t\t\t\t\tWebElement TimeCodeTY1 = oBrowser.findElement(By.xpath(oUIObj.UIEnd_xp));\r\n\t\t\t\t\t\t\tActions act1 = new Actions(oBrowser);\r\n\t\t\t\t\t\t\tact1.click(TimeCodeTY1).sendKeys(Keys.chord(Keys.CONTROL, \"a\")).build().perform();\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tSystem.out.println(\"End date cleared\");\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tSystem.out.println(\"++SDay+++\" + Dates);\r\n\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UIEnd_xp)).sendKeys(Dates);\r\n\t\t\t\t\t\t\tSystem.out.println(\"date range entered successfully\");\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.UILoadinSubFrm_xp)).click();\r\n\t\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t\t\t\t\tcSideframe();\r\n\r\n\t\t\t\t\t\t\tSystem.out.println(\"PASS: added Strat and End dates successfully for TC-\" + TCN + \" -\" + Dates + Dates);\r\n\t\t\t\t\t\t\tselectReport.ReportStep(\"PASS\", \"Validate Start & End dates\", \"Start + End dates added\",\r\n\t\t\t\t\t\t\t\t\t\"Added Start & End dates successfully for TC-\" + TCN + \" -\" + Dates + Dates);\r\n\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Fail:Not added Strat and End dates successfully for TC-\" + TCN + \" -\" + Dates + Dates);\r\n\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"Validate Strat and End dates\",\r\n\t\t\t\t\t\t\t\t\t\"Strat and End dates should add\",\r\n\t\t\t\t\t\t\t\t\t\"Not Added Strat and End dates successfully for TC-\" + TCN + \" -\" + Dates + Dates);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcSideframe();\t\t\t \t\t\t\t\r\n\t\t\t\t\toBrowser.findElement(By.xpath(oUIObj.uiSubmitClockBtn_xp)).click(); \t\t\t\t\r\n\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\t\t\tcontrolClick(oUIObj.UIEmployeeinfor_xp, \"link\");\r\n\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\r\n\t\t\t\t\texp = Vacation_grant.getCellData(\"Expected VAC\", i);\r\n\r\n\t\t\t\t\tif (!exp.equals(\"\")) {\r\n\t\t\t\t\t\tSystem.out.println(\"Entered into validation\");\r\n\r\n\t\t\t\t\t\tWebElement TargetElement = oBrowser.findElement(By.xpath(oUIObj.UIEmpInitVac_xp));\r\n\t\t\t\t\t\t((JavascriptExecutor) oBrowser).executeScript(\"arguments[0].scrollIntoView(true);\", TargetElement);\r\n\t\t\t\t\t\toBrowser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\t\t\t\tString UiDisplayedValue = \"\";\r\n\t\t\t\t\t\tUiDisplayedValue = TargetElement.getAttribute(\"value\");\r\n\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Validating Vacation time\", \"Vacation\",\r\n\t\t\t\t\t\t\t\t\"Added Time captured successfully-\" + UiDisplayedValue + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\tSystem.out.println(\"UiExpected ***\" + UiDisplayedValue);\r\n\t\t\t\t\t\tSystem.out.println(\"Result ***\" + exp);\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (UiDisplayedValue.equals(exp)) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Pass:Successfully displayed time afer added -\" + UiDisplayedValue\r\n\t\t\t\t\t\t\t\t\t\t+ \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Pass\", \"Validating ProtectedSickMax time\", \"ProtectedSickMax\",\r\n\t\t\t\t\t\t\t\t\t\t\"Added Time message displayed successfully-\" + UiDisplayedValue + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t\t//oBrowser.switchTo().defaultContent();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Fail:Error Time not displayed as per test data.please verify.\"\r\n\t\t\t\t\t\t\t\t\t\t+ \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"ProtectedSickMax Bal\", \"Added Time should display\",\r\n\t\t\t\t\t\t\t\t\t\t\"Time not displayed as per test data.please verify.\" + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t\t//oBrowser.switchTo().defaultContent();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Fail: in UI and Expected Validation\" + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\tselectReport.ReportStep(\"Fail\", \"Expected and UI SICK time\",\r\n\t\t\t\t\t\t\t\t\t\"Should validate SICK time and Expected\",\r\n\t\t\t\t\t\t\t\t\t\"Failed to update SICK time.Please verify manually\" + \" for the TC-\" + TCN);\r\n\t\t\t\t\t\t\t//oBrowser.switchTo().defaultContent();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\tcontrolClick(oUIObj.UIEmpBasicsubmit_xp, \"submit button\");\r\n\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tSystem.out.println(\"Fail: Cannot Complete NonProtectedSickMaxBal and exception in main\" + \" for the TC-\" + TCN);\r\n\t\t\t\tselectReport.ReportStep(\"Fail\", \"ProtectedSickMax\", \"Validate ProtectedSickMax \",\r\n\t\t\t\t\t\t\"Failed to update ProtectedSickMaxBal.Please verify manually\" + \" for the TC-\" + TCN);\r\n\t\t\t}\r\n\r\n\t\t\tThread.sleep(500);\r\n\r\n\t\t\tDeletealledits();\r\n\t\t}\r\n\t}",
"@When(\"Expand and view Services of selected claim\")\r\n\tpublic void My_medicare_claims_positive_positive_tc_011() throws Exception {\r\n\t\ttry {\r\n\t\t\tclick(\"claims_services_down_arrow\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttakeScreenShot(\"My_medicare_claims_positive_positive_tc_011\");\r\n\t\t}\r\n\t}",
"@Test(enabled = true, priority = 23, groups = {\n \"sanity testing\"\n })\n public void DM_04() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"DM_04\";\n BaseTest.sScriptName = \"DM_04\";\n BaseTest.sOTMTestcaseID = \"39544\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n //Login to the system\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n AF.FnNavigation(getDriver(), \"Deal Dashboard\");\n\n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/DM_Automation_Negotiability_Module.xlsx\";\n String sSheetName = \"TestDataSheet\";\n BaseTest.sTestDescription = \"Deal Management verifications for Negotiability\";\n\n Boolean StartDealFromSearchDealId = false;\n\n String sDealIDCreatedAfterDealCreation = \"8811270919\"; //for Test Resume [5218241303]\n\n\n\n if (StartDealFromSearchDealId == false) {\n //Search entity \n dealManagementPageEvents.FnSearchEntity(103, sSheetName, sWorkbook);\n\n //Deal Creation \n sDealIDCreatedAfterDealCreation = dealManagementPageEvents.FnDealCreation(107, sSheetName, sWorkbook);\n\n System.out.println(\"deal id:-\" + sDealIDCreatedAfterDealCreation);\n\n //Navigation to Deal Information UI from deal creation page\n dealManagementPageEvents.FnNavigationToDealInformationFromDealCreation();\n\n\n //verification of deal information \n dealManagementPageEvents.FnDealInformationVerification(111, sSheetName, sWorkbook);\n\n // price item selection line no 21\n //Search filter options on Select Prize Item group\n dealManagementPageEvents.FnSearchAndSelectPrizeItemgroup(115, sSheetName, sWorkbook);\n dealManagementPageEvents.FnSearchAndSelectPrizeItemgroup(116, sSheetName, sWorkbook);\n\n } else if (StartDealFromSearchDealId == true) {\n\n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(sDealIDCreatedAfterDealCreation); //for Test Resume\n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //for Test Resume\n\n\n }\n\n //Function to Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n \n //NPI_021\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(120, sSheetName, sWorkbook);\n\n //NPI_021\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(131, sSheetName, sWorkbook);\n\n //NPI_032\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(121, sSheetName, sWorkbook); //rate 15\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(122, sSheetName, sWorkbook); //rate 10.99\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(123, sSheetName, sWorkbook); //rate 11\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(124, sSheetName, sWorkbook); //rate 15\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(125, sSheetName, sWorkbook); //rate 20.12\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(126, sSheetName, sWorkbook); //rate 16\n\n //NPI_029\n dealManagementPageEvents.FnVerifyPriceItemsRatesOnPricingAndCommitmentScreen(127, sSheetName, sWorkbook);\n\n //NPI_035\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(132, sSheetName, sWorkbook);\n\n //NPI_036\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(133, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(134, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(135, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(136, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(137, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(139, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(140, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(141, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(142, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPriceItemValidationOnPricingScreen(143, sSheetName, sWorkbook);\n\n\n //Function to Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments(); //28\n\n //Function To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage();\n\n //Function To Send deal for approval\n dealManagementPageEvents.FnSendDealForApprovalFromDealInformation();\n\n\n //Navigate to Deal Approver Dashboard Through PMBK1 user\n AF.FnLoginChange(getDriver(), \"PMBK1\"); //84\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //85\n\n //Function To Search for deal ID created\n //\t\t\t\tdealManagementPageEvents.FnSearchDealIdFromDealDashboard(sDealIDCreatedAfterDealCreation); //for Test Resume\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(sDealIDCreatedAfterDealCreation, false, false, false, \"PMBK1\");\n\n //Function To navigate to deal information from deal approval dashboard page\n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard();\n\n //Function to navigate Pricing & Commitment Screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Recommend NPI_021\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemValidationOnPricingScreen(147, sSheetName, sWorkbook);\n\n //Recommend NPI_030\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemValidationOnPricingScreen(148, sSheetName, sWorkbook);\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemValidationOnPricingScreen(149, sSheetName, sWorkbook);\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemValidationOnPricingScreen(150, sSheetName, sWorkbook);\n\n //Recommend from Pricing screen NPI_030\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemsRatesOnPricingAndCommitmentScreen(154, sSheetName, sWorkbook);\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemsRatesOnPricingAndCommitmentScreen(155, sSheetName, sWorkbook);\n dealManagementPageEvents.FnRecommendAndVerifyPriceItemsRatesOnPricingAndCommitmentScreen(156, sSheetName, sWorkbook);\n\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n }",
"@Test\n\tpublic void TC040DMS_05(){\n\t\tresult.addLog(\"ID : TC040DMS_05 : Verify that the Marketing status is changed to 'REVOKED' when DTS Marketing revokes the marketing materials after approved\");\n\t\t/*\n\t\t\tPre-Condition: The tuning state is approved.\n\t\t\t1. Log into DTS portal as a DTS user\n\t\t\t2. Navigate to \"Accessories\" page\n\t\t\t3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\t\tVP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t\t4. Upload a marketing material file\n\t\t\tVP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t\t5. Expand the \"Partner Actions\" link in step 2 : Marketing Approval\n\t\t\t6. Click \"Request Marketing Review\" link\n\t\t\tVP:Marketing status is changed to \" DTS Review\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed \n\t\t\t7. Click \"Approve Marketing\" link\n\t\t\tVP: Marketing status is changed to \"APPROVED\" and its action is \"Revoke Marketing Approval\" \n\t\t\t8. Click \"Revoke Marketing Approval\" link\n\t\t */\n\t\t/*\n\t\t * Pre-Condition: The tuning state is approved\n\t\t */\n\t\t// Navigate to accessories page\n\t\thome.click(Xpath.LINK_PARTNER_ACCESSORIES);\n\t\t// Click Add Accessory link\n\t\thome.click(AccessoryMain.ADD_ACCESSORY);\n\t\t// Create accessory\n\t\tHashtable<String,String> data = TestData.accessoryTuning();\n\t\thome.addAccessoriesPartner(AddAccessory.getHash(), data);\n\t\t// Approve tuning\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_1);\n\t\thome.click(AccessoryInfo.APPROVE_TUNING);\n\t\t/*\n\t\t * ****************************************************************\n\t\t */\n\t\t// 2. Navigate to \"Accessories\" page\n\t\thome.click(Xpath.linkAccessories);\n\t\t// 3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\thome.selectAnaccessorybyName(data.get(\"name\"));\n\t\t/*\n\t\t * VP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"UNSUBMITTED\");\n\t\t// 4. Upload a marketing material file\n\t\thome.click(AccessoryInfo.EDIT_MODE);\n\t\thome.uploadFile(AddAccessory.ADD_MARKETING, Constant.AUDIO_ROUTE_FILE);\n\t\thome.clickOptionByIndex(AddAccessory.MARKETING_METERIAL_TYPE, 1);\n\t\thome.click(AddAccessory.SAVE);\n\t\t/*\n\t\t * VP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t */\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.PARTNER_ACTIONS_STEP_2));\n\t\t// 5. Expand the \"Partner Actions\" link in step 2: Marketing Approval\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_2);\n\t\t// 6. Click \"Request Marketing Review\" link\n\t\thome.click(AccessoryInfo.REQUEST_MARKETING_REVIEW);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"PENDING DTS REVIEW\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"PENDING DTS REVIEW\");\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.APPROVE_MARKETING));\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.DECLINE_MARKETING));\n\t\t// 7. Click \"Approve Marketing\" link\n\t\thome.click(AccessoryInfo.APPROVE_MARKETING);\n\t\t/*\n\t\t * VP: Marketing status is changed to \"APPROVED\" and its action is \"Revoke Marketing Approval\" \n\t\t */\n\t\tAssert.assertTrue(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS).equalsIgnoreCase(AccessoryInfo.APPROVED));\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_ACTION), \"Revoke Marketing Approval\");\n\t\t// 8. Click \"Revoke Marketing Approval\" link\n\t\thome.click(AccessoryInfo.REVOKE_MARKETING_APPROVAL);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"REVOKED\" and the βPartner Actionsβ with βRequest Marketing Reviewβ links are displayed below\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"REVOKED\");\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.PARTNER_ACTIONS_STEP_2));\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_2);\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_ACTION), \"Request Marketing Review\");\n\t\t// Delete accessory\n\t\thome.doDelete(AccessoryInfo.DELETE);\n\t}",
"@Test(priority = 16, groups = {\n \"sanity testing\"\n })\n public void DealManagement_Test_39767() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"DealManagement_Test_39767\";\n BaseTest.sScriptName = \"DealManagement_Test_39767\";\n BaseTest.sOTMTestcaseID = \"39767\";\n BaseTest.sTestDescription = \"Verify Stacking functionality for the case deal for existing Parent customer with skip reference\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n /*Login to the system*/\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/DealManagement_Test_39767_V1.xlsx\";\n String sSheetName = \"TEST_DATA\";\n\n //Function to update \"Stacking Required\" Option as Y\n dealManagementPageEvents.FnUpdateAlgorithmValue(163, sSheetName, sWorkbook);\n dealManagementPageEvents.FnUpdateAlgorithmValue(164, sSheetName, sWorkbook);\n\n\n String sDateName = CommonFunctions.FnGetUniqueId();\n String sDealIdentifier1 = CF.FnGetCellValue(90, 3, sSheetName, sWorkbook).toString().trim();\n sDealIdentifier1 = sDealIdentifier1 + \"_\" + sDateName;\n\n String ExistingPersonId = CF.FnGetCellValue(90, 2, sSheetName, sWorkbook).toString().trim();\n String sDealType1 = CF.FnGetCellValue(90, 4, sSheetName, sWorkbook).toString().trim();\n String sSimulationType = CF.FnGetCellValue(90, 6, sSheetName, sWorkbook).toString().trim();\n String sStartDate = CF.FnGetCellValue(90, 7, sSheetName, sWorkbook).toString().trim();\n String sPriceSelectionDate = CF.FnGetCellValue(90, 8, sSheetName, sWorkbook).toString().trim();\n String sDealFrequency = CF.FnGetCellValue(90, 10, sSheetName, sWorkbook).toString().trim();\n String sUsageFrequency = CF.FnGetCellValue(90, 11, sSheetName, sWorkbook).toString().trim();\n\n CF.FnTestCaseStatusReport(\"Pass\", \"Deal Start date used for Deal creation Is-> \" + sStartDate);\n\n Thread.sleep(3000);\n \n \n DB.FnUpdateBillableChargeDates(68, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(69, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(70, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(71, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(72, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(73, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(74, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(75, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(76, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(77, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(78, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(79, sSheetName, sWorkbook);\n \n \n\n String sDealId, smodelId, sDealIdentifier = \"\";\n\n //################ Deal Creation IWS ####################//\n String sDealCreation = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"dealDetails\\\":{\\\"dealEntityDetails\\\":{\\\"personId\\\":\\\"\" + ExistingPersonId + \"\\\"},\\\"dealIdentifier\\\":\\\"\" + sDealIdentifier1 + \"\\\",\\\"dealEntityType\\\":\\\"EPER\\\",\\\"contractedDealFlag\\\":\\\"true\\\",\\\"currency\\\":\\\"USD\\\",\\\"dealTypeCode\\\":\\\"\" + sDealType1 + \"\\\",\\\"startDate\\\":\\\"\" + sStartDate + \"\\\",\\\"simulationTypeFlag\\\":\\\"\" + sSimulationType + \"\\\",\\\"dealDescription\\\":\\\"Deal_Management_Test_39944 Desc\\\",\\\"dealVersionDescription\\\":\\\"Deal_Management_Test_39944 Ver Desc\\\",\\\"dealFrequency\\\":\\\"\" + sDealFrequency + \"\\\",\\\"skipReferenceFlag\\\":\\\"true\\\",\\\"priceSelectionDate\\\":\\\"\" + sPriceSelectionDate + \"\\\",\\\"usagePeriod\\\":\\\"\" + sUsageFrequency + \"\\\",\\\"hierarchyFilterFlag\\\":\\\"WHEP\\\",\\\"templateFlag\\\":\\\"false\\\"},\\\"templateReferenceDetails\\\":{\\\"copyBasicDetailsFlag\\\":\\\"false\\\",\\\"copyPricingFlag\\\":\\\"false\\\",\\\"copyUsageFlag\\\":\\\"false\\\"},\\\"dealTermsAndConditionsDetails\\\":{\\\"termsAndConditionsList\\\":[{\\\"description\\\":\\\"DEAL_T&C1\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C1\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C1\\\"},{\\\"description\\\":\\\"DEAL_T&C2\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C2\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C2\\\"}],\\\"adhocTermsAndCondition\\\":\\\"ADHOCTERMSANDCONDITIONS\\\"},\\\"productDetailsList\\\":[{\\\"productCode\\\":\\\"PRODUCT_CON_01\\\"},{\\\"productCode\\\":\\\"PRODUCT_CON_02\\\"}],\\\"referenceDetails\\\":{\\\"referUsageSw\\\":false,\\\"referPriceSw\\\":false,\\\"includeChildHierarchy\\\":false}}}\";\n\n Hashtable < String, String > DealDetails = new Hashtable < String, String > ();\n DealDetails = DM.FnCreateDeal(sDealCreation, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n sDealId = DealDetails.get(\"sDealId\");\n smodelId = DealDetails.get(\"sModelId\");\n sDealIdentifier = DealDetails.get(\"sDealIdentifier\");\n\n //This function to verify Deal Information Details from DB Table\n DB.FnVerifyDealCreationInfoIWS(90, sSheetName, sWorkbook, sDealId);\n\n //################ Deal PSEL READ IWS ####################//\n String sDealPSELREAD = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"READ\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sDealPSELREAD);\n DM.FnReadPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELREAD, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELSELECT = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"PI_021\\\",\\\"priceItemInfo\\\":\\\"PI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_022\\\",\\\"priceItemInfo\\\":\\\"PI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_023\\\",\\\"priceItemInfo\\\":\\\"PI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_033\\\",\\\"priceItemInfo\\\":\\\"PI_033\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_024\\\",\\\"priceItemInfo\\\":\\\"PI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_025\\\",\\\"priceItemInfo\\\":\\\"PI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_026\\\",\\\"priceItemInfo\\\":\\\"PI_026\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR,DM_TYPE=BT\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=USD\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_029\\\",\\\"priceItemInfo\\\":\\\"PI_029\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_030\\\",\\\"priceItemInfo\\\":\\\"PI_030\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_031\\\",\\\"priceItemInfo\\\":\\\"PI_031\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"}]}}}\";\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELSELECT, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(90, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(90, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(90, sSheetName, sWorkbook, smodelId);\n\n //This function to verify Deal Financial Summary Details from DB Table\n DB.Deal_Financial_Summary(101, sSheetName, sWorkbook, smodelId);\n\n AF.FnNavigation(getDriver(), \"Deal Dashboard\");\n\n //Function To Navigate to Deal Information Page\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(sDealId, false, false, true, \"RMBK1\");\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(107, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(113, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(117, sSheetName, sWorkbook);\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n DB.FnVerifyPricingAndCommitmentDetails(121, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(127, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(133, sSheetName, sWorkbook, smodelId);\n\n //PI_021\n DM.FnPricingAndCommitmentIWS(122, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //OVRD\n DM.FnPricingAndCommitmentIWS(123, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //Seasonal\n\n //PI_022\n DM.FnPricingAndCommitmentIWS(128, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //OVRD\n DM.FnPricingAndCommitmentIWS(129, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //Seasonal\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(137, sSheetName, sWorkbook);\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal21 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal21, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(141, sSheetName, sWorkbook);\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(147, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(153, sSheetName, sWorkbook);\n\n //Function To verify Division Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(159, sSheetName, sWorkbook, \"Deal\");\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n }",
"@Test(priority = 14, groups = {\n \"sanity testing\"\n })\n public void DealManagement_Test_39944() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"DealManagement_Test_39944\";\n BaseTest.sScriptName = \"DealManagement_Test_39944\";\n BaseTest.sOTMTestcaseID = \"39944 39546 38724 38688\";\n BaseTest.sTestDescription = \"Verify deal simulation for Existing Customer , simulation type Deal and Skip Reference, Verify recommended pricing with parallel level approval, Verify the deal approval for parallel level approvers,Verify the flag of deal type code: Highest Level Approval Required-Yes\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n\n //Login to the system\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/DealManagement_Test_39944_V1.xlsx\";\n String sSheetName = \"TEST_DATA\";\n\n //Function To Update Billable Charge Start Date & End Date\n\n dealManagementPageEvents.FnAddBillableCharge(288, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(289, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(290, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(291, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(292, sSheetName, sWorkbook);\n\n \n String sDateName = CommonFunctions.FnGetUniqueId();\n String sDealIdentifier1 = CF.FnGetCellValue(86, 3, sSheetName, sWorkbook).toString().trim();\n sDealIdentifier1 = sDealIdentifier1 + \"_\" + sDateName;\n\n String ExistingPersonId = CF.FnGetCellValue(86, 2, sSheetName, sWorkbook).toString().trim();\n String sDealType1 = CF.FnGetCellValue(86, 4, sSheetName, sWorkbook).toString().trim();\n String sSimulationType = CF.FnGetCellValue(86, 6, sSheetName, sWorkbook).toString().trim();\n String sStartDate = CF.FnGetCellValue(86, 7, sSheetName, sWorkbook).toString().trim();\n String sPriceSelectionDate = CF.FnGetCellValue(86, 8, sSheetName, sWorkbook).toString().trim();\n String sDealFrequency = CF.FnGetCellValue(86, 10, sSheetName, sWorkbook).toString().trim();\n String sUsageFrequency = CF.FnGetCellValue(86, 11, sSheetName, sWorkbook).toString().trim();\n\n\n String sDealId, smodelId, sDealIdentifier = \"\";\n\n //################ Deal Creation IWS ####################//\n String sDealCreation = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"dealDetails\\\":{\\\"dealEntityDetails\\\":{\\\"personId\\\":\\\"\" + ExistingPersonId + \"\\\"},\\\"dealIdentifier\\\":\\\"\" + sDealIdentifier1 + \"\\\",\\\"dealEntityType\\\":\\\"EPER\\\",\\\"contractedDealFlag\\\":\\\"true\\\",\\\"currency\\\":\\\"USD\\\",\\\"dealTypeCode\\\":\\\"\" + sDealType1 + \"\\\",\\\"startDate\\\":\\\"\" + sStartDate + \"\\\",\\\"simulationTypeFlag\\\":\\\"\" + sSimulationType + \"\\\",\\\"dealDescription\\\":\\\"Deal_Management_Test_39944 Desc\\\",\\\"dealVersionDescription\\\":\\\"Deal_Management_Test_39944 Ver Desc\\\",\\\"dealFrequency\\\":\\\"\" + sDealFrequency + \"\\\",\\\"skipReferenceFlag\\\":\\\"false\\\",\\\"priceSelectionDate\\\":\\\"\" + sPriceSelectionDate + \"\\\",\\\"usagePeriod\\\":\\\"\" + sUsageFrequency + \"\\\",\\\"includeHierarchyFlag\\\":\\\"false\\\",\\\"templateFlag\\\":\\\"false\\\"},\\\"templateReferenceDetails\\\":{\\\"copyBasicDetailsFlag\\\":\\\"false\\\",\\\"copyPricingFlag\\\":\\\"false\\\",\\\"copyUsageFlag\\\":\\\"false\\\"},\\\"dealTermsAndConditionsDetails\\\":{\\\"termsAndConditionsList\\\":[{\\\"description\\\":\\\"DEAL_T&C1\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C1\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C1\\\"},{\\\"description\\\":\\\"DEAL_T&C2\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C2\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C2\\\"}],\\\"adhocTermsAndCondition\\\":\\\"ADHOCTERMSANDCONDITIONS\\\"},\\\"productDetailsList\\\":[{\\\"productCode\\\":\\\"PRODUCT_CON_01\\\"},{\\\"productCode\\\":\\\"PRODUCT_CON_02\\\"}],\\\"referenceDetails\\\":{\\\"referenceTypeFlg\\\":\\\"RPER\\\",\\\"referPersonId\\\":\\\"3091575921\\\",\\\"referUsageSw\\\":true,\\\"referPriceSw\\\":true,\\\"includeChildHierarchy\\\":false}}}\";\n\n// String sDealCreation = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"dealDetails\\\":{\\\"dealEntityDetails\\\":{\\\"personId\\\":\\\"\" + ExistingPersonId + \"\\\"},\\\"dealIdentifier\\\":\\\"\" + sDealIdentifier1 + \"\\\",\\\"dealEntityType\\\":\\\"EPER\\\",\\\"contractedDealFlag\\\":\\\"true\\\",\\\"currency\\\":\\\"USD\\\",\\\"dealTypeCode\\\":\\\"\" + sDealType1 + \"\\\",\\\"startDate\\\":\\\"\" + sStartDate + \"\\\",\\\"simulationTypeFlag\\\":\\\"\" + sSimulationType + \"\\\",\\\"dealDescription\\\":\\\"Deal_Management_Test_39944 Desc\\\",\\\"dealVersionDescription\\\":\\\"Deal_Management_Test_39944 Ver Desc\\\",\\\"dealFrequency\\\":\\\"\" + sDealFrequency + \"\\\",\\\"skipReferenceFlag\\\":\\\"true\\\",\\\"priceSelectionDate\\\":\\\"\" + sPriceSelectionDate + \"\\\",\\\"usagePeriod\\\":\\\"\" + sUsageFrequency + \"\\\",\\\"includeHierarchyFlag\\\":\\\"false\\\",\\\"templateFlag\\\":\\\"false\\\"},\\\"templateReferenceDetails\\\":{\\\"copyBasicDetailsFlag\\\":\\\"false\\\",\\\"copyPricingFlag\\\":\\\"false\\\",\\\"copyUsageFlag\\\":\\\"false\\\"},\\\"dealTermsAndConditionsDetails\\\":{\\\"termsAndConditionsList\\\":[{\\\"description\\\":\\\"DEAL_T&C1\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C1\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C1\\\"},{\\\"description\\\":\\\"DEAL_T&C2\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C2\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C2\\\"}],\\\"adhocTermsAndCondition\\\":\\\"ADHOCTERMSANDCONDITIONS\\\"},\\\"productDetailsList\\\":[{\\\"productCode\\\":\\\"PRODUCT_CON_01\\\"},{\\\"productCode\\\":\\\"PRODUCT_CON_02\\\"}],\\\"referenceDetails\\\":{\\\"referUsageSw\\\":false,\\\"referPriceSw\\\":false,\\\"includeChildHierarchy\\\":false}}}\";\n Hashtable < String, String > DealDetails = new Hashtable < String, String > ();\n DealDetails = DM.FnCreateDeal(sDealCreation, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n sDealId = DealDetails.get(\"sDealId\");\n smodelId = DealDetails.get(\"sModelId\");\n sDealIdentifier = DealDetails.get(\"sDealIdentifier\");\n\n //This function to verify Deal Information Details from DB Table\n DB.FnVerifyDealCreationInfoIWS(86, sSheetName, sWorkbook, sDealId);\n\n\n //################ Deal PSEL READ IWS ####################//\n String sDealPSELREAD = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"READ\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sDealPSELREAD);\n DM.FnReadPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELREAD, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELSELECT = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"NPI_031\\\",\\\"priceItemInfo\\\":\\\"NPI_031\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_037\\\",\\\"priceItemInfo\\\":\\\"NPI_037\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_021\\\",\\\"priceItemInfo\\\":\\\"NPI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_022\\\",\\\"priceItemInfo\\\":\\\"NPI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_023\\\",\\\"priceItemInfo\\\":\\\"NPI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_024\\\",\\\"priceItemInfo\\\":\\\"NPI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_025\\\",\\\"priceItemInfo\\\":\\\"NPI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_036\\\",\\\"priceItemInfo\\\":\\\"NPI_036\\\",\\\"parameterInfo\\\":\\\"DM_COUNTRY=IND,DM_STATE=AP\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_036\\\",\\\"priceItemInfo\\\":\\\"NPI_036\\\",\\\"parameterInfo\\\":\\\"DM_COUNTRY=IND,DM_STATE=KA\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"}]}}}\";\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELSELECT, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(86, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(86, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(86, sSheetName, sWorkbook, smodelId);\n\n //This function to verify Deal Financial Summary Details from DB Table\n DB.Deal_Financial_Summary(97, sSheetName, sWorkbook, smodelId);\n\n\n AF.FnNavigation(getDriver(), \"Deal Dashboard\"); //for Test\n\n //Function To Navigate to Deal Information Page\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(sDealId, false, false, true, \"RMBK1\");\n\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(103, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(109, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(113, sSheetName, sWorkbook);\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n //################ Deal PriceList Assignment IWS ####################//\n //To Perform Operation On Deal i.e. Add , Update , Delete pricelist\n dealManagementPageEvents.FnDealPricelistAddUpdateDeleteIWS(90, sSheetName, sWorkbook, sDealId, smodelId);\n\n //################ Deal PSEL READ IWS ####################//\n String sDealPSELREAD1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"READ\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sDealPSELREAD);\n DM.FnReadPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELREAD1, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELSELECT1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"PI_021\\\",\\\"priceItemInfo\\\":\\\"PI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_022\\\",\\\"priceItemInfo\\\":\\\"PI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_023\\\",\\\"priceItemInfo\\\":\\\"PI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_033\\\",\\\"priceItemInfo\\\":\\\"PI_033\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_024\\\",\\\"priceItemInfo\\\":\\\"PI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_025\\\",\\\"priceItemInfo\\\":\\\"PI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_026\\\",\\\"priceItemInfo\\\":\\\"PI_026\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR,DM_TYPE=BT\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=USD\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_029\\\",\\\"priceItemInfo\\\":\\\"PI_029\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_030\\\",\\\"priceItemInfo\\\":\\\"PI_030\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_031\\\",\\\"priceItemInfo\\\":\\\"PI_031\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"}]}}}\";\n\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELSELECT1, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal1, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //This function to verify Deal Information Details from DB Table\n DB.FnVerifyDealCreationInfoIWS(118, sSheetName, sWorkbook, sDealId);\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(118, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(118, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(118, sSheetName, sWorkbook, smodelId);\n\n\n\n //This function to verify Deal Financial Summary Details from DB Table\n DB.Deal_Financial_Summary(124, sSheetName, sWorkbook, smodelId);\n\n //Function To Refresh Deal\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(130, sSheetName, sWorkbook);\n\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(136, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(140, sSheetName, sWorkbook);\n\n //Function To verify Deal Logs \n dealManagementPageEvents.FnVerifyDealLogs(144, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(145, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(146, sSheetName, sWorkbook);\n\n // Function To Verify Pricing And Commitment Details From DB Table\n DB.FnVerifyPricingAndCommitmentDetails(150, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(156, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(163, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(170, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(177, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(184, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(191, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(198, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(202, sSheetName, sWorkbook, smodelId);\n\n //Function To Override,Update,Delete,Add Seasonal Pricing Using IWS\n //PI_021\n DM.FnPricingAndCommitmentIWS(203, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //OVRD\n DM.FnPricingAndCommitmentIWS(204, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //Seasonal\n\n //PI_022\n DM.FnPricingAndCommitmentIWS(151, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //OVRD\n DM.FnPricingAndCommitmentIWS(152, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //Seasonal\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(208, sSheetName, sWorkbook);\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal21 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal21, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n //System.out.println(\"Simulation Deal ID Is-> \" + sSimulateDealDealId);\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(212, sSheetName, sWorkbook);\n\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(218, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(224, sSheetName, sWorkbook);\n\n\n //################ Send Deal For Approval IWS ####################//\n String sSendDealForApproval = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApproval, sContentTypeHeader, sAcceptTypeHeader);\n\n // Function to Refresh Deal\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(228, sSheetName, sWorkbook);\n\n // To Change user for sending new request\n WF.FnUserChange(\"PMBK1\");\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal2 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal2, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function to Recommend Pricing \n DM.FnPricingAndCommitmentIWS(157, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Recommend Pricing \n DM.FnPricingAndCommitmentIWS(164, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n String sSimulateDeal5 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal5, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Return Deal To Submitter IWS ####################//\n String ReturnDealtoSubmitter = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"RETN\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\",\\\"division\\\":\\\"IND\\\",\\\"comments\\\":\\\"Recommended Price Item\\\",\\\"rejectReasonCode\\\":\\\"RETURN\\\"}}}\";\n DM.FnReturnDealToSubmitterUsingIWS(sCreateDealResource, ReturnDealtoSubmitter, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to RMBK1 User\n WF.FnUserChange(\"RMBK1\");\n\n // Function to Update Recommended Pricing on RM Level \n DM.FnPricingAndCommitmentIWS(158, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n // Function to Update Recommended Pricing on RM Level \n DM.FnPricingAndCommitmentIWS(165, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n // Function to Simulate Deal\n DM.FnSimulateDealByRequest(sSimulateDeal5, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(234, sSheetName, sWorkbook);\n\n //################ Send Deal For Approval IWS ####################//\n String sSendDealForApproval33 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApproval33, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to PMBK1 User\n WF.FnUserChange(\"PMBK1\");\n\n String sSimulateDeal7 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal7, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n String sSendDealForApprovalFromPM11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApprovalFromPM11, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to PMBK1 User\n WF.FnUserChange(\"PMBK2\");\n\n String sSimulateDealByPMBK2 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealByPMBK2, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n String sSendDealForApprovalFromByPMBK2 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApprovalFromByPMBK2, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to SPMBK1 User\n WF.FnUserChange(\"SPMBK1\");\n\n //Function To Simulate Deal\n String sSimulateDealBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealBySPM, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function to Recommend Pricing By SPMBK1 User \n DM.FnPricingAndCommitmentIWS(171, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Recommend Pricing By SPMBK1 User \n DM.FnPricingAndCommitmentIWS(178, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Recommend Pricing By SPMBK1 User \n DM.FnPricingAndCommitmentIWS(185, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Recommend Pricing By SPMBK1 User \n DM.FnPricingAndCommitmentIWS(192, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n String sSimulateDeal5BySPMBK1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal5BySPMBK1, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Return Deal To Submitter IWS ####################//\n String ReturnDealtoSubmitterBySPMBK1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"RETN\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\",\\\"division\\\":\\\"IND\\\",\\\"comments\\\":\\\"Recommended Price Item\\\",\\\"rejectReasonCode\\\":\\\"RETURN\\\"}}}\";\n DM.FnReturnDealToSubmitterUsingIWS(sCreateDealResource, ReturnDealtoSubmitterBySPMBK1, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to SPMBK1 User\n WF.FnUserChange(\"RMBK1\");\n\n //Function to Override Recommend Pricing By RMBK1 User // PI_028 \n DM.FnPricingAndCommitmentIWS(172, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Override Recommend Pricing By RMBK1 User \n DM.FnPricingAndCommitmentIWS(179, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Override Recommend Pricing By RMBK1 User \n DM.FnPricingAndCommitmentIWS(186, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Function to Override Recommend Pricing By RMBK1 User \n DM.FnPricingAndCommitmentIWS(193, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDealByRMBK1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealByRMBK1, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n // Function to Refresh Deal\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(240, sSheetName, sWorkbook);\n\n //Function to Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Function To Verify Project & Original Pricing and Commitment for Specific/Given Price item\n dealManagementPageEvents.FnVerifyPricingAndCommitmentDetailsForSpecificPriceItem(246, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPricingAndCommitmentDetailsForSpecificPriceItem(247, sSheetName, sWorkbook);\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n\n //Function to Override Update Pricing By RMBK1 User // PI_028 \n DM.FnPricingAndCommitmentIWS(248, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELUNSELECT1 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"NPI_037\\\",\\\"priceItemInfo\\\":\\\"NPI_037\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"false\\\"}]}}}\";\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELUNSELECT1, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to RMBK1 User\n WF.FnUserChange(\"RMBK1\");\n\n // Function to Simulate Deal\n String sSimulateDealByRMBK11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealByRMBK11, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Send Deal For Approval IWS ####################//\n String sSendDealForApprovalByRMBK11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApprovalByRMBK11, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to PMBK1 User\n WF.FnUserChange(\"PMBK1\");\n\n String sSimulateDealByPMBK11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealByPMBK11, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n String sSendDealForApprovalFromPM1133 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApprovalFromPM1133, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to PMBK1 User\n WF.FnUserChange(\"PMBK2\");\n\n String sSimulateDealByPMBK211 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealByPMBK211, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n String sSendDealForApprovalFromByPMBK211 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApprovalFromByPMBK211, sContentTypeHeader, sAcceptTypeHeader);\n\n\n // Login Change to SPMBK1 User\n WF.FnUserChange(\"SPMBK1\");\n\n //Function To Simulate Deal\n String sSimulateDealBySPMBK11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealBySPMBK11, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //Function To Approve Deal\n String sApproveDealBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"APPR\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnApproveDealUsingIWS(sCreateDealResource, sApproveDealBySPM, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(266, sSheetName, sWorkbook);\n\n //Function To Change Login\n WF.FnUserChange(\"RMBK1\");\n\n //Function To Finalize Deal\n String sFinalizeDeaBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"FNAL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnFinalizeDealUsingIWS(sCreateDealResource, sFinalizeDeaBySPM, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(270, sSheetName, sWorkbook);\n\n String CustomerAcceptanceEffectiveStartDate = CF.FnGetCellValue(252, 1, sSheetName, sWorkbook).toString().trim();\n String CustomerAcceptanceEffectiveEndDate = CF.FnGetCellValue(252, 2, sSheetName, sWorkbook).toString().trim();\n\n //Function To Customer Accept Deal\n String sAcceptDealBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"ACPT\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\",\\\"dealAcceptEffStartDate\\\":\\\"\" + CustomerAcceptanceEffectiveStartDate + \"\\\",\\\"dealAcceptEffEndDate\\\":\\\"\" + CustomerAcceptanceEffectiveEndDate + \"\\\",\\\"comments\\\":\\\"\" + sDealIdentifier + \" Deal Accepted\\\"}}}\";\n DM.FnAcceptDealUsingIWS(sCreateDealResource, sAcceptDealBySPM, sContentTypeHeader, sAcceptTypeHeader);\n\n // Function to Refresh Deal\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(256, sSheetName, sWorkbook);\n\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(262, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(276, sSheetName, sWorkbook);\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(281, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(281, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(281, sSheetName, sWorkbook, smodelId);\n\n\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewLessthan15Accts() {\n\t\tReport.createTestLogHeader(\"MuMv\",\"Verify whether user is able to edit the existing view successfully and it gets reflected in the list\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforFAA\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.VerifyEditviewname(userProfile) \t\t\t\t\t\t \t \t\t\n\t\t.EditViewNameforLessthan15Accts(userProfile)\n\t\t.ClickAddUserRHNLink()\n\t\t.StandardUser_Creation()\t\t\t\t\t\t \t \t\t\n\t\t.verifyEditedview(userProfile)\n\t\t.enterValidData_StandardUserforEditview(userProfile);\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile);\t\n\t}",
"@Test\n\tpublic void TC040DMS_03(){\n\t\tresult.addLog(\"ID : TC040DMS_03 : Verify that the Marketing statsus is changed to 'APPROVED' and its action is 'Revoke Marketing Approval' when DTS Marketing approve the marketing materials\");\n\t\t/*\n\t\t\tPre-Condition: The tuning state is approved.\n\t\t\t1. Log into DTS portal as a DTS user\n\t\t\t2. Navigate to \"Accessories\" page\n\t\t\t3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\t\tVP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t\t4. Upload a marketing material file\n\t\t\tVP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t\t5. Expand the \"Partner Actions\" link in step 2 : Marketing Approval\n\t\t\t6. Click \"Request Marketing Review\" link\n\t\t\tVP:Marketing status is changed to \"PENDING DTS REVIEW\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed \n\t\t\t7. Click \"Approve Marketing\" link\n\t\t */\n\t\t/*\n\t\t * Pre-Condition: The tuning state is approved\n\t\t */\n\t\t// Navigate to accessories page\n\t\thome.click(Xpath.LINK_PARTNER_ACCESSORIES);\n\t\t// Click Add Accessory link\n\t\thome.click(AccessoryMain.ADD_ACCESSORY);\n\t\t// Create accessory\n\t\tHashtable<String,String> data = TestData.accessoryTuning();\n\t\thome.addAccessoriesPartner(AddAccessory.getHash(), data);\n\t\t// Approve tuning\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_1);\n\t\thome.click(AccessoryInfo.APPROVE_TUNING);\n\t\t/*\n\t\t * ****************************************************************\n\t\t */\n\t\t// 2. Navigate to \"Accessories\" page\n\t\thome.click(Xpath.linkAccessories);\n\t\t// 3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\thome.selectAnaccessorybyName(data.get(\"name\"));\n\t\t/*\n\t\t * VP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"UNSUBMITTED\");\n\t\t// 4. Upload a marketing material file\n\t\thome.click(AccessoryInfo.EDIT_MODE);\n\t\thome.uploadFile(AddAccessory.ADD_MARKETING, Constant.AUDIO_ROUTE_FILE);\n\t\thome.clickOptionByIndex(AddAccessory.MARKETING_METERIAL_TYPE, 1);\n\t\thome.click(AddAccessory.SAVE);\n\t\t/*\n\t\t * VP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t */\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.PARTNER_ACTIONS_STEP_2));\n\t\t// 5. Expand the \"Partner Actions\" link in step 2: Marketing Approval\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_2);\n\t\t// 6. Click \"Request Marketing Review\" link\n\t\thome.click(AccessoryInfo.REQUEST_MARKETING_REVIEW);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"PENDING DTS REVIEW\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"PENDING DTS REVIEW\");\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.APPROVE_MARKETING));\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.DECLINE_MARKETING));\n\t\t// 7. Click \"Approve Marketing\" link\n\t\thome.click(AccessoryInfo.APPROVE_MARKETING);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"APPROVED\" and its action is \"Revoke Marketing Approval\" \n\t\t */\n\t\tAssert.assertTrue(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS).equalsIgnoreCase(AccessoryInfo.APPROVED));\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_ACTION), \"Revoke Marketing Approval\");\n\t\t// Delete product\n\t\thome.doDelete(AccessoryInfo.DELETE);\n\t}",
"@Test(priority = 19, groups = {\n \"sanity testing\"\n })\n public void DealManagement_Test_39773() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"DealManagement_Test_39773\";\n BaseTest.sScriptName = \"DealManagement_Test_39773\";\n BaseTest.sOTMTestcaseID = \"39767\";\n BaseTest.sTestDescription = \"Verify Stacking functionality for the case deal for existing Parent customer with skip reference\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n /*Login to the system*/\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/DealManagement_Test_39773.xlsx\";\n String sSheetName = \"TEST_DATA\";\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n String sDateName = CommonFunctions.FnGetUniqueId();\n String sDealIdentifier1 = CF.FnGetCellValue(90, 3, sSheetName, sWorkbook).toString().trim();\n sDealIdentifier1 = sDealIdentifier1 + \"_\" + sDateName;\n\n String ExistingPersonId = CF.FnGetCellValue(90, 2, sSheetName, sWorkbook).toString().trim();\n String sDealType1 = CF.FnGetCellValue(90, 4, sSheetName, sWorkbook).toString().trim();\n String sSimulationType = CF.FnGetCellValue(90, 6, sSheetName, sWorkbook).toString().trim();\n String sStartDate = CF.FnGetCellValue(90, 7, sSheetName, sWorkbook).toString().trim();\n String sPriceSelectionDate = CF.FnGetCellValue(90, 8, sSheetName, sWorkbook).toString().trim();\n String sDealFrequency = CF.FnGetCellValue(90, 10, sSheetName, sWorkbook).toString().trim();\n String sUsageFrequency = CF.FnGetCellValue(90, 11, sSheetName, sWorkbook).toString().trim();\n\n CF.FnTestCaseStatusReport(\"Pass\", \"Deal Start date used for Deal creation Is-> \" + sStartDate);\n\n\n String sDealId, smodelId = \"\";\n\n //################ Deal Creation IWS ####################//\n String sDealCreation = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"dealDetails\\\":{\\\"dealEntityDetails\\\":{\\\"personId\\\":\\\"\" + ExistingPersonId + \"\\\"},\\\"dealIdentifier\\\":\\\"\" + sDealIdentifier1 + \"\\\",\\\"dealEntityType\\\":\\\"EPER\\\",\\\"contractedDealFlag\\\":\\\"true\\\",\\\"currency\\\":\\\"USD\\\",\\\"dealTypeCode\\\":\\\"\" + sDealType1 + \"\\\",\\\"startDate\\\":\\\"\" + sStartDate + \"\\\",\\\"simulationTypeFlag\\\":\\\"\" + sSimulationType + \"\\\",\\\"dealDescription\\\":\\\"DealManagement_Test_39773 Desc\\\",\\\"dealVersionDescription\\\":\\\"DealManagement_Test_39773 Ver Desc\\\",\\\"dealFrequency\\\":\\\"\" + sDealFrequency + \"\\\",\\\"skipReferenceFlag\\\":\\\"true\\\",\\\"priceSelectionDate\\\":\\\"\" + sPriceSelectionDate + \"\\\",\\\"usagePeriod\\\":\\\"\" + sUsageFrequency + \"\\\",\\\"includeHierarchyFlag\\\":\\\"false\\\",\\\"templateFlag\\\":\\\"false\\\"},\\\"templateReferenceDetails\\\":{\\\"copyBasicDetailsFlag\\\":\\\"false\\\",\\\"copyPricingFlag\\\":\\\"false\\\",\\\"copyUsageFlag\\\":\\\"false\\\"},\\\"dealTermsAndConditionsDetails\\\":{\\\"termsAndConditionsList\\\":[{\\\"description\\\":\\\"DEAL_T&C1\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C1\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C1\\\"},{\\\"description\\\":\\\"DEAL_T&C2\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C2\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C2\\\"}],\\\"adhocTermsAndCondition\\\":\\\"ADHOCTERMSANDCONDITIONS\\\"},\\\"productDetailsList\\\":[{\\\"productCode\\\":\\\"PRODUCT_CON_01\\\"},{\\\"productCode\\\":\\\"PRODUCT_CON_02\\\"}],\\\"referenceDetails\\\":{\\\"referUsageSw\\\":false,\\\"referPriceSw\\\":false,\\\"includeChildHierarchy\\\":false}}}\";\n\n Hashtable < String, String > DealDetails = new Hashtable < String, String > ();\n DealDetails = DM.FnCreateDeal(sDealCreation, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n sDealId = DealDetails.get(\"sDealId\");\n smodelId = DealDetails.get(\"sModelId\");\n\n //This function to verify Deal Information Details from DB Table\n DB.FnVerifyDealCreationInfoIWS(90, sSheetName, sWorkbook, sDealId);\n\n\n //################ Deal PSEL READ IWS ####################//\n String sDealPSELREAD = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"READ\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sDealPSELREAD);\n DM.FnReadPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELREAD, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELSELECT = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"PI_021\\\",\\\"priceItemInfo\\\":\\\"PI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_022\\\",\\\"priceItemInfo\\\":\\\"PI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_023\\\",\\\"priceItemInfo\\\":\\\"PI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_033\\\",\\\"priceItemInfo\\\":\\\"PI_033\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_024\\\",\\\"priceItemInfo\\\":\\\"PI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_025\\\",\\\"priceItemInfo\\\":\\\"PI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_026\\\",\\\"priceItemInfo\\\":\\\"PI_026\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR,DM_TYPE=BT\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=USD\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_029\\\",\\\"priceItemInfo\\\":\\\"PI_029\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_030\\\",\\\"priceItemInfo\\\":\\\"PI_030\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_031\\\",\\\"priceItemInfo\\\":\\\"PI_031\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"}]}}}\";\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELSELECT, sContentTypeHeader, sAcceptTypeHeader);\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(90, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(90, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(90, sSheetName, sWorkbook, smodelId);\n\n //This function to verify Deal Financial Summary Details from DB Table\n DB.Deal_Financial_Summary(101, sSheetName, sWorkbook, smodelId);\n\n\n AF.FnNavigation(getDriver(), \"Deal Dashboard\");\n\n //Function To Navigate to Deal Information Page\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(sDealId, false, false, true, \"RMBK1\");\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(107, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(113, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(117, sSheetName, sWorkbook);\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n DB.FnVerifyPricingAndCommitmentDetails(121, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(127, sSheetName, sWorkbook, smodelId);\n DB.FnVerifyPricingAndCommitmentDetails(133, sSheetName, sWorkbook, smodelId);\n\n //PI_021\n DM.FnPricingAndCommitmentIWS(122, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //OVRD\n DM.FnPricingAndCommitmentIWS(123, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //Seasonal\n\n //PI_022\n DM.FnPricingAndCommitmentIWS(128, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //OVRD\n DM.FnPricingAndCommitmentIWS(129, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\"); //Seasonal\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(137, sSheetName, sWorkbook);\n\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal21 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal21, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Refresh Deal From UI\n DM.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(141, sSheetName, sWorkbook);\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(147, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(153, sSheetName, sWorkbook);\n\n //Function To verify Division Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(160, sSheetName, sWorkbook, \"Deal\");\n\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n }",
"@Test(enabled = true, priority = 1, groups = {\n \"sanity testing\"\n })\n public void DM_03() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"DM_03\";\n BaseTest.sScriptName = \"CurrencyConversion\";\n BaseTest.sOTMTestcaseID = \"34465\";\n BaseTest.sTestDescription = \"Deal Management Currency Conversion Test Case\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n\n //Login to the system\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n \n \n //Function to update \"Stacking Required\" Option as N\n //Excel Data to be used:\n String sWorkbookSTACK = \"./databank/banking/deal_management/DealManagement_Test_Stacking_39768.xlsx\";\n String sSheetNameSTACK = \"TEST_DATA\";\n dealManagementPageEvents.FnUpdateAlgorithmValue(233, sSheetNameSTACK, sWorkbookSTACK);\n dealManagementPageEvents.FnUpdateAlgorithmValue(234, sSheetNameSTACK, sWorkbookSTACK);\n \n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/DM_Automation_Deal_Managment_CurrencyAndDivProdOLD.xlsx\";\n String sSheetName = \"Currency Conversion - Deal \";\n BaseTest.sTestDescription = \"Deal Management verifications for Currency Conversion\";\n\n //Update Billable Charge Start Date and End Date\n DB.FnUpdateBillableChargeDates(76, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(77, sSheetName, sWorkbook);\n DB.FnUpdateBillableChargeDates(78, sSheetName, sWorkbook);\n \n\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n AF.FnNavigation(getDriver(), \"Deal Dashboard\");\n\n\n String DealId = \"3734785295\";\n\n boolean skipDealCreation = false;\n\n if (skipDealCreation == true) {\n\n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId); //for Test Resume\n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //for Test Resume\n\n }\n\n\n //Search entity \n dealManagementPageEvents.FnSearchEntity(83, sSheetName, sWorkbook);\n\n //Deal Creation \n String sDealIDCreatedAfterDealCreation = dealManagementPageEvents.FnDealCreation(87, sSheetName, sWorkbook);\n\n System.out.println(\"===> sDealIDCreatedAfterDealCreation Deal id:-\" + sDealIDCreatedAfterDealCreation);\n\n DealId = sDealIDCreatedAfterDealCreation;\n\n //CF.FnWriteCellValue(87, 19, sDealIDCreatedAfterDealCreation, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnNavigationToDealInformationFromDealCreation();\n\n //verification of deal information \n dealManagementPageEvents.FnDealInformationVerification(91, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnNavigationToViewAndAssignPrizelist();\n\n //verification of Price List Assignment \n dealManagementPageEvents.FnPriceListAssignment(95, sSheetName, sWorkbook);\n\n //To save the assigned prizelist for given prize list ID\n dealManagementPageEvents.FnSaveOnPriceListAssignment();\n ////have calculation issue if we assign pricelist from deal assign pricelist on customer i.e customer Pricelist\n\n\n dealManagementPageEvents.FnNavigateToAccountViewAndAssignProposeProduct();\n dealManagementPageEvents.FnSearchAndEnrollProduct(99, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnNavigateToAccountViewAndAssignProposeProduct();\n dealManagementPageEvents.FnSearchAndEnrollProduct(100, sSheetName, sWorkbook);\n\n //Function to Navigate back to Deal Information Screen from Product Enrollment screen\n dealManagementPageEvents.FnNavigationToDealInformationFromProductScreen();\n\n //Function to Navigate To Account View And Assign Product Enrollment screen\n dealManagementPageEvents.FnNavigateToAccountViewAndAssignProposeProduct();\n\n //Function to Search And Validate Enrolled Product Details\n dealManagementPageEvents.FnSearchAndValidateEnrolledProduct(104, sSheetName, sWorkbook);\n dealManagementPageEvents.FnSearchAndValidateProposedProduct(108, sSheetName, sWorkbook);\n dealManagementPageEvents.FnSearchAndValidateProposedProduct(109, sSheetName, sWorkbook);\n dealManagementPageEvents.FnSearchAndValidateProposedProduct(110, sSheetName, sWorkbook);\n\n //Function to Broadcast and Verify Product Details\n dealManagementPageEvents.FnBroadcastProductDetailsOfProposedProduct(114, sSheetName, sWorkbook);\n dealManagementPageEvents.FnBroadcastProductDetailsOfProposedProduct(115, sSheetName, sWorkbook);\n dealManagementPageEvents.FnBroadcastProductDetailsOfProposedProduct(116, sSheetName, sWorkbook);\n\n //Function to Navigate back to Deal Information Screen from Product Enrollment screen\n dealManagementPageEvents.FnNavigationToDealInformationFromProductScreen();\n\n // price item selection line no 21\n //Search filter options on Select Prize Item group\n dealManagementPageEvents.FnSearchAndSelectPrizeItemgroup(120, sSheetName, sWorkbook);\n dealManagementPageEvents.FnSearchAndSelectPrizeItemgroup(121, sSheetName, sWorkbook);\n\n //Function to Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n dealManagementPageEvents.FnAddSeasonalPricingForSinglePriceItemFromExcel(125, sSheetName, sWorkbook); //26\n\n //Function to Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments(); //28\n\n //Function To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //29\n\n //Function to Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Function To verify of view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnViewAndEditPricing(130, sSheetName, sWorkbook); //30\n\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Deal Currency\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(187, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", false);\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(188, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", false);\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(189, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", false);\n\n //Function To Switch Currency Toggle For Product financial summary \n dealManagementPageEvents.PricingAndCommitmentProductFinancialSummarySwitchToggle();\n //Raised Bug 35237989 - UNABLE TO SHOW DIVISION CURRENCY PRODUCT FINANCIAL SUMMARY ON PRICING SCREEN\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Division Currency\n //dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(187, sSheetName, sWorkbook, \"Division\", \"INDSPM\", false);\n //dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(188, sSheetName, sWorkbook, \"Division\", \"INDSPM\", false);\n //dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(189, sSheetName, sWorkbook, \"Division\", \"INDSPM\", false);\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //Function To verify Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(195, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForAccounts(196, sSheetName, sWorkbook);\n\n\n //Function To verify Personal Hierarchy Information On Deal Information for \"Customer Division / Account Currency\"\n dealManagementPageEvents.DealInformationPersonHierarchySwitchToggle();\n\n //Function To verify Division Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForDivisionCurrency(195, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForAccountsForDivisionCurrency(196, sSheetName, sWorkbook);\n\n // Deal Currency on Product financial summary zone\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(202, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(203, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(204, sSheetName, sWorkbook, \"Deal\", \"\");\n\n // Division Currency on Product financial summary zone\n dealManagementPageEvents.DealInformationProductFinancialSummarySwitchToggle();\n\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(202, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(203, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(204, sSheetName, sWorkbook, \"Division\", \"\");\n\n\n //Deal Currency on Division financial summary zone\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(210, sSheetName, sWorkbook, \"Deal\");\n\n dealManagementPageEvents.DealInformationDivisionFinancialSummarySwitchToggle();\n\n //Division Currency on Division financial summary zone\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(210, sSheetName, sWorkbook, \"Division\");\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(216, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(221, sSheetName, sWorkbook);\n\n //Function To verify Deal Logs \n dealManagementPageEvents.FnVerifyDealLogs(225, sSheetName, sWorkbook); //issue in assert sCreationDateTime\n\n //Function To Navigate to Adhoc Revenue and cost UI from Deal information page\n dealManagementPageEvents.FnNavigationToAdhocRevenueAndCostCreationFromDealInformation();\n\n //Function To create Adhoc Revenue and cost \n dealManagementPageEvents.FnCreationOfAdhocRevenueAndCost(230, sSheetName, sWorkbook);\n\n //Function to Verify deal information \n dealManagementPageEvents.FnDealInformationVerification(237, sSheetName, sWorkbook);\n\n //Function To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage();\n\n //Function To verify Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(307, sSheetName, sWorkbook);\n\n //Function To verify Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForAccounts(308, sSheetName, sWorkbook);\n\n // Deal Currency on Product financial summary zone\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(314, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(315, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(316, sSheetName, sWorkbook, \"Deal\", \"\");\n\n\n //Function To Verify Product financial summary zone\n dealManagementPageEvents.DealInformationProductFinancialSummarySwitchToggle();\n\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(314, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(315, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(316, sSheetName, sWorkbook, \"Division\", \"\");\n\n\n //Function To Verify Division financial summary zone\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(322, sSheetName, sWorkbook, \"Deal\");\n\n dealManagementPageEvents.DealInformationDivisionFinancialSummarySwitchToggle();\n\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(322, sSheetName, sWorkbook, \"Division\");\n\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(328, sSheetName, sWorkbook);\n\n //Function to Verify deal information \n dealManagementPageEvents.FnDealInformationVerification(332, sSheetName, sWorkbook);\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnSendDealForApprovalFromDealInformation();\n\n // Navigate to Deal Dashboard UI\n AF.FnNavigation(getDriver(), \"Deal Dashboard\");\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Dashboard\");\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForPrizeItemManager(\"Pending For Approval\", \"India Pricing Manager\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n\n //Navigate to Deal Approver Dashboard Through INDPM user\n AF.FnLoginChange(getDriver(), \"INDPM\"); //60\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //61\n\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\"); //62\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard(); //63\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForPrizeItemManager(\"Pending For Approval\", \"India Pricing Manager\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //64\n\n //Function To verify Approval status for SPM on View And Edit Pricing\n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"PENDING FOR APPROVAL\"); //65\n\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n //65 Pending = Click on View and Edit pricing button = The status of the price items should be displayed of the previous approver.\tThe price item should in 'error' status\n\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_021\", \"APPROVED\"); //67 //showing status approved for price items\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_022\", \"ERROR\"); //67\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_024\", \"ERROR\"); //67\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_025\", \"APPROVED\"); //67\n //Error -> not showing status for other reporting/swift price items i.e cpivfn_046 to CPICFN_052\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //67\n\n //Function to navigate Pricing and commitment edit \n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_022\", \"PENDING FOR APPROVAL\"); //68\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //Function to navigate Pricing and commitment edit \n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //dealManagementPageEvents.FnVerifyStatusOfSeasonalPriceItemOnPricingAndCommitment(\"CC_022\", \"PENDING FOR APPROVAL\", 1); //68\n //error \n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments(); //68\t\t\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnSendDealForApprovalFromDealInformation(); //69\n\n //Navigate to Deal Approver Dashboard Through INDPM user\n AF.FnLoginChange(getDriver(), \"INDSPM\"); //70\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\");\n\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\");\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"India Senior Pricing Manager\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard();\n\n //Function To verify Approval status for INDSPM on personal Hierarchy\n //74 = The consolidated status displayed on hierarchy section should be of the previous approver\tThe consolidated status should be displayed successfully on status column.\n //bug -> not showing status for any approval\n\n dealManagementPageEvents.FnNavigateToViewAndEditPricing(); //75\t\t\n\n //75 = Click on View and Edit pricing button\tThe status of the price items should be displayed of the previous approver.\n //bug -> not showing price items on pricing screen i.e showing no data to display error\n\n //Function to Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments(); //75\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //76\n //have to test message I,e Pricing Limits and Financial Summary Validated Successfully\n\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_024\", \"APPROVED\"); // 77\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnApproveDealFromDealInformation(); //78\n\n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"APPROVED\"); //78\n\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //80\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(DealId, true, false, false, \"INDSPM\");\n\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard(); //81\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Pricing Manager 1\", \"Unapproved\"); //83\n\n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowApprovalHistory(336, sSheetName, sWorkbook); //83\n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowApprovalHistory(337, sSheetName, sWorkbook); //83\n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowApprovalHistory(338, sSheetName, sWorkbook); //83\n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowApprovalHistory(339, sSheetName, sWorkbook); //83\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow(); //82\n\n //Navigate to Deal Approver Dashboard Through PMBK1 user\n AF.FnLoginChange(getDriver(), \"PMBK1\"); //84\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //85\n\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\");\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Pricing Manager 1\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard();\n\n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"APPROVED\");\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //91\n\n //Function to Verify Send deal for Approval and Return to Submitter buttons are enabled\n dealManagementPageEvents.FnVerifySendDealForApprovalAndReturnToSubmitterButtonsEnabled(); //92\n\n //Function To Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Function To Search prize items and recommend prize\n dealManagementPageEvents.FnSearchAndRecommendPriceForSinglePriceItem(\"CPIVFN_046\", \"23.22\"); //95\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //Function to Verify Deal information Deal Status And Deal Version Status\n dealManagementPageEvents.FnVerifyDealInformationDealStatusAndDealVersionStatus(\"Pending For Approval\", \"Finalized\"); //96\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //97\n\n //Function To Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Deal Currency\n // \t\t\t\tdealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(401, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", true);\n // \t\t\t\tdealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(402, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", true);\n // \t\t\t\tdealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(403, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", true);\n\n //Function To Switch Currency Toggle For Product financial summary \n // \t\t\t\tdealManagementPageEvents.PricingAndCommitmentProductFinancialSummarySwitchToggle();\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Division Currency\n //\t\t\t\tdealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(401, sSheetName, sWorkbook, \"Division\", \"INDSPM\", true);\n //\t\t\t\tdealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(402, sSheetName, sWorkbook, \"Division\", \"INDSPM\", true);\n //\t\t\t\tdealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(403, sSheetName, sWorkbook, \"Division\", \"INDSPM\", true);\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n \n //Function To verify Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(409, sSheetName, sWorkbook);\n\n //Function To verify Account Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForAccounts(410, sSheetName, sWorkbook);\n\n // Deal Currency on Product financial summary on deal level\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(416, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(417, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(418, sSheetName, sWorkbook, \"Deal\", \"\");\n\n //Function To Verify Product financial summary on deal level\n dealManagementPageEvents.DealInformationProductFinancialSummarySwitchToggle(); //103\n\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(416, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(417, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(418, sSheetName, sWorkbook, \"Division\", \"\"); //103\n\n\n //Function To Verify Division financial summary for deal currency\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(424, sSheetName, sWorkbook, \"Deal\");\n\n //function to switch currency toggle\n dealManagementPageEvents.DealInformationDivisionFinancialSummarySwitchToggle();\n\n //Function To Verify Division financial summary for division currency\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(424, sSheetName, sWorkbook, \"Division\");\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(430, sSheetName, sWorkbook);\n\n //Function to Verify Deal information Deal Status And Deal Version Status\n dealManagementPageEvents.FnVerifyDealInformationDealStatusAndDealVersionStatus(\"Pending For Approval\", \"Finalized\"); //96\n\n //verification of deal information \n dealManagementPageEvents.FnDealInformationVerification(434, sSheetName, sWorkbook);\n\n //Function to Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Function To verify of view and edit pricing on Pricing and commitment screen i,e Personal Hierarchy Information\n //\t\t\t\t//dealManagementPageEvents.FnViewAndEditPricing(344, sSheetName, sWorkbook); //109 SKIP Because have hierarchy \"DE_AUT02,Account Services\" & \"DE_AUTO3,Payment Services\"\n dealManagementPageEvents.FnViewAndEditPricing(366, sSheetName, sWorkbook); //109 // instead 344 checking 366 because Reporting/Swift\" are on 366 \n //error checking \"DE_AUT01,Corporate Banking\" instead \"DE_AUTO4,Reporting/Swift\" \n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //Function for return for submitter and update data\n dealManagementPageEvents.FnReturnForSubmitterAndUpdateData(\"Deal Return\", \"Deal Returned\");\n\n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"PENDING FOR APPROVAL\"); //111\n\n dealManagementPageEvents.FnVerifyDealFinancialSummaryStatus(\"PENDING FOR APPROVAL\"); //111\n\n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"PENDING FOR APPROVAL\"); ///111\n\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\");\n\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(DealId, true, true, false, \"PMBK1\");\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Relationship Manager 1\", \"Returned Deal to Submitter as Rejected\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n AF.FnLoginChange(getDriver(), \"RMBK1\"); //116\n AF.FnNavigation(getDriver(), \"Deal Dashboard\"); //117\n\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(DealId, true, true, false, \"RMBK1\"); //118\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard(); //119\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Relationship Manager 1\", \"Returned Deal to Submitter as Rejected\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard();\n\n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"PENDING FOR APPROVAL\"); //121\n\n dealManagementPageEvents.FnVerifyDealFinancialSummaryStatus(\"PENDING FOR APPROVAL\"); //121\n\n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"PENDING FOR APPROVAL\"); ///121\n\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CPIVFN_046\", \"APPROVER-RECOMMENDED\"); //121\n\n dealManagementPageEvents.FnVerifyPriceItemApproverOnPricingAndCommitment(\"CPIVFN_046\", \"Pricing Manager1\"); //122\n\n // Function To Update and verify price Item rate and check validation for incorrect input On \"Pricing & Commitment\" screen UI\n dealManagementPageEvents.FnUpdateAndVerifyPriceItemsRatesOnPricingAndCommitmentScreen(\"CPIVFN_046\", \"25.00\", \"23.22\", \"\"); //123 update rate\n\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //124\n\n //Function To Navigate to view and edit pricing on Pricing and commitment screen\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Deal Currency\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(496, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", true); //125\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(497, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", true);\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(498, sSheetName, sWorkbook, \"Deal\", \"INDSPM\", true);\n\n //Function To Switch Currency Toggle For Product financial summary \n dealManagementPageEvents.PricingAndCommitmentProductFinancialSummarySwitchToggle(); //126\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Division Currency\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(496, sSheetName, sWorkbook, \"Division\", \"INDSPM\", true); //127\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(497, sSheetName, sWorkbook, \"Division\", \"INDSPM\", true);\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnCustomerOrAccountPricingScreen(498, sSheetName, sWorkbook, \"Division\", \"INDSPM\", true);\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n\n //Function To verify Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(504, sSheetName, sWorkbook); //127\n\n\n //Function To verify Account Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForAccounts(505, sSheetName, sWorkbook); //127\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Deal Currency\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(511, sSheetName, sWorkbook, \"Deal\", \"\"); //129\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(512, sSheetName, sWorkbook, \"Deal\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(513, sSheetName, sWorkbook, \"Deal\", \"\");\n\n //Function To Switch Currency Toggle For Product financial summary \n dealManagementPageEvents.DealInformationProductFinancialSummarySwitchToggle(); //130\n\n //Function To Verify PRODUCT FINANCIAL SUMMARY For Division Currency\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(511, sSheetName, sWorkbook, \"Division\", \"\"); //130\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(512, sSheetName, sWorkbook, \"Division\", \"\");\n dealManagementPageEvents.FnVerifyProductFinancialSummaryOnDealLevels(513, sSheetName, sWorkbook, \"Division\", \"\");\n //error //product\n\n //Function To Verify Division financial summary for deal currency\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(519, sSheetName, sWorkbook, \"Deal\");\n\n //function to switch currency toggle\n dealManagementPageEvents.DealInformationDivisionFinancialSummarySwitchToggle();\n\n //Function To Verify Division financial summary for division currency\n dealManagementPageEvents.FnVerifyDivisionFinancialSummary(519, sSheetName, sWorkbook, \"Division\");\n\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(525, sSheetName, sWorkbook); //133\n\n //verification of deal information \n dealManagementPageEvents.FnDealInformationVerification(529, sSheetName, sWorkbook); //135\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnSendDealForApprovalFromDealInformation();\n\n\n //Navigate to Deal Approver Dashboard Through INDPM user\n AF.FnLoginChange(getDriver(), \"INDPM\");\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\");\n\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\");\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"India Pricing Manager\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard();\n\n //Function To verify Approval status for SPM on View And Edit Pricing\n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"APPROVED\");\n\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n //65 Pending = Click on View and Edit pricing button = The status of the price items should be displayed of the previous approver.\tThe price item should in 'error' status\n\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_021\", \"APPROVED\"); //142\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_022\", \"APPROVED\"); //142\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_024\", \"APPROVED\"); //142\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_025\", \"APPROVED\"); //142\n //Error -> not showing status for other reporting/swift price items i.e cpivfn_046 to CPICFN_052\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage();\n\n //Function to navigate Pricing and commitment edit \n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_022\", \"APPROVED\"); //144\n\n dealManagementPageEvents.FnVerifyStatusOfSeasonalPriceItemOnPricingAndCommitment(\"CC_022\", \"APPROVED\", 1); //144\n //error \n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnSendDealForApprovalFromDealInformation(); //145\n\n\n //Navigate to Deal Approver Dashboard Through INDPM user\n AF.FnLoginChange(getDriver(), \"INDSPM\"); //146\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //147\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\"); //148\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"India Senior Pricing Manager\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //150\n\n //Function To verify Approval status for SPM on View And Edit Pricing\n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"APPROVED\"); //151\n\n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n //65 Pending = Click on View and Edit pricing button = The status of the price items should be displayed of the previous approver.\tThe price item should in 'error' status\n\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_022\", \"APPROVED\"); //152\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_024\", \"APPROVED\"); //152\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage();\n\n //Function to navigate Pricing and commitment edit \n dealManagementPageEvents.FnNavigateToViewAndEditPricing();\n\n dealManagementPageEvents.FnVerifyStatusOfPriceItemOnCommitment(\"CC_024\", \"APPROVED\"); //154\n\n //Function for Navigation To Deal Information From Pricing And Commitments\n dealManagementPageEvents.FnNavigationToDealInformationFromPricingAndCommitments();\n\n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"APPROVED\"); //155\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnApproveDealFromDealInformation(); //156\n\n // Navigate to \"Deal Approver Dashboard\"\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //157\n\n //Function To Search for deal ID created which is not longer assign to logged in user\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(DealId, true, false, false, \"INDSPM\"); //157\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard(); //158\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Pricing Manager 1\", \"Unapproved\");\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow(); //158\n\n //Navigate to Deal Approver Dashboard Through INDPM user\n AF.FnLoginChange(getDriver(), \"PMBK1\"); //159\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //160\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\"); //161\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Pricing Manager 1\", \"Unapproved\"); //162\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //150\n\n //Function To verify Approval status for Person Hierarchy Financial Summary \n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"APPROVED\"); //164\n\n //Function To verify Approval status for Division Financial Summary \n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"APPROVED\"); //164\n\n // -> (price item status not exists for reporting/swift priceitems) 164 = Click on View and Edit pricing button\tThe status of the price items should be displayed of the previous approver.\n //Error\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage();\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnSendDealForApprovalFromDealInformation(); //166\n\n\n //Navigate to Deal Approver Dashboard Through INDPM user\n AF.FnLoginChange(getDriver(), \"SPMBK1\"); //167\n AF.FnNavigation(getDriver(), \"Deal Approver Dashboard\"); //168\n\n //Function To Verify Deal ToDo Type\n dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Approver_Dashboard\"); //169\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId);\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Pending For Approval\", \"Senior Pricing Manager 1\", \"Unapproved\"); //170\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //171\n\n //Function To verify Approval status for Person Hierarchy Financial Summary \n dealManagementPageEvents.FnVerifyCustomerStatusOnPersonalhierarchy(\"APPROVED\"); //172\n\n //Function To verify Approval status for Division Financial Summary \n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"APPROVED\"); //172\n\n //Function To verify Approval status for Deal Financial Summary \n dealManagementPageEvents.FnVerifyDealFinancialSummaryStatus(\"APPROVED\"); //172\n //not showing approval status\n\n\n // -> (Price item status not exists i,e empty status for Reporting/swift CPIVFN_045 like price items) Testcase Excel line no :-172,\tClick on View and Edit pricing button,\tThe status of the price items should be displayed of the previous approver.\n //Error ->173\n\n //To simulate deal and verify deal simulated successfully\n dealManagementPageEvents.FnDealSimulationOnDealInformationPage(); //174\n\n\n\n //Function To verify Approval status for Division Financial Summary \n dealManagementPageEvents.FnVerifydivisionFinancialSummaryStatus(\"APPROVED\"); //176\n\n //Function To verify Approval status for Deal Financial Summary \n //dealManagementPageEvents.FnVerifyDealFinancialSummaryStatus(\"APPROVED\"); //176\n\n //Function To Send deal for approval \n dealManagementPageEvents.FnApproveDealFromDealInformation(); //177\n\n\n AF.FnLoginChange(getDriver(), \"RMBK1\"); //178\n AF.FnNavigation(getDriver(), \"Deal Dashboard\"); //179\n\n //Function To Verify Deal ToDo Type\n// dealManagementPageEvents.FnVerifyDealToDoType(DealId, \"Deal_Dashboard\"); //179\n\n //Function To Search for deal ID created \n dealManagementPageEvents.FnSearchDealIdFromDealDashboard(DealId); //180\n\n //Function To navigate to deal Approval Workflow page from deal approval dashboard\n dealManagementPageEvents.FnNavigationToDealApprovalWorkflowFromDealApprovalDashboard();\n\n //Function for View and verify Approval Workflow of deal \n dealManagementPageEvents.FnViewAndverifyDealApprovalWorkflowForRecentTODOROLE(\"Approved\", \"Relationship Manager 1\", \"Returned Deal to Submitter as Approved\"); //181\n\n //Function To navigate to deal approval dashboard from deal Approval Workflow page \n dealManagementPageEvents.FnNavigationToDealApprovalDashboardFromDealApprovalWorkflow();\n\n //Function To navigate to deal information from deal approval dashboard page \n dealManagementPageEvents.FnNavigationToDealInformationFromDealApprovalDashboard(); //182\n\n //Function To Finalize Deal \n dealManagementPageEvents.FnFinalizeDealFromDealInformation();\n\n //Function To Accept Deal \n dealManagementPageEvents.FnAcceptDealFromDealInformation(533, sSheetName, sWorkbook);\n\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n\n\n }",
"@Test\n\tpublic void TC040DMS_04(){\n\t\tresult.addLog(\"ID : TC040DMS_04 : Verify that the Marketing statsus is changed to 'DECLINED' when DTS Marketing declines the marketing materials\");\n\t\t/*\n\t\t\tPre-Condition: The tuning state is approved.\n\t\t\t1. Log into DTS portal as a DTS user\n\t\t\t2. Navigate to \"Accessories\" page\n\t\t\t3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\t\tVP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t\t4. Upload a marketing material file\n\t\t\tVP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t\t5. Expand the \"Partner Actions\" link in step 2 : Marketing Approval\n\t\t\t6. Click \"Request Marketing Review\" link\n\t\t\tVP:Marketing status is changed to \" DTS Review\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed \n\t\t\t7. Click \"Decline Marketing\" link\n\t\t */\n\t\t/*\n\t\t * Pre-Condition: The tuning state is approved\n\t\t */\n\t\t// Navigate to accessories page\n\t\thome.click(Xpath.LINK_PARTNER_ACCESSORIES);\n\t\t// Click Add Accessory link\n\t\thome.click(AccessoryMain.ADD_ACCESSORY);\n\t\t// Create accessory\n\t\tHashtable<String,String> data = TestData.accessoryTuning();\n\t\thome.addAccessoriesPartner(AddAccessory.getHash(), data);\n\t\t// Approve tuning\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_1);\n\t\thome.click(AccessoryInfo.APPROVE_TUNING);\n\t\t/*\n\t\t * ****************************************************************\n\t\t */\n\t\t// 2. Navigate to \"Accessories\" page\n\t\thome.click(Xpath.linkAccessories);\n\t\t// 3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\thome.selectAnaccessorybyName(data.get(\"name\"));\n\t\t/*\n\t\t * VP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"UNSUBMITTED\");\n\t\t// 4. Upload a marketing material file\n\t\thome.click(AccessoryInfo.EDIT_MODE);\n\t\thome.uploadFile(AddAccessory.ADD_MARKETING, Constant.AUDIO_ROUTE_FILE);\n\t\thome.clickOptionByIndex(AddAccessory.MARKETING_METERIAL_TYPE, 1);\n\t\thome.click(AddAccessory.SAVE);\n\t\t/*\n\t\t * VP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t */\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.PARTNER_ACTIONS_STEP_2));\n\t\t// 5. Expand the \"Partner Actions\" link in step 2: Marketing Approval\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_2);\n\t\t// 6. Click \"Request Marketing Review\" link\n\t\thome.click(AccessoryInfo.REQUEST_MARKETING_REVIEW);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"PENDING DTS REVIEW\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"PENDING DTS REVIEW\");\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.APPROVE_MARKETING));\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.DECLINE_MARKETING));\n\t\t// 7. Click \"Decline Marketing\" link\n\t\thome.click(AccessoryInfo.DECLINE_MARKETING);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"DECLINED\"\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"DECLINED\");\n\t\t// Delete accessory\n\t\thome.doDelete(AccessoryInfo.DELETE);\n\t}",
"@Test(priority = 5, groups = {\n \"sanity testing\"\n })\n public void BANK_82_6_Test_43706() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"BANK_82_6_Test_43706\";\n BaseTest.sScriptName = \"BANK_82_6_Test_43706\";\n BaseTest.sOTMTestcaseID = \"\";\n BaseTest.sTestDescription = \"Add Propsect Person as child of Existing Customer and keep includeHierarchyFlag as false thus verify Prospect Person should not get shown for deal\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n\n //Login to the system\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n\n\n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/BANK_82_6_Test_43706.xlsx\";\n String sSheetName = \"TEST_DATA\";\n \n String ExistingPersonId = CF.FnGetCellValue(85, 2, sSheetName, sWorkbook).toString().trim();\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n\n //To Update Prospect Person As Child of Existing Customer\n String UpdateProspectAsChild = \"{\\\"C1-ADDPROSPERSONREST\\\":{\\\"prospectPersonId\\\":\\\"2049157035\\\",\\\"actionFlag\\\":\\\"UPD\\\",\\\"prospectPersonName\\\":\\\"BANK_82_PRSPCH1_001\\\",\\\"division\\\":\\\"IND\\\",\\\"customerSegment\\\":\\\"COMM\\\",\\\"customerTier\\\":\\\"T\\\",\\\"accessGroup\\\":\\\"***\\\",\\\"emailAddress\\\":\\\"BANK_82_PRSPCH1_001@oracle.com\\\",\\\"status\\\":\\\"ACTIVE\\\",\\\"birthDate\\\":\\\"1994-03-21\\\",\\\"address1\\\":\\\"addr1BANK_82_PRSPCH1_001\\\",\\\"prosPerIdentifierList\\\":{\\\"personIdNumber\\\":\\\"Reg_BANK_82_PRSPCH1_001\\\",\\\"persIsPrimaryId\\\":\\\"true\\\",\\\"idType\\\":\\\"COREG\\\"},\\\"prosChildRelationList\\\":{\\\"childPersonId\\\":\\\"3002038115\\\",\\\"personRelationshipType\\\":\\\"CHILD\\\",\\\"childPerType\\\":\\\"PRSP\\\",\\\"startDate\\\":\\\"2020-01-01\\\"},\\\"prosParentPerRelationList\\\":{\\\"parentPersonId\\\":\\\"8797366188\\\",\\\"personRelationshipType\\\":\\\"CHILD\\\",\\\"parentPerType\\\":\\\"EPER\\\",\\\"startDate\\\":\\\"2020-01-01\\\"},\\\"prosAccountList\\\":{\\\"prospectAccountId\\\":\\\"8043703981\\\",\\\"customerClass\\\":\\\"DM-CORP\\\",\\\"accountDivision\\\":\\\"IND\\\",\\\"status\\\":\\\"ACTIVE\\\",\\\"setUpDate\\\":\\\"2020-01-01\\\",\\\"currency\\\":\\\"USD\\\",\\\"billCycle\\\":\\\"BKEM\\\",\\\"accountAccessGroup\\\":\\\"***\\\",\\\"prosAcctIdentifierList\\\":{\\\"accountIdentifierType\\\":\\\"C1_F_ANO\\\",\\\"isPrimaryId\\\":\\\"true\\\",\\\"accountNumber\\\":\\\"EAI_BANK_82_PRSPCH1_001\\\"}}}}\";\n WF.FnPostRequestByString(sCreateDealProspectResource, UpdateProspectAsChild, sContentTypeHeader, sAcceptTypeHeader);\n\n String sTotalProspectAccount = (String) DB.FnGetDBColumnValue(\"SELECT COUNT(*) FROM C1_PRS_ACCT_PER WHERE per_id = '\" + ExistingPersonId + \"'\", \"COUNT(*)\", System.getProperty(\"dbName\"), System.getProperty(\"dbUserName\"), System.getProperty(\"dbPassword\"), System.getProperty(\"dbMachineIP\"), System.getProperty(\"dbPort\"));\n\n System.out.println(\"sTotalProspectAccount:-\" + sTotalProspectAccount);\n\n if (sTotalProspectAccount.equalsIgnoreCase(\"0\")) {\n //// To Add Propsect Account to Existing Person\n String AddProspectAccountToEPERJsonRequest = \"{\\\"C1-ProspectAccountREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"mainEntityId\\\":\\\"\" + ExistingPersonId + \"\\\",\\\"mainEntityType\\\":\\\"EPER\\\",\\\"status\\\":\\\"ACTIVE\\\",\\\"customerClass\\\":\\\"DM-CORP\\\",\\\"accountDivision\\\":\\\"IND\\\",\\\"setUpDate\\\":\\\"2020-01-01\\\",\\\"currency\\\":\\\"USD\\\",\\\"accountAccessGroup\\\":\\\"***\\\",\\\"prosAcctCharacteristicList\\\":[{\\\"characteristicValue\\\":\\\"MH\\\",\\\"effectiveDate\\\":\\\"2021-04-04\\\",\\\"characteristicType\\\":\\\"VG_STATE\\\"}],\\\"prosAcctIdentifierList\\\":[{\\\"accountIdentifierType\\\":\\\"C1_F_ANO\\\",\\\"isPrimaryId\\\":\\\"true\\\",\\\"accountNumber\\\":\\\"EAI_BANK_82_EPPRSP_001\\\"},{\\\"accountIdentifierType\\\":\\\"ACCT_NM\\\",\\\"isPrimaryId\\\":\\\"false\\\",\\\"accountNumber\\\":\\\"AN_BANK_82_EPPRSP_001\\\"}]}}\";\n WF.FnPostRequestByString(sCreateDealProspectAccountResource, AddProspectAccountToEPERJsonRequest, sContentTypeHeader, sAcceptTypeHeader);\n }\n \n //Added on QADATA\n// DB.FnUpdateBillableChargeDates(70, sSheetName, sWorkbook);\n// DB.FnUpdateBillableChargeDates(71, sSheetName, sWorkbook);\n// DB.FnUpdateBillableChargeDates(72, sSheetName, sWorkbook);\n// DB.FnUpdateBillableChargeDates(73, sSheetName, sWorkbook);\n// DB.FnUpdateBillableChargeDates(74, sSheetName, sWorkbook);\n\n dealManagementPageEvents.FnAddBillableCharge(128, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(129, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(130, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(131, sSheetName, sWorkbook);\n dealManagementPageEvents.FnAddBillableCharge(132, sSheetName, sWorkbook);\n\n\n String sStartDate = CF.FnGetCurrentDateInSpcificFormat(\"yyyy-MM-dd\");\n CF.FnTestCaseStatusReport(\"Pass\", \"Deal Start date used for Deal creation Is-> \" + sStartDate);\n\n String sDateName = CommonFunctions.FnGetUniqueId();\n String sDealIdentifier = \"BANK_82_6_Test_43706\";\n sDealIdentifier = sDealIdentifier + \"_\" + sDateName;\n\n String sDealId, smodelId = \"\";\n\n //DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n\n //################ Deal Creation IWS ####################//\n String sDealCreation = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"dealDetails\\\":{\\\"dealEntityDetails\\\":{\\\"personId\\\":\\\"\" + ExistingPersonId + \"\\\"},\\\"dealIdentifier\\\":\\\"\" + sDealIdentifier + \"\\\",\\\"dealEntityType\\\":\\\"EPER\\\",\\\"contractedDealFlag\\\":\\\"false\\\",\\\"currency\\\":\\\"USD\\\",\\\"dealTypeCode\\\":\\\"DLAPR\\\",\\\"startDate\\\":\\\"\" + sStartDate + \"\\\",\\\"simulationTypeFlag\\\":\\\"CUST\\\",\\\"reviewFrequency\\\":\\\"12\\\",\\\"dealDescription\\\":\\\"Deal_BANK_82_7_001 desc\\\",\\\"dealVersionDescription\\\":\\\"Deal_BANK_82_7_001 desc ver\\\",\\\"dealFrequency\\\":\\\"12\\\",\\\"skipReferenceFlag\\\":\\\"true\\\",\\\"priceSelectionDate\\\":\\\"\" + sStartDate + \"\\\",\\\"usagePeriod\\\":\\\"12\\\",\\\"hierarchyFilterFlag\\\":\\\"WHEP\\\",\\\"templateFlag\\\":\\\"false\\\"},\\\"templateReferenceDetails\\\":{\\\"copyBasicDetailsFlag\\\":\\\"false\\\",\\\"copyPricingFlag\\\":\\\"false\\\",\\\"copyUsageFlag\\\":\\\"false\\\"},\\\"dealTermsAndConditionsDetails\\\":{\\\"termsAndConditionsList\\\":[{\\\"description\\\":\\\"DEAL_T&C1\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C1\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C1\\\"},{\\\"description\\\":\\\"DEAL_T&C2\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C2\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C2\\\"}],\\\"adhocTermsAndCondition\\\":\\\"ADHOCTERMSANDCONDITIONS\\\"},\\\"productDetailsList\\\":[{\\\"productCode\\\":\\\"PRODUCT_CON_01\\\"},{\\\"productCode\\\":\\\"PRODUCT_CON_02\\\"}],\\\"referenceDetails\\\":{\\\"referUsageSw\\\":false,\\\"referPriceSw\\\":false,\\\"includeChildHierarchy\\\":false}}}\";\n\n //System.out.println(\"BANK_82_6_Test_43706 Request ->\"+sDealCreation);\n Hashtable < String, String > DealDetails = new Hashtable < String, String > ();\n\n DealDetails = DM.FnCreateDeal(sDealCreation, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n //System.out.println(sDealIdentifier+\" Created Deal ID Is-> \" + DealDetails);\t\t\t\n\n sDealId = DealDetails.get(\"sDealId\");\n smodelId = DealDetails.get(\"sModelId\");\n sDealIdentifier = DealDetails.get(\"sDealIdentifier\");\n\n //This function to verify Deal Information Details from DB Table\n DB.FnVerifyDealCreationInfoIWS(85, sSheetName, sWorkbook, sDealId);\n\n\n //################ Deal PriceList Assignment IWS ####################//\n //To Perform Operation On Deal i.e. Add , Update , Delete pricelist\n dealManagementPageEvents.FnDealPricelistAddUpdateDeleteIWS(89, sSheetName, sWorkbook, sDealId, smodelId);\n //dealManagementPageEvents.FnDealPricelistAddUpdateDeleteIWS(90, sSheetName, sWorkbook, sDealId, smodelId);\n\n //################ Deal PSEL READ IWS ####################//\n String sDealPSELREAD = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"READ\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sDealPSELREAD);\n DM.FnReadPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELREAD, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELSELECT = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"NPI_021\\\",\\\"priceItemInfo\\\":\\\"NPI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_022\\\",\\\"priceItemInfo\\\":\\\"NPI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_023\\\",\\\"priceItemInfo\\\":\\\"NPI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_024\\\",\\\"priceItemInfo\\\":\\\"NPI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_025\\\",\\\"priceItemInfo\\\":\\\"NPI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_036\\\",\\\"priceItemInfo\\\":\\\"NPI_036\\\",\\\"parameterInfo\\\":\\\"DM_COUNTRY=IND,DM_STATE=AP\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_036\\\",\\\"priceItemInfo\\\":\\\"NPI_036\\\",\\\"parameterInfo\\\":\\\"DM_COUNTRY=IND,DM_STATE=KA\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_021\\\",\\\"priceItemInfo\\\":\\\"PI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_022\\\",\\\"priceItemInfo\\\":\\\"PI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_023\\\",\\\"priceItemInfo\\\":\\\"PI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_033\\\",\\\"priceItemInfo\\\":\\\"PI_033\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_024\\\",\\\"priceItemInfo\\\":\\\"PI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_025\\\",\\\"priceItemInfo\\\":\\\"PI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_026\\\",\\\"priceItemInfo\\\":\\\"PI_026\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_027\\\",\\\"priceItemInfo\\\":\\\"PI_027\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR,DM_TYPE=BT\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=USD\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_029\\\",\\\"priceItemInfo\\\":\\\"PI_029\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_030\\\",\\\"priceItemInfo\\\":\\\"PI_030\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_031\\\",\\\"priceItemInfo\\\":\\\"PI_031\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"}]}}}\";\n System.out.println(\"Request ->\" + sDealPSELSELECT);\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELSELECT, sContentTypeHeader, sAcceptTypeHeader);\n\n\n AF.FnNavigation(getDriver(), \"Deal Dashboard\"); //for Test\n\n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(sDealId, false, false, true, \"RMBK1\");\n\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sSimulateDeal);\n DM.FnSimulateDealByRequest(sSimulateDeal, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n //System.out.println(\"Simulation Deal ID Is-> \" + sSimulateDealDealId);\n\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(85, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(85, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(85, sSheetName, sWorkbook, smodelId);\n\n //This function to verify Deal Simulation Summary Details from DB Table\n DB.Deal_Simulation_Summary(96, sSheetName, sWorkbook, smodelId);\n\n\n //This function to verify Deal Financial Summary Details from DB Table\n DB.Deal_Financial_Summary(96, sSheetName, sWorkbook, smodelId);\n\n\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForDivisionCurrency(102, sSheetName, sWorkbook);\n\n //Function To verify Personal Hierarchy Information On Deal Information for \"Customer Division / Account Currency\"\n dealManagementPageEvents.DealInformationPersonHierarchySwitchToggle();\n\n\n //Function To verify Division Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForDivisionCurrency(102, sSheetName, sWorkbook);\n\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(110, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(114, sSheetName, sWorkbook);\n\n //Function To verify Deal Logs \n dealManagementPageEvents.FnVerifyDealLogs(118, sSheetName, sWorkbook); //issue in assert sCreationDateTime\n dealManagementPageEvents.FnVerifyDealLogs(119, sSheetName, sWorkbook); //issue in assert sCreationDateTime\n dealManagementPageEvents.FnVerifyDealLogs(120, sSheetName, sWorkbook); //issue in assert sCreationDateTime\n\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n }",
"public void policyInsuredInterestMiscLiabilityVerifyHelper(TestData testData,ExecutionTestSteps executionTestStep,CustomAssert assertReference,WebDriver driver,String stepGroup,PolicyEntity policyEntity) throws InterruptedException {\r\n\r\n\t\tFrameworkServices.logMessage(\"<B><i> Executing:: Policy Insured Interest Misc Liability Verify Helper </i></B>\");\r\n\t\tList<PolicyMemberDetailsEntity>policyMemberDetailsEntityList=testData.getData().get(PolicyMemberDetailsEntity.class);\r\n\t\tfor(PolicyMemberDetailsEntity policyMemberDetailsEntityListData:policyMemberDetailsEntityList ){\r\n\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(policyMemberDetailsEntityListData.getChildKey())){\r\n\t\t\t\tif(policyMemberDetailsEntityListData.getAction().equalsIgnoreCase(\"verify\") && policyMemberDetailsEntityListData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\tPolicy_MemberSearchPage policyMemberSearchPage=new Policy_MemberSearchPage(driver, \"Policy Insured Interest\");\r\n\t\t\t\t\tpolicyMemberSearchPage.navigateToNewButton(policyMemberDetailsEntityListData);\r\n\t\t\t\t\tpolicyMemberSearchPage.fillandSearchPolicyMemberDetails(policyMemberDetailsEntityListData,assertReference);\r\n\r\n\r\n\t\t\t\t\t///*************Policy Insured Interest Code verify***********\r\n\t\t\t\t\tif(policyMemberDetailsEntityListData.getAction().equalsIgnoreCase(\"verify\") && policyMemberDetailsEntityListData.getStepGroup().equalsIgnoreCase(stepGroup)){{\r\n\t\t\t\t\t\tPolicyMemberDetails policyMemberDetails =new PolicyMemberDetails(driver, \"Policy Insured Interest Details\");\r\n\t\t\t\t\t\tpolicyMemberDetails.fillAndSaveMemberDetails(policyMemberDetailsEntityListData, assertReference);\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t///*********** Attribute in insured interest Details ******************** \r\n\r\n\r\n\t\t\t\t\tif(policyMemberDetailsEntityListData.getBooleanValueForField(\"ConfigAttributesTab\")){\r\n\t\t\t\t\t\tList<MemberAttributesEntity> memberAttributesEntityList=testData.getData().get(MemberAttributesEntity.class);\r\n\t\t\t\t\t\tfor(MemberAttributesEntity memberAttributesEntityData: memberAttributesEntityList){\r\n\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(memberAttributesEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\tif(memberAttributesEntityData.getAction().equalsIgnoreCase(\"verify\") && memberAttributesEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\tPolicyMemberAttributes policyMemberAttributesPage= new PolicyMemberAttributes(driver, \"Policy Insured Interest Attributes\"); \r\n\t\t\t\t\t\t\t\t\tpolicyMemberAttributesPage.fillAndProceedPolicyMemberAttributes(memberAttributesEntityData, assertReference);\r\n\t\t\t\t\t\t\t\t\tif(memberAttributesEntityData.getBooleanValueForField(\"ConfigProceedButton\")){\r\n\r\n\t\t\t\t\t\t\t\t\t\t/*****Attribute in Insured Interest attribute Page after Click on proceed**********/\r\n\r\n\t\t\t\t\t\t\t\t\t\tList<RiskDetailsFirstMiscEntity> riskDetailsFirstMiscEntityList=testData.getData().get(RiskDetailsFirstMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\tfor(RiskDetailsFirstMiscEntity riskDetailsFirstMiscEntityData:riskDetailsFirstMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(riskDetailsFirstMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsFirstMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && riskDetailsFirstMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tRiskDetailsFirstPageMiscInsured riskDetailsFirstPageMiscInsured= new RiskDetailsFirstPageMiscInsured(driver, \"Policy Insured Risk Details First Page\", 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\triskDetailsFirstPageMiscInsured.fillandSubmitRiskDetailsFirstPage(riskDetailsFirstMiscEntityData, assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//sonali\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsFirstMiscEntityData.getStringValueForField(\"Product\").equalsIgnoreCase(\"PD\")||riskDetailsFirstMiscEntityData.getStringValueForField(\"Product\").equalsIgnoreCase(\"PK\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpDRiskDetailPageVerifyHelper(testData, executionTestStep, assertReference, driver, stepGroup, policyEntity);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//PF{Null page-->premiumRatePFMiscEntity,Voluntry excess-->VoluntaryExcessDetailsEntity}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsFirstMiscEntityData.getStringValueForField(\"Product\").equalsIgnoreCase(\"PF\")){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<PremiumRatePFMiscEntity> premiumRatePFMiscEntityList=testData.getData().get(PremiumRatePFMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(PremiumRatePFMiscEntity premiumRatePFMiscEntityData:premiumRatePFMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(premiumRatePFMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(premiumRatePFMiscEntityData.getAction().equalsIgnoreCase(\"Verify\") && premiumRatePFMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPolicyInsuredIntrestAttributePremiumRateForPFMisc policyInsuredIntrestAttributePremiumRateForPFMisc= new PolicyInsuredIntrestAttributePremiumRateForPFMisc(driver, \"Policy Insured Interest Attributes second page\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpolicyInsuredIntrestAttributePremiumRateForPFMisc.fillAndSubmitPolInsIntrAttrPremiumRateDetailsForPF(premiumRatePFMiscEntityData,assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(premiumRatePFMiscEntityData.getBooleanValueForField(\"ConfigForwardButton\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvoluntaryExcessDetailsPageVerifyHelper(testData, executionTestStep, assertReference, driver, stepGroup, policyEntity);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/****************************Risk Details Next Pages**************************/\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsFirstMiscEntityData.getBooleanValueForField(\"ConfigRiskDetailsSecondPage\")){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<RiskDetailsSecndMiscEntity> riskDetailsSecndMiscEntityList=testData.getData().get(RiskDetailsSecndMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(RiskDetailsSecndMiscEntity riskDetailsSecndMiscEntityData:riskDetailsSecndMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(riskDetailsSecndMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsSecndMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && riskDetailsSecndMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRiskDetailsSecondPageMiscInsured riskDetailsSecondPageMiscInsured= new RiskDetailsSecondPageMiscInsured(driver, \"Policy Insured Risk Details Second Page\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\triskDetailsSecondPageMiscInsured.fillandSubmitRiskDetailsSecondPage(riskDetailsSecndMiscEntityData, assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsSecndMiscEntityData.getBooleanValueForField(\"ConfigRiskDetailsThirdPage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<RiskDetailsThirdMiscEntity> riskDetailsThirdMiscEntityList=testData.getData().get(RiskDetailsThirdMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(RiskDetailsThirdMiscEntity riskDetailsThirdMiscEntityData:riskDetailsThirdMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(riskDetailsThirdMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsThirdMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && riskDetailsThirdMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRiskDetailsThirdPageMiscInsured riskDetailsThirdPageMiscInsured= new RiskDetailsThirdPageMiscInsured(driver, \"Policy Insured Risk Details Third Page\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\triskDetailsThirdPageMiscInsured.fillandSubmitRiskDetailsThirdPage(riskDetailsThirdMiscEntityData, assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsThirdMiscEntityData.getBooleanValueForField(\"ConfigRiskDetailsFourthPage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<RiskDetailsFourthMiscEntity> riskDetailsFourthMiscEntityList=testData.getData().get(RiskDetailsFourthMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(RiskDetailsFourthMiscEntity riskDetailsFourthMiscEntityData:riskDetailsFourthMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(riskDetailsFourthMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsFourthMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && riskDetailsFourthMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\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\tRiskDetailsFourthPageMiscInsured riskDetailsFourthPageMiscInsured= new RiskDetailsFourthPageMiscInsured(driver, \"Policy Insured Risk Details Fourth Page\");\r\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\triskDetailsFourthPageMiscInsured.fillandSubmitRiskDetailsFourthPage(riskDetailsFourthMiscEntityData, assertReference);\r\n\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/***************************************Extension Pages*************************************************/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(riskDetailsFirstMiscEntityData.getBooleanValueForField(\"ConfigExtensionFirstPage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<Exten1DetailsMiscEntity> exten1DetailsMiscEntityList=testData.getData().get(Exten1DetailsMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(Exten1DetailsMiscEntity exten1DetailsMiscEntityData:exten1DetailsMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(exten1DetailsMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(exten1DetailsMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && exten1DetailsMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExten1DetailsMiscInsurePage exten1DetailsMiscInsurePage= new Exten1DetailsMiscInsurePage(driver, \"Policy Insured Extension First Page\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texten1DetailsMiscInsurePage.fillandSubmitExten1DetailsMiscInsurePage(exten1DetailsMiscEntityData, assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(exten1DetailsMiscEntityData.getBooleanValueForField(\"ConfigExtensionSecondPage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<Exten2DetailsMiscEntity> exten2DetailsMiscEntityList=testData.getData().get(Exten2DetailsMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(Exten2DetailsMiscEntity exten2DetailsMiscEntityData:exten2DetailsMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(exten2DetailsMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(exten2DetailsMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && exten2DetailsMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExten2DetailsMiscInsurePage exten2DetailsMiscInsurePage= new Exten2DetailsMiscInsurePage(driver, \"Policy Insured Extension Second Page\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texten2DetailsMiscInsurePage.fillandSubmitExten2DetailsMiscInsurePage(exten2DetailsMiscEntityData, assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(exten2DetailsMiscEntityData.getBooleanValueForField(\"ConfigExtensionThirdPage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<Exten3DetailsMiscEntity> exten3DetailsMiscEntityList=testData.getData().get(Exten3DetailsMiscEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(Exten3DetailsMiscEntity exten3DetailsMiscEntityData:exten3DetailsMiscEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(exten3DetailsMiscEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(exten3DetailsMiscEntityData.getAction().equalsIgnoreCase(\"verify\") && exten3DetailsMiscEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\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\tExten3DetailsMiscInsurePage exten3DetailsMiscInsurePage= new Exten3DetailsMiscInsurePage(driver, \"Policy Insured Extension Third Page\");\r\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\texten3DetailsMiscInsurePage.fillandSubmitExten3DetailsMiscInsurePage(exten3DetailsMiscEntityData, assertReference);\r\n\r\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/**********************************Voluntary Excess Details Page*****************************************/\r\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\tif(exten3DetailsMiscEntityData.getBooleanValueForField(\"ConfigVoluntaryExcessDetailsPage\")){\t\r\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\tvoluntaryExcessDetailsPageVerifyHelper(testData, executionTestStep, assertReference, driver, stepGroup, policyEntity);\r\n\r\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}\r\n\r\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}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\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\r\n\r\n\t\t\t\t\t/************************AttributeEnd**********/\r\n\t\t\t\t\t//************************* Member Attach Coverage Page *********************//\r\n\r\n\t\t\t\t\tif(policyMemberDetailsEntityListData.getBooleanValueForField(\"ConfigAttachCoveragesTab\")){\r\n\t\t\t\t\t\tList<PolicyMemAttachCovEntity> policyMemAttachCovEntityList=testData.getData().get(PolicyMemAttachCovEntity.class);\r\n\t\t\t\t\t\tfor(PolicyMemAttachCovEntity policyMemAttachCovEntityData: policyMemAttachCovEntityList){\r\n\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(policyMemAttachCovEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\tif(policyMemAttachCovEntityData.getAction().equalsIgnoreCase(\"verify\") && policyMemAttachCovEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\tPolicyMemberAttachCoverages policyMemberAttachCoverages= new PolicyMemberAttachCoverages(driver, \"Policy Member AttachCoverages\");\r\n\t\t\t\t\t\t\t\t\tpolicyMemberAttachCoverages.fillAndSubmitAttachCoverageDetails(policyMemAttachCovEntityData, assertReference);\r\n\t\t\t\t\t\t\t\t\t/********************Insured interset coverage page End***********/ \r\n\t\t\t\t\t\t\t\t\t/********************Policy Insured interset coverage Details Page starts****************/\r\n\t\t\t\t\t\t\t\t\tif(policyMemAttachCovEntityData.getAction().equalsIgnoreCase(\"verify\")&&policyMemAttachCovEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\tList<PolicyMemberCoverageDEntity> policyMemberCoverageDEntityList=testData.getData().get(PolicyMemberCoverageDEntity.class);\r\n\t\t\t\t\t\t\t\t\t\tfor(PolicyMemberCoverageDEntity policyMemberCoverageDEntityyData: policyMemberCoverageDEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(policyMemberCoverageDEntityyData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(policyMemberCoverageDEntityyData.getAction().equalsIgnoreCase(\"verify\")&&policyMemberCoverageDEntityyData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tPolicyPolicyMemberAttachCoverageDeatils policyPolicyMemberAttachCoverageDeatils= new PolicyPolicyMemberAttachCoverageDeatils(driver, \"Policy MemberAttachCoverage Deatils \");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpolicyPolicyMemberAttachCoverageDeatils.fillandSubmitPolicyMemberAttachCovDetails(policyMemberCoverageDEntityyData, assertReference);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**************** Policy Insured interset coverage Details Page End And After click on Premium******************/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/****************attach Coverage Attribute Start***********/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyMemberCoverageDEntityyData.getBooleanValueForField(\"ConfigAttchCoverageAttributeLink\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<PolicyMemAttachCovAtrEntity> policyMemAttachCovAtrEntityList=testData.getData().get(PolicyMemAttachCovAtrEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(PolicyMemAttachCovAtrEntity policyMemAttachCovAtrEntityData: policyMemAttachCovAtrEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(policyMemAttachCovAtrEntityData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyMemAttachCovAtrEntityData.getAction().equalsIgnoreCase(\"verify\") && policyMemAttachCovAtrEntityData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPolicyMemberAttachCoveragseAttributes policyMemberAttachCoveragseAttributes=new PolicyMemberAttachCoveragseAttributes(driver,\"Policy Member AttachCoverages Attribute\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpolicyMemberAttachCoveragseAttributes.fillAndSubmitPolicyMemberAttachCoveragseAttributesDetails(policyMemAttachCovAtrEntityData, assertReference);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//sonali\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyMemAttachCovAtrEntityData.getBooleanValueForField(\"ConfigProceedButton\") && policyMemAttachCovAtrEntityData.getStringValueForField(\"LOB\").equalsIgnoreCase(\"Misc Liability\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<AttachCovAttribtCovDetEntity> attachCovAttribtCovDetEntityList=testData.getData().get(AttachCovAttribtCovDetEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(AttachCovAttribtCovDetEntity attachCovAttribtCovDetEntityListData:attachCovAttribtCovDetEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(attachCovAttribtCovDetEntityListData.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(attachCovAttribtCovDetEntityListData.getAction().equalsIgnoreCase(\"verify\") && attachCovAttribtCovDetEntityListData.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAttachCoverageAttributesCoverageDetailsPage attachCovAttribtCovDetEntity=new AttachCoverageAttributesCoverageDetailsPage(driver, \"Attach Cov Attributes Coverage Detail Page\" );\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tattachCovAttribtCovDetEntity.fillandSubmitAttachCovAttributesCoverageDetailsPage(attachCovAttribtCovDetEntityListData, assertReference);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttestData.updateRecordsForCriteria(attachCovAttribtCovDetEntityListData);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(attachCovAttribtCovDetEntityListData.getBooleanValueForField(\"ConfigExtensionOnePage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExtensionFirstPageMiscLiabilityVerifyHelper(testData, executionTestStep, assertReference, driver, stepGroup, policyEntity);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(attachCovAttribtCovDetEntityListData.getBooleanValueForField(\"ConfigExtensionTwoPage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExtensionSecondPageMiscLiabilityVerifyHelper(testData, executionTestStep, assertReference, driver, stepGroup, policyEntity);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(attachCovAttribtCovDetEntityListData.getBooleanValueForField(\"ConfigExtensionThreePage\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExtensionThirdPageMiscLiabilityVerifyHelper(testData, executionTestStep, assertReference, driver, stepGroup, policyEntity);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/****************attach Coverage Attribute End***********/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/************************Policy Insured interset premium page start***********************/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyMemberCoverageDEntityyData.getBooleanValueForField(\"ConfigAttchCoveragePremiumlink\") || policyMemberCoverageDEntityyData.getBooleanValueForField(\"ConfigAttchCoveragePremiumlinkForPU\")){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<MembAtachCovrgPremSchdEntity> membAtachCovrgPremSchdEntityList=testData.getData().get(MembAtachCovrgPremSchdEntity.class);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(MembAtachCovrgPremSchdEntity membAtachCovrgPremSchdEntitydata:membAtachCovrgPremSchdEntityList){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(policyEntity.getParentKey().equalsIgnoreCase(membAtachCovrgPremSchdEntitydata.getChildKey())){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(membAtachCovrgPremSchdEntitydata.getAction().equalsIgnoreCase(\"verify\")&& membAtachCovrgPremSchdEntitydata.getStepGroup().equalsIgnoreCase(stepGroup)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMemberAttachCoverage_PremiumSchedule memberAttachCoverage_PremiumSchedule = new MemberAttachCoverage_PremiumSchedule(driver,\"Policy Member AttachCoverage PremiumSchedule Page\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmemberAttachCoverage_PremiumSchedule.fillandSubmitPolicyPremiumDetails(membAtachCovrgPremSchdEntitydata, assertReference);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttestData.updateRecordsForCriteria(policyMemberCoverageDEntityyData);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**********************************Policy Insured interset premium page End**************************/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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}",
"@Test(priority = 6, groups = {\n \"sanity testing\"\n })\n public void BANK_82_6_Test_43707() throws Exception {\n\n try {\n if (BaseTest.eFlgFound.equalsIgnoreCase(\"true\")) {\n /*Provide below Information to generate excel file*/\n BaseTest.sFunctionalModule = \"Deal Management\";\n BaseTest.sScenario = \"BANK_82_6_Test_43707\";\n BaseTest.sScriptName = \"BANK_82_6_Test_43707\";\n BaseTest.sOTMTestcaseID = \"\";\n BaseTest.sTestDescription = \"Add Propsect Person as child of Existing Customer and keep includeHierarchyFlag as true thus verify Prospect Person should get shown for deal\";\n\n LoginPageEvents loginEvents = new LoginPageEvents(getDriver());\n loginEvents = PageFactory.initElements(getDriver(), LoginPageEvents.class);\n\n DealManagementPageEvents dealManagementPageEvents = new DealManagementPageEvents(getDriver());\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n //Login to the system\n loginEvents.loginToApplication(System.getProperty(\"userid\"), System.getProperty(\"userPassword\"));\n AF.FnLoginChange(getDriver(), \"RMBK1\");\n\n\n //Excel Data to be used:\n String sWorkbook = \"./databank/banking/deal_management/BANK_82_6_Test_43707_V1.xlsx\";\n String sSheetName = \"TEST_DATA\";\n\n // To Change user for sending new request\n WF.FnUserChange(\"RMBK1\");\n\n\t\t\t\tString sStartDate = CF.FnGetCellValue(85, 7, sSheetName, sWorkbook).toString().trim();\n String sPriceSelectionDate = CF.FnGetCellValue(85, 8, sSheetName, sWorkbook).toString().trim();\n CF.FnTestCaseStatusReport(\"Pass\", \"Deal Start date used for Deal creation Is-> \" + sStartDate);\n\n String sDateName = CommonFunctions.FnGetUniqueId();\n String sDealIdentifier = \"BANK_82_6_Test_43707\";\n sDealIdentifier = sDealIdentifier + \"_\" + sDateName;\n\n dealManagementPageEvents = PageFactory.initElements(getDriver(), DealManagementPageEvents.class);\n\n\n String sDealId, smodelId = \"\";\n\n //################ Deal Creation IWS ####################//\n String sDealCreation = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"ADD\\\",\\\"dealDetails\\\":{\\\"dealEntityDetails\\\":{\\\"personId\\\":\\\"8797366188\\\"},\\\"dealIdentifier\\\":\\\"\" + sDealIdentifier + \"\\\",\\\"dealEntityType\\\":\\\"EPER\\\",\\\"contractedDealFlag\\\":\\\"false\\\",\\\"currency\\\":\\\"USD\\\",\\\"dealTypeCode\\\":\\\"DLAPR\\\",\\\"startDate\\\":\\\"\" + sStartDate + \"\\\",\\\"simulationTypeFlag\\\":\\\"CUST\\\",\\\"reviewFrequency\\\":\\\"12\\\",\\\"dealDescription\\\":\\\"BANK_82_6_Test_43707 desc\\\",\\\"dealVersionDescription\\\":\\\"BANK_82_6_Test_43707 desc ver\\\",\\\"dealFrequency\\\":\\\"12\\\",\\\"skipReferenceFlag\\\":\\\"true\\\",\\\"priceSelectionDate\\\":\\\"\" + sPriceSelectionDate + \"\\\",\\\"usagePeriod\\\":\\\"12\\\",\\\"hierarchyFilterFlag\\\":\\\"HIPR\\\",\\\"templateFlag\\\":\\\"false\\\"},\\\"templateReferenceDetails\\\":{\\\"copyBasicDetailsFlag\\\":\\\"false\\\",\\\"copyPricingFlag\\\":\\\"false\\\",\\\"copyUsageFlag\\\":\\\"false\\\"},\\\"dealTermsAndConditionsDetails\\\":{\\\"termsAndConditionsList\\\":[{\\\"description\\\":\\\"DEAL_T&C1\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C1\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C1\\\"},{\\\"description\\\":\\\"DEAL_T&C2\\\",\\\"termsAndCondition\\\":\\\"DEAL_T&C2\\\",\\\"termsAndConditionText\\\":\\\"DEAL_T&C2\\\"}],\\\"adhocTermsAndCondition\\\":\\\"ADHOCTERMSANDCONDITIONS\\\"},\\\"productDetailsList\\\":[{\\\"productCode\\\":\\\"PRODUCT_CON_01\\\"},{\\\"productCode\\\":\\\"PRODUCT_CON_02\\\"}],\\\"referenceDetails\\\":{\\\"referUsageSw\\\":false,\\\"referPriceSw\\\":false,\\\"includeChildHierarchy\\\":false}}}\";\n\n //System.out.println(\"TC_PRICING_RECM_Test_43660 Request ->\"+sDealCreation);\n Hashtable < String, String > DealDetails = new Hashtable < String, String > ();\n\n DealDetails = DM.FnCreateDeal(sDealCreation, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n sDealId = DealDetails.get(\"sDealId\");\n smodelId = DealDetails.get(\"sModelId\");\n sDealIdentifier = DealDetails.get(\"sDealIdentifier\");\n\n //This function to verify Deal Information Details from DB Table\n DB.FnVerifyDealCreationInfoIWS(85, sSheetName, sWorkbook, sDealId);\n\n\n //################ Deal PriceList Assignment IWS ####################//\n //To Perform Operation On Deal i.e. Add , Update , Delete pricelist\n dealManagementPageEvents.FnDealPricelistAddUpdateDeleteIWS(89, sSheetName, sWorkbook, sDealId, smodelId);\n //dealManagementPageEvents.FnDealPricelistAddUpdateDeleteIWS(90, sSheetName, sWorkbook, sDealId, smodelId);\n\n //################ Deal PSEL READ IWS ####################//\n String sDealPSELREAD = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"READ\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sDealPSELREAD);\n DM.FnReadPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELREAD, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //################ Deal PSEL SELECT IWS ####################//\n String sDealPSELSELECT = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"PSEL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"},\\\"priceItemGroupSelection\\\":{\\\"priceItemSelectionList\\\":[{\\\"priceItemCode\\\":\\\"NPI_021\\\",\\\"priceItemInfo\\\":\\\"NPI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_022\\\",\\\"priceItemInfo\\\":\\\"NPI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_023\\\",\\\"priceItemInfo\\\":\\\"NPI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_024\\\",\\\"priceItemInfo\\\":\\\"NPI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_025\\\",\\\"priceItemInfo\\\":\\\"NPI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_036\\\",\\\"priceItemInfo\\\":\\\"NPI_036\\\",\\\"parameterInfo\\\":\\\"DM_COUNTRY=IND,DM_STATE=AP\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"NPI_036\\\",\\\"priceItemInfo\\\":\\\"NPI_036\\\",\\\"parameterInfo\\\":\\\"DM_COUNTRY=IND,DM_STATE=KA\\\",\\\"assignmentLevel\\\":\\\"CustomerAgreed\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_021\\\",\\\"priceItemInfo\\\":\\\"PI_021\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_022\\\",\\\"priceItemInfo\\\":\\\"PI_022\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_023\\\",\\\"priceItemInfo\\\":\\\"PI_023\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_033\\\",\\\"priceItemInfo\\\":\\\"PI_033\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,ACCOUNTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_024\\\",\\\"priceItemInfo\\\":\\\"PI_024\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_025\\\",\\\"priceItemInfo\\\":\\\"PI_025\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_026\\\",\\\"priceItemInfo\\\":\\\"PI_026\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,PAYMENTSERVICES\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_027\\\",\\\"priceItemInfo\\\":\\\"PI_027\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=INR,DM_TYPE=BT\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_028\\\",\\\"priceItemInfo\\\":\\\"PI_028\\\",\\\"parameterInfo\\\":\\\"DM_CURRENCY=USD\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_029\\\",\\\"priceItemInfo\\\":\\\"PI_029\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_030\\\",\\\"priceItemInfo\\\":\\\"PI_030\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"},{\\\"priceItemCode\\\":\\\"PI_031\\\",\\\"priceItemInfo\\\":\\\"PI_031\\\",\\\"assignmentLevel\\\":\\\"CustomerPriceList\\\",\\\"hierarchyDetails\\\":\\\"CORPORATEBANKING,REPORTING/SWIFT\\\",\\\"includeFlag\\\":\\\"true\\\"}]}}}\";\n System.out.println(\"Request ->\" + sDealPSELSELECT);\n DM.FnSelectPriceItemGroupSelectionIWS(sCreateDealResource, sDealPSELSELECT, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n //System.out.println(\"Request ->\"+sSimulateDeal);\n DM.FnSimulateDealByRequest(sSimulateDeal, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n //System.out.println(\"Simulation Deal ID Is-> \" + sSimulateDealDealId);\n\n AF.FnNavigation(getDriver(), \"Deal Dashboard\"); \n dealManagementPageEvents.FnSearchDealIdAssignedToMyRole(sDealId, false, false, true, \"RMBK1\");\n\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(85, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(85, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(85, sSheetName, sWorkbook, smodelId);\n\n //This function to verify Deal Simulation Summary Details from DB Table\n DB.Deal_Simulation_Summary(96, sSheetName, sWorkbook, smodelId);\n\n\n //This function to verify Deal Financial Summary Details from DB Table\n DB.Deal_Financial_Summary(96, sSheetName, sWorkbook, smodelId);\n\n //Refresh Deal Information Screen\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(102, sSheetName, sWorkbook);\n\n //Function To verify Personal Hierarchy Information On Deal Information for \"Customer Division / Account Currency\"\n dealManagementPageEvents.DealInformationPersonHierarchySwitchToggle();\n\n //Function To verify Division Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForDivisionCurrency(102, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(110, sSheetName, sWorkbook);\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(114, sSheetName, sWorkbook);\n\n //Function To verify Deal Logs \n dealManagementPageEvents.FnVerifyDealLogs(118, sSheetName, sWorkbook); //issue in assert sCreationDateTime\n dealManagementPageEvents.FnVerifyDealLogs(119, sSheetName, sWorkbook); //issue in assert sCreationDateTime\n dealManagementPageEvents.FnVerifyDealLogs(120, sSheetName, sWorkbook); //issue in assert sCreationDateTime \n\n\n //TC_PRICING_OVRD\n DM.FnPricingAndCommitmentIWS(124, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(125, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(130, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(131, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(136, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(137, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(142, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(143, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n\n DM.FnPricingAndCommitmentIWS(148, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(149, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(151, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(152, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(156, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(157, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(161, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(162, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n DM.FnPricingAndCommitmentIWS(166, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n DM.FnPricingAndCommitmentIWS(167, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //Refresh Deal Information Screen\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To Navigate to Adhoc Revenue and cost UI from Deal information page\n dealManagementPageEvents.FnNavigationToAdhocRevenueAndCostCreationFromDealInformation();\n\n //Function To create Adhoc Revenue and cost \n dealManagementPageEvents.FnCreationOfAdhocRevenueAndCost(172, sSheetName, sWorkbook);\n\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal21 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal21, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //Refresh Deal Information Screen\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(181, sSheetName, sWorkbook);\n\n //Function To verify Deal Currency Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformationForDivisionCurrency(187, sSheetName, sWorkbook);\n\n //Function To verify CI_PRICEASGN Table Count for Respective Deal\n DB.FnVerifyPriceAsgnCount(194, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_MODEL_SQI Table Count for Respective Deal\n DB.FnVerifySqiCount(194, sSheetName, sWorkbook, smodelId);\n\n //Function To verify C1_DEAL_SIMULATION_DTL Table Count for Respective Deal\n DB.FnVerifySimulationCount(194, sSheetName, sWorkbook, smodelId);\n\n //################ Send Deal For Approval IWS ####################//\n String sSendDealForApproval = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApproval, sContentTypeHeader, sAcceptTypeHeader);\n\n //Refresh Deal Information Screen\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(198, sSheetName, sWorkbook);\n\n // To Change user for sending new request\n WF.FnUserChange(\"PMBK1\");\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal2 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal2, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //Function to Recommend Pricing \n DM.FnPricingAndCommitmentIWS(202, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n\n // To Change user for sending new request\n WF.FnUserChange(\"PMBK1\");\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal5 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal5, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n\n //################ Return Deal To Submitter IWS ####################//\n String ReturnDealtoSubmitter = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"RETN\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\",\\\"division\\\":\\\"IND\\\",\\\"comments\\\":\\\"Recommended Price Item\\\",\\\"rejectReasonCode\\\":\\\"RETURN\\\"}}}\";\n DM.FnReturnDealToSubmitterUsingIWS(sCreateDealResource, ReturnDealtoSubmitter, sContentTypeHeader, sAcceptTypeHeader);\n \n // Login Change to RMBK1 User\n WF.FnUserChange(\"RMBK1\");\n\n // Function to Update Recommended Pricing on RM Level \n DM.FnPricingAndCommitmentIWS(203, sSheetName, sWorkbook, sDealId, \"NoValue\", \"NoValue\");\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal51 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal51, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Refresh Deal Information Screen\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(209, sSheetName, sWorkbook);\n\n String sSendDealForApproval11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApproval11, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to PMBK1 User\n WF.FnUserChange(\"PMBK1\");\n\n //################ Deal Simulation IWS ####################//\n String sSimulateDeal7 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDeal7, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n String sSendDealForApprovalFromPM11 = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SNDP\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnSendDealForApprovalIWS(sCreateDealResource, sSendDealForApprovalFromPM11, sContentTypeHeader, sAcceptTypeHeader);\n\n // Login Change to SPMBK1 User\n WF.FnUserChange(\"SPMBK1\");\n\n //Function To Simulate Deal\n String sSimulateDealBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"SMLD\\\",\\\"modelId\\\":\\\"\" + smodelId + \"\\\"}}}\";\n DM.FnSimulateDealByRequest(sSimulateDealBySPM, sCreateDealResource, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Approve Deal\n String sApproveDealBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"APPR\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnApproveDealUsingIWS(sCreateDealResource, sApproveDealBySPM, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Change Login\n WF.FnUserChange(\"RMBK1\");\n\n //Function To Finalize Deal\n String sFinalizeDeaBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"FNAL\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\"}}}\";\n DM.FnFinalizeDealUsingIWS(sCreateDealResource, sFinalizeDeaBySPM, sContentTypeHeader, sAcceptTypeHeader);\n\n //Function To Customer Accept Deal\n String sAcceptDealBySPM = \"{\\\"C1-DealREST\\\":{\\\"actionFlag\\\":\\\"UPD\\\",\\\"dealOperation\\\":{\\\"operationFlag\\\":\\\"ACPT\\\",\\\"dealId\\\":\\\"\" + sDealId + \"\\\",\\\"dealAcceptEffStartDate\\\":\\\"\" + sStartDate + \"\\\",\\\"comments\\\":\\\"\" + sDealIdentifier + \" Deal Accepted\\\"}}}\";\n DM.FnAcceptDealUsingIWS(sCreateDealResource, sAcceptDealBySPM, sContentTypeHeader, sAcceptTypeHeader);\n\n //Refresh Deal Information Screen\n dealManagementPageEvents.FnRefreshDeal(getDriver());\n\n //Function To verify deal information \n dealManagementPageEvents.FnDealInformationVerification(221, sSheetName, sWorkbook);\n\n //Function To verify Deal Financial Summary Information On Deal Information\n dealManagementPageEvents.FnVerifyDealFinancialSummary(227, sSheetName, sWorkbook);\n\n //Function To verify Personal Hierarchy Information On Deal Information\n dealManagementPageEvents.FnVerifyPersonalHierarchyInformationOnDealInformation(233, sSheetName, sWorkbook); //127\n\n //Function To verify Deal Logs \n dealManagementPageEvents.FnVerifyDealLogs(237, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(238, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(239, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(240, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(241, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(242, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(243, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(244, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(245, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(246, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(247, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(248, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(249, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(250, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(251, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(252, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(253, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(254, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(255, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(256, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(257, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(258, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(259, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(260, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(261, sSheetName, sWorkbook);\n dealManagementPageEvents.FnVerifyDealLogs(262, sSheetName, sWorkbook);\n\n\n }\n\n } catch (Exception e) {\n System.out.println(\"Script Exception occured ->\" + e.getLocalizedMessage());\n e.printStackTrace();\n BaseTest.eFlgFound = \"false\";\n CF.FnTestCaseStatusReport(\"Fail\", \"Script Exception occured ->\" + e.getLocalizedMessage().replace(\",\", \"\"));\n }\n }",
"public void TPSiteInspectionLetter_Application_Dev_plan() \n\t{\n\t\ttry{\n\n\t\t\tSCR_SiteInspectEmpName.add(mGetPropertyFromFile(\"tp_SiteInspectEmpNmdata\"));\n\t\t\tSCR_SiteInspectionEmpDate.add(mGetPropertyFromFile(\"tp_SiteInspectDatedata\"));\n\t\t\tif(!mGetPropertyFromFile(\"TypeOfExecution\").equalsIgnoreCase(\"individual\")){\n\t\t\t\t/*mAssert(SIL_appname.get(CurrentinvoCount), AppfullnmWdTitle.get(CurrentinvoCount), \"Actual Applicant name in site inspection letter is:::\"+SIL_appname.get(CurrentinvoCount) +\",Expected is:::\"+AppfullnmWdTitle.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_serviceName.get(CurrentinvoCount),ServiceNameforTownPlanning.get(CurrentinvoCount), \"Actual Service Name in site inspection letter is :::\"+SIL_serviceName.get(CurrentinvoCount) +\",Expected is:::\"+ServiceNameforTownPlanning.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_ApplicationNo.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No in site inspection letter is :::\"+SIL_ApplicationNo.get(CurrentinvoCount) +\",Expected is :::\"+ApplicationNoforLandDev.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_ward1.get(CurrentinvoCount), ward.get(CurrentinvoCount), \"Actual Ward No is:::\"+SIL_ward1.get(CurrentinvoCount) +\",Expected is:::\"+ward.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_KhataNo.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot Khasara no is :::\"+SIL_KhataNo.get(CurrentinvoCount)+\",Expected is:::\"+PlotKhasraNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_maujano.get(CurrentinvoCount), MaujaNo.get(CurrentinvoCount), \"Actual Mauja No is :::\"+SIL_maujano.get(CurrentinvoCount) +\",Expected is:::\"+MaujaNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_plotkhasaranocs.get(CurrentinvoCount), KhataNo.get(CurrentinvoCount), \"Actual Khata No is:::\"+SIL_plotkhasaranocs.get(CurrentinvoCount) +\",Expected is:::\"+KhataNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_HoldingNo.get(CurrentinvoCount), HoldingNo.get(CurrentinvoCount), \"Actual Holding No is :::\"+SIL_HoldingNo.get(CurrentinvoCount) +\",Expected is:::\"+HoldingNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_Locality.get(CurrentinvoCount), Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+SIL_Locality.get(CurrentinvoCount) +\",Expected is:::\"+Village.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_TojiNo.get(CurrentinvoCount), TojiNo.get(CurrentinvoCount), \"Actual Toji No is :::\"+SIL_TojiNo.get(CurrentinvoCount) +\",Expected is:::\"+TojiNo.get(CurrentinvoCount));*/\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"@Test(description = \"FP-TC-1256_VerifyUserWithClaimCanReassignRaterCanReassignAnAssessmentToAQualifiedRater\", groups = {\n\t\t\t\"\" })\n\tpublic void FPTC_1256_UserWithClaimCanReassignRaterCanReassignAnAssessmentToAQualifiedRater() {\n\n\t\treportLog(\n\t\t\t\t\"1: Login to the Portal as user of PR#4.(At least one User with claim canReassignRater and without claim canAssignToMe and CanAssignToOthers exists for Study/Site of PR#1)\");\n\t\tdashBoardPage = loginPage.loginInApplication(SuperAdminUN, SuperAdminPW);\n\t\tdashBoardPage.verifyMedavantePortalPage();\n\n\t\tstudyNavigatorDashBoardPage = dashBoardPage.navigateToStudyNavigator();\n\t\tstudyNavigatorDashBoardPage.selectStudy(studyName1);\n\n\t\treportLog(\"2: Navigate to subject details page of PR#5\");\n\t\tstudyNavigatorDashBoardPage.navigateToSubjectsListing();\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSubject(subjectName1);\n\n\t\treportLog(\"2.1: Subject details are displayed\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"2.2: Visit in PR#5.1 is displayed in the visits list\");\n\t\tsubjectDetailPage.verifyVisitAddedIsPresentInList(visit1);\n\n\t\treportLog(\"3: Select the visit in PR#5.1 from the visit list Check the Assigned to field value\");\n\t\tsubjectDetailPage.clickOnVisitRow(visit1);\n\n\t\treportLog(\"3.1: Field value is Not Assigned\");\n\t\tsubjectDetailPage.verifyRaterNameForNonAssignedVisit(Constants.notAssignedText);\n\n\t\treportLog(\"3.2: Field is not editable\");\n\t\tsubjectDetailPage.verifyAssigneToFieldIsNonEditable();\n\n\t\treportLog(\"4: Navigate to subject details page of PR#6\");\n\t\tsubjectDetailPage.navigateToHomePage();\n\t\tdashBoardPage.navigateToStudyNavigator();\n\n\t\tstudyNavigatorDashBoardPage.navigateToSubjectsListing();\n\t\tstudyNavigatorDashBoardPage.clickOnSubject(subjectName2);\n\n\t\treportLog(\"4.1: Subject details are displayed\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"4.2: Visit in PR#6.1 is displayed in the visits list\");\n\t\tsubjectDetailPage.verifyVisitAddedIsPresentInList(visit2);\n\n\t\treportLog(\"5: Select the visit in PR#6.1 from the visit list Check the Assigned to field value\");\n\t\tsubjectDetailPage.clickOnVisitRow(visit2);\n\n\t\treportLog(\"5.2: Field value is [PR#3.2 Rater First Name] + [PR#3.2 Rater Last Name]\");\n\t\tsubjectDetailPage.verifyRaterAssignmentDropDownSelectedValue(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"5.3: Field is editable and drop down list is enabled\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\n\t\treportLog(\"6: Select the option to expand the assignee dropdown\");\n\t\tsubjectDetailPage.verifyRaterDropDownIsDisplayed();\n\n\t\treportLog(\"6.1: List does not contain rater in PR#3.4\");\n\n\t\treportLog(\"6.2: List contains raters in PR#3.2 and PR#3.3\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"6.3: List contains the option Not Assigned\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.notAssignedText);\n\n\t\treportLog(\n\t\t\t\t\"7: Select the option to choose Not Assigned from the drop down Select the option to choose rater in PR#3.3\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\n\t\treportLog(\"7.1: Assigned to field value changes to Not Assigned\");\n\t\tsubjectDetailPage.selectRaterFromDropDown(Constants.notAssignedText);\n\n\t\treportLog(\"7.2: Assigned to field value changed to [PR#3.3 Rater First Name] + [PR#3.3 Rater Last Name]\");\n\t\tsubjectDetailPage.verifyRaterAssignmentDropDownSelectedValue(Constants.notAssignedText);\n\n\t\treportLog(\"8: Navigate to subject details page of PR#7\");\n\t\tsubjectDetailPage.navigateToHomePage();\n\t\tdashBoardPage.navigateToStudyNavigator();\n\n\t\tstudyNavigatorDashBoardPage.navigateToSubjectsListing();\n\t\tstudyNavigatorDashBoardPage.clickOnSubject(subjectName3);\n\n\t\treportLog(\"8.1: Subject details are displayed\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"8.2: Visit in PR#7.1 is displayed in the visits list\");\n\t\tsubjectDetailPage.verifyVisitAddedIsPresentInList(visit2);\n\n\t\treportLog(\"9: Select the visit in PR#7.1 from the visit list Check the Assigned to field value\");\n\t\tsubjectDetailPage.clickOnVisitRow(visit2);\n\n\t\treportLog(\"9.1: Field value is 'Not Assigned'\");\n\t\tsubjectDetailPage.verifyRaterAssignmentDropDownSelectedValue(Constants.notAssignedText);\n\n\t\treportLog(\"9.2: Field is editable and drop down list is enabled\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\n\t\treportLog(\"10: Select the option to expand the assignee dropdown\");\n\t\tsubjectDetailPage.verifyRaterDropDownIsDisplayed();\n\n\t\treportLog(\"10.1: List does not contain rater in PR#3.4\");\n\n\t\treportLog(\"10.2: List contains raters in PR#3.2 and PR#3.3\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"10.3: List contains the option 'Not Assigned'\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.notAssignedText);\n\n\t\treportLog(\"11: Select the option to choose rater in PR#3.3\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\t\tsubjectDetailPage.selectRaterFromDropDown(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"11.1: Assigned to field value changed to [PR#3.3 Rater First Name] + [PR#3.3 Rater Last Name]\");\n\t\tsubjectDetailPage.verifyRaterAssignmentDropDownSelectedValue(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"12: Navigate to subject details page of PR#8\");\n\t\tsubjectDetailPage.navigateToHomePage();\n\t\tdashBoardPage.navigateToStudyNavigator();\n\n\t\tstudyNavigatorDashBoardPage.navigateToSubjectsListing();\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSubject(subjectName4);\n\n\t\treportLog(\"12.1: Subject details are displayed\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"12.2: Visit in PR#8.1 is displayed in the visits list\");\n\t\tsubjectDetailPage.verifyVisitAddedIsPresentInList(visit2);\n\n\t\treportLog(\n\t\t\t\t\"13: Select the visit in PR#8.1 from the visit list Check the 'Submitted By' and 'Assigned to' field values\");\n\t\tsubjectDetailPage.clickOnVisitRow(visit2);\n\t\tsubjectDetailPage.verifyEditVisitIconIsDisplayed();\n\t\tsubjectDetailPage.clickOnEditVisitIcon();\n\t\tsubjectDetailPage.verifyVisitStatus(visit2, Constants.Editing_Status);\n\n\t\treportLog(\"13.1: Submitted By field value is: [PR#3.4 Rater First Name] + [PR#3.4 Rater Last Name]\");\n\t\tsubjectDetailPage.verifySubmittedVisitRaterName(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"13.2: Assigned to field is editable and drop down list is enabled\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\n\t\treportLog(\"14: Select the option to expand the assignee dropdown\");\n\t\tsubjectDetailPage.verifyRaterDropDownIsDisplayed();\n\n\t\treportLog(\"14.1: List does not contain rater in PR#3.4\");\n\n\t\treportLog(\"14.2: List contains raters in PR#3.2 and PR#3.3\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.ATAssignedRater_10);\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"14.3: List contains the option 'Not Assigned'\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.notAssignedText);\n\n\t\treportLog(\"15: Select the option to choose rater in PR#3.3\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\t\tsubjectDetailPage.selectRaterFromDropDown(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"15.1: Assigned to field value changed to [PR#3.3 Rater First Name] + [PR#3.3 Rater Last Name]\");\n\t\tsubjectDetailPage.verifyRaterAssignmentDropDownSelectedValue(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"16: Login to the Portal as user of PR#11.\");\n\t\tsubjectDetailPage.navigateToHomePage();\n\t\tdashBoardPage.navigateToStudyNavigator();\n\n\t\tstudyNavigatorDashBoardPage.selectStudy(studyName2);\n\t\tstudyNavigatorDashBoardPage.selectSite(Constants.ChooseSite_ATTester10);\n\n\t\treportLog(\"17: Navigate to subject details page of PR#13\");\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSubject(subjectName5);\n\n\t\treportLog(\"17.1: Subject details are displayed\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"17.2: Visit in PR#13.1 is displayed in the visits list\");\n\t\tsubjectDetailPage.verifyVisitAddedIsPresentInList(visit3);\n\n\t\treportLog(\n\t\t\t\t\"18: Select the visit in PR#13.1 from the visit list and Check the Submitted By and Assigned to field values\");\n\t\tsubjectDetailPage.clickOnVisitRow(visit3);\n\t\tsubjectDetailPage.verifyEditVisitIconIsDisplayed();\n\t\tsubjectDetailPage.clickOnEditVisitIcon();\n\t\tsubjectDetailPage.verifyVisitStatus(visit3, Constants.Editing_Status);\n\n\t\treportLog(\"18.1: 'Submitted By' field value is: [PR#12.1 Rater First Name] + [PR#12.1 Rater Last Name]\");\n\t\tsubjectDetailPage.verifySubmittedVisitRaterName(Constants.ATAssignedRater_10);\n\n\t\treportLog(\"18.2: 'Assigned To' field value is: 'Not Assigned'\");\n\n\t\treportLog(\"18.3: Assigned to field is editable and drop down list is enabled\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\n\t\treportLog(\"19: Select the option to expand the assignee dropdown\");\n\t\tsubjectDetailPage.verifyRaterDropDownIsDisplayed();\n\n\t\treportLog(\"19.1: List does not contain rater in PR#12.2\");\n\n\t\treportLog(\"19.2: List contains rater in PR#12.1\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.clinician14Name);\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.clinician15Name);\n\n\t\treportLog(\"19.3: List contains the option 'Not Assigned'\");\n\t\tsubjectDetailPage.verifyRaterNameDisplayedInRaterDropDown(Constants.notAssignedText);\n\n\t\treportLog(\"20: Select the option to choose rater in PR#12.1\");\n\t\tsubjectDetailPage.clickOnAssignRaterDropDown();\n\t\tsubjectDetailPage.selectRaterFromDropDown(Constants.clinician15Name);\n\n\t\treportLog(\"20.1: Assigned to field value changed to [PR#12.1 Rater First Name] + [PR#12.1 Rater Last Name]\");\n\t\tsubjectDetailPage.verifyRaterAssignmentDropDownSelectedValue(Constants.clinician15Name);\n\n\t\treportLog(\"Logout application\");\n\t\tloginPage.logoutApplication();\n\n\t\treportLog(\"Verify user is logout\");\n\t\tloginPage.verifyUserLogout();\n\n\t}",
"@Then(\"^I validate Minimum Value, Maximum value and delete the Existing card range record from Salesforce UI$\")\n public void iValidateMinimumValueMaximumValueAndDeleteTheExistingCardRangeRecordFromSalesforceUI() throws Throwable {\n getSFaccessToken accessToken = new getSFaccessToken();\n token = accessToken.getSFaccessToken();\n System.out.println(\"Access token \"+token);\n\n String cardRangeName = cardRange.getCardRangeNamefromSF(token, MinimumValueExp, MaximumValueExp);\n //search for the card range name by searching the record\n // if it comes on top, then delete that record as usual\n\n if (cardRangeName.isEmpty()) {\n System.out.println(\"No existing record of card range between \"+MinimumValueExp+\" and \"+MaximumValueExp);\n\n } else {\n\n System.out.println(\"Record of Card range name to be deleted - \"+cardRangeName);\n\n // commented out for testing /////////////////////////////////////\n// Thread.sleep(5000);\n// //click on main search box to pull down the list\n// cardRange.clickOnMainSearchDropdown();\n//\n// //waiting for 3 sec\n// Thread.sleep(3000);\n//\n// //click on \"Card Range\" option under main search\n// cardRange.clickOnCardRangeOptionUnderMainSearch();\n//\n// Thread.sleep(3000);\n// //type and search for card range name on the searchbox\n// cardRange.typeAndSearchCardRangeinMainSearchTextBox(cardRangeName);\n//\n// //validate if card range window title is present\n//// try {\n//// Thread.sleep(5000);\n//// Assert.assertTrue(cardRange.isCardRangeTitlePresent());\n//// } catch (AssertionError e) {\n//// System.out.println(\"Search results are not loaded successfully\");\n//// _scenario.write(\"Search results are not loaded successfully\");\n//// Assert.fail(\"TEST FAILED INTENTIONALLY ! Search results are not loaded successfully\");\n//// }\n//\n// // validate if there is one search result only\n// try {\n// Assert.assertEquals(cardRange.getSearchResultCountText(), \"1 Result\");\n// } catch (AssertionError e) {\n// System.out.println(\"There are more than one search results or none\");\n// _scenario.write(\"There are more than one search results or none\");\n// Assert.fail(\"TEST FAILED INTENTIONALLY ! There are more than one search results for the card range - \" + cardRangeName + \" or none at all\");\n// }\n//\n// try {\n// cardRange.clickOnPulldownMenuInSearchResultsPage();\n// cardRange.clickOnDeleteOptionInPulldownMenu();\n// cardRange.deleteCardRangeRecord();\n//\n// } catch (Exception e) {\n// System.out.println(e.getLocalizedMessage());\n// _scenario.write(e.getLocalizedMessage());\n// screenshot.takeScreenshot();\n// }\n //////////////////////// commented out for testing //////////////////////////////\n\n //deleteing the card range using API call and checking if deletion is confirmed\n try {\n cardRange.deleteCardRangeFromSF(token,cardRangeName);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //waiting for 3 sec before confirming the deletion\n Thread.sleep(3000);\n\n //confirming the deletion\n try {\n Assert.assertSame(cardRange.getCardRangeNamefromSF(token, MinimumValueExp, MaximumValueExp), \"\");\n System.out.println(\"Card Range record with card range name: \"+cardRangeName +\" was deleted successfully from Salesforce\");\n _scenario.write(\"Card Range record with card range name: \"+cardRangeName +\" was deleted successfully from Salesforce\");\n } catch (AssertionError e) {\n System.out.println(\"Card Range with name: \"+cardRangeName +\" still Exists in Salesforce.\");\n _scenario.write(\"Card Range with name: \"+cardRangeName +\" still Exists in Salesforce.\");\n Assert.fail(\"TEST WAS FAILED INTENTIONALLY. ! The card range was deleted through the API call. But it has not actually deleted it from the Salesforce UI\");\n }\n }\n }",
"public void test5() throws Exception {\n String testName = getName();\n \n /*\n * setup grantees\n */\n Account grantee = mProv.createAccount(getEmailAddr(testName, \"grantee\"), PASSWORD, null);\n \n /*\n * setup groups\n */\n DistributionList GA = mProv.createDistributionList(getEmailAddr(testName, \"GA\"), new HashMap<String, Object>());\n DistributionList GB = mProv.createDistributionList(getEmailAddr(testName, \"GB\"), new HashMap<String, Object>());\n DistributionList GC = mProv.createDistributionList(getEmailAddr(testName, \"GC\"), new HashMap<String, Object>());\n\n mProv.addMembers(GA, new String[] {GB.getName()});\n mProv.addMembers(GB, new String[] {GC.getName()});\n mProv.addMembers(GC, new String[] {grantee.getName()});\n \n \n /*\n * setup targets\n */\n TestViaGrant via;\n \n Account target = mProv.createAccount(getEmailAddr(testName, \"target\"), PASSWORD, null);\n \n DistributionList G1 = mProv.createDistributionList(getEmailAddr(testName, \"G1\"), new HashMap<String, Object>());\n DistributionList G2 = mProv.createDistributionList(getEmailAddr(testName, \"G2\"), new HashMap<String, Object>());\n DistributionList G3 = mProv.createDistributionList(getEmailAddr(testName, \"G3\"), new HashMap<String, Object>());\n \n mProv.addMembers(G1, new String[] {G2.getName()});\n mProv.addMembers(G2, new String[] {G3.getName()});\n mProv.addMembers(G3, new String[] {target.getName()});\n \n Right right = User.R_viewFreeBusy;\n Set<ZimbraACE> aces = new HashSet<ZimbraACE>();\n aces.add(newGrpACE(GC, right, ALLOW));\n grantRight(TargetType.dl, G1, aces);\n \n aces.clear();\n aces.add(newGrpACE(GB, right, DENY));\n grantRight(TargetType.dl, G2, aces);\n \n aces.clear();\n aces.add(newGrpACE(GA, right, DENY));\n grantRight(TargetType.dl, G3, aces);\n \n // the right should be allowed via the grant on G1, granted to group GC \n /*\n via = new TestViaGrant(TargetType.distributionlist, G1, GranteeType.GT_GROUP, GC.getName(), right, POSITIVE);\n verify(grantee, target, right, ALLOW, via);\n */\n \n via = new TestViaGrant(TargetType.dl, G2, GranteeType.GT_GROUP, GB.getName(), right, NEGATIVE);\n via.addCanAlsoVia(new TestViaGrant(TargetType.dl, G3, GranteeType.GT_GROUP, GA.getName(), right, NEGATIVE));\n verify(grantee, target, right, DENY, via);\n \n }",
"@Test\n\tpublic void test05_CheckViewAllAfterRefusingASpaceInvitation() {\n\t\tinfo(\"Test 5: Check View All after refusing a Space Invitation\");\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1 : Check notification list\n\t\t*Step Description: \n\t\t\t- Login with User B\n\t\t\t- Click Notifications icon\n\t\t\t- Check the notifications list\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- A Space Invitation notifications is displayed in the list*/\n\t\t\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString email1 = username1+\"@gmail.com\";\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString email2 = username2+\"@gmail.com\";\n\t\tinfo(\"Add new user\");\n\t\tnavTool.goToAddUser();\n\t\taddUserPage.addUser(username1, password, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password, email2, username2, username2);\n\t\tmagAc.signIn(username1,password);\n\t\t\n\t\tinfo(\"goto My notification\");\n\t\tnavTool.goToMyNotifications();\n\t\tmyNoti.enableNotification(myNotiType.Space_Invitation_Intranet);\n\t\t\n\t\t\n\t\tinfo(\"User B login\");\n\t\tmagAc.signIn(username2, password);\n\t\tUtils.pause(3000);\n\t\t\n\t\tinfo(\"User B create a new space\");\n\t\tString spaceName= txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString spaceDes= txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\thp.goToAllSpace();\n\t\tspaMg.goToCreateSpace();\n\t\tspaMg.addNewSpaceSimple(spaceName,spaceDes);\n\t\t\n\t\tinfo(\"User B invites UserA to the space\");\n\t\thp.goToSpecificSpace(spaceName);\n\t\tspaHome.goToSpaceSettingTab();\n\t\tsetSpaceMg.goToMemberTab();\n\t\tsetSpaceMg.inviteUser(username1,true,username1+\" \"+username1);\n\n\t\t/*Step number: 2\n\t\t*Step Name: Step 2 : Check View all page\n\t\t*Step Description: \n\t\t\t- Click [Refuse]\n\t\t\t- Go to View All\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- The notifications is not displayed / available in the View All page*/ \n\t\tinfo(\"User A login\");\n\t\tmagAc.signIn(username1, password);\n\t\tUtils.pause(3000);\n\t\t\n\t\tString status = notiIntranetData.getContentByArrayTypeRandom(3);\n\t\tnavTool.goToIntranetNotification();\n\t\tintraNot.goToAllNotification();\n\t\tintraNot.checkStatusSpace(status,spaceName);\n\t\t\n\t\tinfo(\"User A refuse invitation\");\n intraNot.refuseRqConnection(spaceName);\n intraNot.checkNotStatusSpace(status,spaceName);\n\n \t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a very different cancel because of the possibility that an original configuration actually changed due to a save, in which case the state in the caller's context has to reflect the assaved object even if the user says cancel. Look up the old configs by name and return new objects. If the name no longer exists due to a delete just return the original object; that can still be used by the caller as it is now standalone. The caller must apply the new objects regardless, so there is no cancelled property. Null or unsaved objects in the original state are always just returned. | private void doCancel(boolean doHide) {
ArrayList<OutputConfig> oldConfigs = configs;
configs = new ArrayList<OutputConfig>();
OutputConfig newConfig;
for (OutputConfig oldConfig : oldConfigs) {
if (oldConfig.isUnsaved() || oldConfig.isNull()) {
newConfig = oldConfig;
} else {
newConfig = OutputConfig.getConfig(getDbID(), oldConfig.type, oldConfig.name);
if (null == newConfig) {
newConfig = oldConfig;
}
}
configs.add(newConfig);
}
blockActionsSet();
if (doHide) {
AppController.hideWindow(this);
}
} | [
"com.google.protobuf.Any getOldConfig();",
"public CursorConfig getConfig() {\n try {\n return config.clone();\n } catch (Error E) {\n dbImpl.getDbEnvironment().invalidate(E);\n throw E;\n }\n }",
"com.google.protobuf.AnyOrBuilder getOldConfigOrBuilder();",
"public String [] getPreviouslySelectedConfigs(){\r\n\t\tIDialogSettings settings = getDialogSettings();\r\n\t\tif (settings != null) {\r\n\t\t\tString configSettings[] = settings.getArray(RECENTLY_SELECTED_BUILD_CONFIGS_STORE);\r\n\t\t\tif (configSettings != null){\r\n\t\t\t\treturn configSettings;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// default case, just empty array\r\n\t\treturn new String[0]; \r\n\t}",
"public void testSaveLoadSaveLoadLoadOldConfiguration() {\n\t\tConfiguration config=null;\n\n\t\ttry {\n\t\t\t// Save a new configuration\n\t\t\tconfig=new Configuration();\n\t config.setName(\"Paul\");\n\t config.setVersion(\"1.0\");\n\t config.setTimeout(1);\n\t \n\t loader.saveConfiguration(TestNamespace, config);\n\t\t\tThread.sleep(10);\n\n\t\t\tconfig=null;\n\n\t\t\tVersionEffectiveDate d=new VersionEffectiveDate();\n\n\t\t\t// Load the configuration, and check that it is the same.\n config=loader.loadConfiguration(TestNamespace, d);\n\n\t\t\t// Fail if the configuration was not the same.\n assertEquals(config.getName(), \"Paul\");\n assertEquals(config.getVersion(), \"1.0\");\n\n\t\t\t// Wait 1 second (configurations work from date stamps. 1 millisecond should be enough, but we have time!).\n\t\t\tThread.sleep(10);\n\n\t\t\t// Change the configuration and save it again (this should create a second persistent record).\n\t\t\tconfig.setName(\"John\");\n config.setVersion(\"2.0\");\n\t loader.saveConfiguration(TestNamespace, config);\n\t\t\tThread.sleep(10);\n\n\t\t\tconfig=null;\n\n\t\t\t// Load the configuration, and check that the change just made is present.\n config=loader.loadConfiguration(TestNamespace, new VersionEffectiveDate());\n assertEquals(config.getName(), \"John\");\n assertEquals(config.getVersion(), \"2.0\");\n\n\t\t\tconfig=null;\n\n\t\t\t// Load the original configuration by specifiying a timestamp before the 1 second delay.\n config=loader.loadConfiguration(TestNamespace, d);\n\n\t\t\t// Check the this configuration matches the original.\n assertEquals(config.getName(), \"Paul\");\n assertEquals(config.getVersion(), \"1.0\");\n\n\t\t}\n catch(Throwable e) {\n \te.printStackTrace();\n\t\t\tfail(\"Unexpected exception:\"+e);\n\t\t}\n }",
"private void restorePrevConfigFile(String jobName) {\n\t\tFile configFile = new File(this.getJobConfigURI(jobName));\n\t\tif(configFile.exists()) {\n\t\t\tconfigFile.delete();\n\t\t}\n\t\tFile prevFile = new File(this.getJobStoreURI(jobName).getPath()+SimpleJobConfigurationService.SPRING_BATCH_PREV);\n\t\tif(prevFile.exists()) {\n\t\t\tprevFile.renameTo(configFile);\n\t\t} else {\n\t\t\tthis.jobXMLFile.remove(jobName);\n\t\t}\n\t}",
"boolean isNewConfig();",
"EnvironmentConfig cloneConfig(){\n try {\n return (EnvironmentConfig)clone();\n }\n catch ( CloneNotSupportedException willNeverOccur) {\n return null;\n }\n }",
"com.google.protobuf.Any getNewConfig();",
"public void testRestoreOldState() throws Throwable {\n IDialogSettings settings = new DialogSettings(\"Workbench\");\n loadSettings(settings, Bug75909Test.OLD_DIALOG_SETTINGS_XML);\n ProblemFilter filter = new ProblemFilter(\"Bug75909Test\");\n filter.restoreFilterSettings(getFilterSettings(settings));\n List selected = filter.getSelectedTypes();\n assertEquals(Bug75909Test.OLD_SETTINGS_SELECTED, selected.size());\n MarkerType marker = getType(filter, Bug75909Test.INCLUDED_MARKER_ID);\n // this was marked as selected in the old attribute\n assertTrue(selected.contains(marker));\n MarkerType removed = getType(filter, Bug75909Test.REMOVED_MARKER_ID);\n // this was missing from the old attribute, so it should not be\n // selected\n assertFalse(selected.contains(removed));\n }",
"public ModificationState markOld()\r\n {\r\n return StateOldDelete.getInstance();\r\n }",
"public ClusterConfig mergeInto(ClusterConfig orig) {\n // copy in original and updated fields\n ClusterConfig deltaConfig = _builder.build();\n Builder builder =\n new Builder(orig.getId()).addResources(orig.getResourceMap().values())\n .addParticipants(orig.getParticipantMap().values())\n .addStateModelDefinitions(orig.getStateModelMap().values())\n .userConfig(orig.getUserConfig()).pausedStatus(orig.isPaused())\n .autoJoin(orig.autoJoinAllowed()).addStats(orig.getStats())\n .addAlerts(orig.getAlerts());\n for (Fields field : _updateFields) {\n switch (field) {\n case USER_CONFIG:\n builder.userConfig(deltaConfig.getUserConfig());\n break;\n case AUTO_JOIN:\n builder.autoJoin(deltaConfig.autoJoinAllowed());\n break;\n }\n }\n // add constraint deltas\n for (ConstraintType type : ConstraintType.values()) {\n ClusterConstraints constraints;\n if (orig.getConstraintMap().containsKey(type)) {\n constraints = orig.getConstraintMap().get(type);\n } else {\n constraints = new ClusterConstraints(type);\n }\n // add new constraints\n if (deltaConfig.getConstraintMap().containsKey(type)) {\n ClusterConstraints deltaConstraints = deltaConfig.getConstraintMap().get(type);\n for (ConstraintId constraintId : deltaConstraints.getConstraintItems().keySet()) {\n ConstraintItem constraintItem = deltaConstraints.getConstraintItem(constraintId);\n constraints.addConstraintItem(constraintId, constraintItem);\n }\n }\n // remove constraints\n for (ConstraintId constraintId : _removedConstraints.get(type)) {\n constraints.removeConstraintItem(constraintId);\n }\n builder.addConstraint(constraints);\n }\n\n // add stats and alerts\n builder.addStats(deltaConfig.getStats());\n builder.addAlerts(deltaConfig.getAlerts());\n\n // get the result\n ClusterConfig result = builder.build();\n\n // remove stats\n PersistentStats stats = result.getStats();\n for (String removedStat : _removedStats.getMapFields().keySet()) {\n if (stats.getMapFields().containsKey(removedStat)) {\n stats.getMapFields().remove(removedStat);\n }\n }\n\n // remove alerts\n Alerts alerts = result.getAlerts();\n for (String removedAlert : _removedAlerts.getMapFields().keySet()) {\n if (alerts.getMapFields().containsKey(removedAlert)) {\n alerts.getMapFields().remove(removedAlert);\n }\n }\n return result;\n }",
"Update withCancelRequested(Boolean cancelRequested);",
"private void updateProjectConfigurations() throws CheckstylePluginException\r\n {\r\n Iterator it = mWorkingCopies.iterator();\r\n while (it.hasNext())\r\n {\r\n\r\n CheckConfigurationWorkingCopy checkConfig = (CheckConfigurationWorkingCopy) it.next();\r\n\r\n ICheckConfiguration original = checkConfig.getSourceCheckConfiguration();\r\n\r\n // only if the name of the check config differs from the original\r\n if (original != null && original.getName() != null\r\n && !checkConfig.getName().equals(original.getName()))\r\n {\r\n\r\n List projects = ProjectConfigurationFactory.getProjectsUsingConfig(checkConfig);\r\n Iterator it2 = projects.iterator();\r\n\r\n while (it2.hasNext())\r\n {\r\n\r\n IProject project = (IProject) it2.next();\r\n IProjectConfiguration projectConfig = ProjectConfigurationFactory\r\n .getConfiguration(project);\r\n\r\n ProjectConfigurationWorkingCopy workingCopy = new ProjectConfigurationWorkingCopy(\r\n projectConfig);\r\n\r\n List fileSets = workingCopy.getFileSets();\r\n Iterator it3 = fileSets.iterator();\r\n while (it3.hasNext())\r\n {\r\n FileSet fileSet = (FileSet) it3.next();\r\n\r\n // Check if the fileset uses the check config\r\n if (original.equals(fileSet.getCheckConfig()))\r\n {\r\n // set the new check configuration\r\n fileSet.setCheckConfig(checkConfig);\r\n }\r\n }\r\n\r\n // store the project configuration\r\n if (workingCopy.isDirty())\r\n {\r\n workingCopy.store();\r\n }\r\n }\r\n }\r\n }\r\n }",
"public abstract boolean autosavesConfiguration();",
"public void actionSaveOld(java.awt.event.ActionEvent e) {\r\n\t\tif (Main.main.getConfigurationFile() == null) {\r\n\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\tint returnVal = fc.showSaveDialog((JMenuItem) e.getSource());\r\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\tMain.main.setConfigurationFile(file);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (Main.main.configuration != null) {\r\n\t\t\t\t\t\tFileWriter fw = new FileWriter(file);\r\n\t\t\t\t\t\tfw.write(Main.main.configuration.toXml());\r\n\t\t\t\t\t\tfw.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFileWriter fw;\r\n\t\t\ttry {\r\n\t\t\t\tfw = new FileWriter(Main.main.getConfigurationFile());\r\n\t\t\t\tfw.write(Main.main.configuration.toXml());\r\n\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public void createClonedConfig() {\n outputConfig = inputConfig.clone();\n this.setModified();\n }",
"@Test\n public void testConfigOverrideUpdateSR15743()\n throws Throwable {\n\n try {\n EnvironmentConfig envConfig = TestUtils.initEnvConfig();\n envConfig.setAllowCreate(true);\n env = create(envHome, envConfig);\n\n /*\n * Make sure that the database keeps its own copy of the\n * configuration object.\n */\n DatabaseConfig dbConfigA = new DatabaseConfig();\n dbConfigA.setOverrideBtreeComparator(false);\n dbConfigA.setBtreeComparator(TestComparator.class);\n dbConfigA.setAllowCreate(true);\n Database dbA = env.openDatabase(null, \"foo\", dbConfigA);\n\n /* Change the original dbConfig */\n dbConfigA.setBtreeComparator(TestComparator2.class);\n DatabaseConfig getConfig1 = dbA.getConfig();\n assertEquals(TestComparator.class,\n getConfig1.getBtreeComparator().getClass());\n\n /*\n * Change the retrieved config, ought to have no effect on what the\n * Database is storing.\n */\n getConfig1.setBtreeComparator(TestComparator2.class);\n DatabaseConfig getConfig2 = dbA.getConfig();\n assertEquals(TestComparator.class,\n getConfig2.getBtreeComparator().getClass());\n\n dbA.close();\n close(env);\n\n /* Ensure new comparator is written to disk. */\n envConfig = TestUtils.initEnvConfig();\n env = create(envHome, envConfig);\n\n dbConfigA = new DatabaseConfig();\n /* Change the comparator. */\n dbConfigA.setOverrideBtreeComparator(true);\n dbConfigA.setBtreeComparator(TestComparator2.class);\n dbA = env.openDatabase(null, \"foo\", dbConfigA);\n\n getConfig2 = dbA.getConfig();\n assertEquals(TestComparator2.class,\n getConfig2.getBtreeComparator().getClass());\n\n dbA.close();\n close(env);\n\n /* Read it back during recovery to ensure it was written. */\n envConfig = TestUtils.initEnvConfig();\n env = create(envHome, envConfig);\n\n dbConfigA = new DatabaseConfig();\n dbA = env.openDatabase(null, \"foo\", dbConfigA);\n getConfig2 = dbA.getConfig();\n assertEquals(TestComparator2.class,\n getConfig2.getBtreeComparator().getClass());\n\n /* Create a root for the tree. */\n dbA.put(null,\n new DatabaseEntry(new byte[1]),\n new DatabaseEntry(new byte[1]));\n\n dbA.close();\n close(env);\n\n /* Change it to a third one when there is a root present. */\n envConfig = TestUtils.initEnvConfig();\n env = create(envHome, envConfig);\n\n dbConfigA = new DatabaseConfig();\n /* Change the comparator. */\n dbConfigA.setOverrideBtreeComparator(true);\n dbConfigA.setBtreeComparator(TestComparator3.class);\n dbA = env.openDatabase(null, \"foo\", dbConfigA);\n getConfig2 = dbA.getConfig();\n assertEquals(TestComparator3.class,\n getConfig2.getBtreeComparator().getClass());\n dbA.close();\n close(env);\n\n /* Read it back during recovery to ensure it was written. */\n envConfig = TestUtils.initEnvConfig();\n env = create(envHome, envConfig);\n\n dbConfigA = new DatabaseConfig();\n dbA = env.openDatabase(null, \"foo\", dbConfigA);\n getConfig2 = dbA.getConfig();\n assertEquals(TestComparator3.class,\n getConfig2.getBtreeComparator().getClass());\n dbA.close();\n close(env);\n\n } catch (Throwable t) {\n t.printStackTrace();\n throw t;\n }\n }",
"public final DNSState revert() {\n return (this == CANCELED) ? this : PROBING_1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all users in this channel | public Set<User> getUsers() {
return bot.getUsers(name);
} | [
"Collection<GroupChatUser> getUsers();",
"public List<User> getAllUsers(){\n Controller controller= Controller.getInstance();\n List<User> users= new LinkedList<>();\n for(Map.Entry user: controller.getUsers().entrySet()){\n users.add((User)user.getValue());\n }\n return users;\n }",
"public List<User> getAllUsers() {\n return DataBaseService.getInstance().getAllUsers();\n }",
"public static Collection<User> getUserList(){\n\t\treturn connectedUsers.values();\n\t}",
"synchronized public ArrayList<String> getAllUsers() {\n ArrayList<String> userNames = new ArrayList<>();\n for (UserAccountInfo u : messageListener.getUserStorage().getUserInfoList()) {\n userNames.add(u.getLoginName());\n }\n System.out.println(userNames);\n return userNames;\n }",
"protected List<User> getAllRegisteredUsers() {\n log.info(\"Getting all users.\");\n return userRepository.findAll();\n }",
"public List<User> getAllUsers() {\n return db.withConnection(conn -> {\n List<User> users = new ArrayList<>();\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM User\");\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n User user = new User(rs);\n users.add(user);\n }\n stmt.close();\n return users;\n });\n }",
"public List<UserModel> getAllUsers() {\n\t\treturn internalTestService.internalUserMap.values().stream().collect(Collectors.toList());\n\t}",
"public List<String> getUsers() {\n return Collections.unmodifiableList(users);\n }",
"@Override\n\tpublic Set<String> getAllUser() {\n\t\tSet<String> allUsers = new HashSet<String>();\n\t\tDocument document = getDocument(tomcatUserXmlPath);\n\t\tNodeList roleList = document.getElementsByTagName(UserConnectivityConstant.TOMCAT_USER);\n\t\tif (roleList != null & roleList.getLength() > UserConnectivityConstant.ZERO) {\n\t\t\tfor (int index = UserConnectivityConstant.ZERO; index < roleList.getLength(); index++) {\n\t\t\t\tElement role = (Element) roleList.item(index);\n\t\t\t\tString userAttribute = role.getAttribute(UserConnectivityConstant.TOMCAT_USERNAME);\n\t\t\t\tsetUserGroupsSet(allUsers, userAttribute);\n\t\t\t}\n\t\t}\n\t\treturn allUsers;\n\t}",
"public List<User> getAllUsers();",
"public User[] getInUsers() {\n List<FullUser> inUserList;\n\n try {\n inUserList = baseRepository.<FullUser>edgeQueries().getInUsers(this.getUsername());\n } catch (IOException e) {\n throw new ApiExceptionHandler().internalServerError();\n }\n return fullUserListToUserArray(inUserList);\n }",
"public NSArray allUsers() {\n\t\tEOSortOrdering s = new EOSortOrdering( \"name\", EOSortOrdering.CompareAscending );\n\t\tEOFetchSpecification fs = new EOFetchSpecification( \"SWUser\", null, new NSArray( s ) );\n\t\treturn session().defaultEditingContext().objectsWithFetchSpecification( fs );\n\t}",
"public List<UserInfo> getUsers()\n {\n return Collections.unmodifiableList( users );\n }",
"public List<User> getUsers() throws IdentityStoreException {\n return identityStore.getUsersOfGroup(groupID, userStoreID);\n }",
"public List<User> getAllUsers() throws Auth0Exception {\n AuthAPI authApi = new AuthAPI(config.getDomain(), config.getManagementClientId(), config.getManagementClientSecret());\n AuthRequest request = authApi.requestToken(config.getAudience());\n TokenHolder holder = request.execute();\n ManagementAPI managementAPI = new ManagementAPI(config.getDomain(), holder.getAccessToken());\n Request<UsersPage> users = managementAPI.users().list(null);\n return users.execute().getItems();\n }",
"public List<User> getUsers() throws IdentityStoreException, GroupNotFoundException {\n return identityStore.getUsersOfGroup(uniqueGroupId);\n }",
"List<ChatUser> getAllChatUsers();",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets current ratings manager. | RatingsManager getRatingsManager(DocumentReference documentRef); | [
"public RatingService getRatingService()\r\n {\r\n if (ratingsService == null && RepositoryVersionHelper.isAlfrescoProduct(session))\r\n {\r\n this.ratingsService = new CustomRatingsServiceImpl((RepositorySession) session);\r\n }\r\n return ratingsService;\r\n }",
"public static RatingStorage getInstance() {\n if (rsInstance == null) {\n rsInstance = new RatingStorage();\n }\n return rsInstance;\n\n }",
"public List<Rating> getRatings() {\n return this.ratings;\n }",
"public RosterManager getRosterManager() {\n return mgrRoster;\n }",
"public Integer ratings() {\n return this.ratings;\n }",
"public double getRating() {\n return rating.getRating();\n }",
"public int getItSellerRating() {\n return itSellerRating;\n }",
"public int getRating() {\n\t\treturn _wishlist.getRating();\n\t}",
"public native int getRating() /*-{\n\t\treturn this.@com.pmt.wrap.titanium.media.Item::handler.rating;\n\t}-*/;",
"public RiddleManager getRiddleManager() {\n if (mManager == null || isInitializing()) {\n throw new IllegalStateException(\"No manager yet available, initialize first!\");\n }\n return mManager;\n }",
"public int getSystemRating() {\n\t\treturn systemRating;\n\t}",
"public double getRating(){\n\t\treturn this.user_rating;\n\t}",
"Manager getManager() {\n return Manager.getInstance();\n }",
"private Manager getManager()\n {\n return Manager.getInstance();\n }",
"RatSightingManager getSightingManager() {return sightingManager;}",
"public Recommender getRecommender() {\n return recommender;\n }",
"public User getRecommender() {\r\n\t\treturn recommender;\r\n\t}",
"public int getCurrentReviewers() {\n return currentReviewers;\n }",
"public double getTotalRating() {\n return totalRating;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parsing JSON with all movie data from Service and updating UI | private void getMoviesFromJson(String moviesJsonStr) throws JSONException {
// These are the names of the JSON objects that need to be extracted.
final String OWM_LIST = "results";
final String OWM_MOVIE_ID = "id";
final String OWM_OVERVIEW = "overview";
final String OWM_TITLE = "title";
final String OWM_POPULARITY = "popularity";
final String OWM_POSTER = "poster_path";
final String OWM_VOTE_AVERAGE = "vote_average";
final String OWM_RELEASE_DATE = "release_date";
try {
JSONObject moviesJSON = new JSONObject(moviesJsonStr);
JSONArray moviesArray = moviesJSON.getJSONArray(OWM_LIST);
// Insert the new movie information into the database
Vector<ContentValues> cVVector = new Vector<ContentValues>(moviesArray.length());
for(int i = 0; i < moviesArray.length(); i++) {
// Get the JSON object representing a movie
JSONObject movie = moviesArray.getJSONObject(i);
int movieId = movie.getInt(OWM_MOVIE_ID);
String title = movie.getString(OWM_TITLE);
String overview = movie.getString(OWM_OVERVIEW);
double popularity = movie.getDouble(OWM_POPULARITY);
double voteAverage = movie.getDouble(OWM_VOTE_AVERAGE);
String poster = movie.getString(OWM_POSTER);
String date = movie.getString(OWM_RELEASE_DATE);
// Get millis from date
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
cal.setTime(formatter.parse(date));
long dateMillis = cal.getTimeInMillis();
ContentValues movieValues = new ContentValues();
movieValues.put(MoviesContract.MovieEntry._ID, movieId);
movieValues.put(MoviesContract.MovieEntry.COLUMN_TITLE, title);
movieValues.put(MoviesContract.MovieEntry.COLUMN_DESCRIPTION, overview);
movieValues.put(MoviesContract.MovieEntry.COLUMN_POPULARITY, popularity);
movieValues.put(MoviesContract.MovieEntry.COLUMN_VOTE, voteAverage);
movieValues.put(MoviesContract.MovieEntry.COLUMN_POSTER, poster);
movieValues.put(MoviesContract.MovieEntry.COLUMN_DATE, dateMillis);
cVVector.add(movieValues);
}
// add to database
int inserted = 0;
if ( cVVector.size() > 0 ) {
// delete old data so we don't build up an endless history
mContext.getContentResolver().delete(MoviesContract.MovieEntry.CONTENT_URI, null, null);
// Insert movies with bulkInsert
ContentValues[] cvArray = new ContentValues[cVVector.size()];
cVVector.toArray(cvArray);
mContext.getContentResolver().bulkInsert(MoviesContract.MovieEntry.CONTENT_URI, cvArray);
}
} catch (JSONException e) {
Log.e(LOG_TAG, e.getMessage(), e);
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
} | [
"public void fetchMovies(){\n MovieDBClient.makeNowPlayingReqest(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int i, Headers headers, JSON json) {\n Log.i(TAG, \"successful request for movies\");\n\n //1.) Get the \"results\" array from the json object!\n JSONObject jsonObject = json.jsonObject;\n try {\n JSONArray results = jsonObject.getJSONArray(\"results\");\n\n //2.) Use static method from Movie{} to parse this JSOArray to a List<Movie> instead:\n movies.addAll(Movie.fromJsonArray(results, posterSize, backdropSize));\n movieAdapter.notifyDataSetChanged();\n\n Log.i(TAG, \"results received=\" + movies.toString());\n\n } catch (JSONException e) {\n Log.e(TAG, \"json exception while getting \\\"results\\\" array: error=\", e);\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int i, Headers headers, String s, Throwable throwable) {\n Log.i(TAG, \"failed request for movies\");\n }\n });\n }",
"private Movie getMovie() {\n Gson gson = new Gson();\n return gson.fromJson(result, Movie.class);\n }",
"public static List<Movie> parseMovieListJson (String json){\n\n List<Movie> movieList = new ArrayList<>(); // creating List of Movie objects to be returned\n\n try {\n JSONObject movieQuery = new JSONObject(json); // creating json object from string parameter\n JSONArray queryResults = movieQuery.getJSONArray(\"results\"); // creating JSONArray where movies are contained\n JSONObject newMovie;\n\n // iterating over the JSONArray and initializing each movie object to be appended to movieList\n for (int i = 0; i < MOVIES_PER_API_QUERY; i++) {\n\n newMovie = queryResults.getJSONObject(i);\n\n\n Movie movie = new Movie(newMovie.optString(\"title\"));\n movie.setReleaseDate(newMovie.optString(\"release_date\"));\n movie.setOverview(newMovie.optString(\"overview\"));\n movie.setImageLink(newMovie.optString(\"poster_path\"));\n movie.setVoteAvg(JSONObject.numberToString((Number) newMovie.get(\"vote_average\")));\n movie.setPopularity(JSONObject.numberToString((Number)newMovie.get(\"popularity\")));\n\n movieList.add(movie);\n\n }\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n\n return movieList;\n }",
"private static List<Movie> extractMovies(String moviesJSON){\n if (TextUtils.isEmpty(moviesJSON)) {\n return null;\n }\n ArrayList<Movie> movies = new ArrayList<>();\n try {\n JSONObject baseJsonResponse = new JSONObject(moviesJSON);\n JSONArray moviesArray = baseJsonResponse.getJSONArray(\"results\");\n\n for (int i = 0; i < moviesArray.length(); i++) {\n JSONObject currentMovie = moviesArray.getJSONObject(i);\n String id = currentMovie.getString(\"id\");\n String title;\n String date;\n String poster_path;\n String vote_average;\n String overview;\n\n if(!currentMovie.getString(\"title\").equals(\"\"))\n title = currentMovie.getString(\"title\");\n else\n title = UNKNOWN_TITLE;\n\n if(!currentMovie.getString(\"release_date\").equals(\"\"))\n date = currentMovie.getString(\"release_date\").substring(0,10);\n else\n date = UNKNOWN_DATE;\n\n if(!currentMovie.getString(\"poster_path\").equals(\"\"))\n poster_path = IMAGE_URL + currentMovie.getString(\"poster_path\");\n else\n poster_path = UNKNOWN_POSTER_PATH;\n\n if(!currentMovie.getString(\"vote_average\").equals(\"\"))\n vote_average = String.valueOf(currentMovie.getDouble(\"vote_average\"));\n else\n vote_average = UNKNOWN_VOTE_AVERAGE;\n\n if(!currentMovie.getString(\"overview\").equals(\"\"))\n overview = currentMovie.getString(\"overview\");\n else\n overview = UNKNOWN_OVERVIEW;\n\n Movie movie = new Movie(id, title, date, poster_path, vote_average, overview);\n movies.add(movie);\n }\n\n }catch (JSONException e){\n Log.e(LOG_TAG,\"Error in fetching data\",e);\n }\n return movies;\n }",
"private Movies getDetailFromJson(String movieJsonStr) throws JSONException {\n\t\tfinal String ID = \"id\";\n\t\tfinal String TITLE = \"original_title\";\n\t\tfinal String POSTER_PATH = \"poster_path\";\n\t\tfinal String RELEASE_DATE = \"release_date\";\n\t\tfinal String DUREE = \"runtime\";\n\t\tfinal String RATING = \"vote_average\";\n\t\tfinal String OVERVIEW = \"overview\";\n\t\tfinal String VOTE_COUNT = \"vote_count\";\n\t\t\n\t\t//columns movie backdrop\n\t\tfinal String IMAGES = \"images\";\n\t\tfinal String BACKDROPS = \"backdrops\";\n\t\tfinal String BACKDROP_NAME = \"file_path\";\n\t\tint nb_file = 5; // Number of poster to extract\n\t\t\n\t\t//columns reviews\n\t\tfinal String RESULT = \"results\";\n\t\tfinal String REVIEWS = \"reviews\";\n\t\tfinal String AUTHOR = \"author\";\n\t\tfinal String COMMENT = \"content\";\n\t\t\n\t\t//columns trailer\n\t\tfinal String VIDEOS = \"videos\";\n\t\tfinal String KEY = \"key\"; //shortest url of the trailer\n\t\tMovies result;\n\n\t\t//colums genres\n\t\tfinal String GENRES = \"genres\";\n\t\tfinal String NAME = \"name\";\n\t\t\n\t\t//columns similar Movies\n\t\tfinal String SIMILAR = \"similar\";\n\t\t//plus ID, TITLE and POSTER_PATH\n\t\t//columns cast (actor)\n\t\tfinal String CREDITS = \"credits\";\n\t\tfinal String CAST = \"cast\";\n//\t\tfinal String CAST_ID = \"cast_id\";\n\t\t//plus ID\n\t\tfinal String PROFILE_PATH = \"profile_path\";\n\t\tfinal String CAST_NAME = \"name\";\n\t\t\n\t\tJSONObject oneMovie = new JSONObject(movieJsonStr);\n\t\t\n\t\t//Extract movie detail\n\t\tint id = oneMovie.getInt(ID);\n\t\tString title = oneMovie.getString(TITLE);\n\t\tString posterPath = oneMovie.getString(POSTER_PATH);\n\t\tString releaseDate = oneMovie.getString(RELEASE_DATE);\n\t\tint duree = oneMovie.getString(DUREE) == \"null\" ? 0 : oneMovie.getInt(DUREE);\n\t\tdouble rating = oneMovie.getDouble(RATING);\n\t\tString overview = oneMovie.getString(OVERVIEW);\n\t\tint vote_count = oneMovie.getString(VOTE_COUNT) == \"null\" ? 0 : oneMovie.getInt(VOTE_COUNT);\n\t\t\n\t\t//Extract backdrops\n\t\tJSONObject imagesObject = oneMovie.getJSONObject(IMAGES);\n\t\tJSONArray backdropsArray = imagesObject.getJSONArray(BACKDROPS);\n\t\tint nbBackdrops = backdropsArray.length();\n\t\tnb_file = nbBackdrops < nb_file? nbBackdrops : nb_file;\n\t\tString arrayBackdrops[] = new String[nb_file];\n\t\t\n\t\tfor (int i = 0; i < nb_file; i++) {\n\t\t\tarrayBackdrops[i] = backdropsArray.getJSONObject(i).getString(BACKDROP_NAME);\n\t\t}\n\t\t\n\t\t//Extract reviews\n\t\tJSONObject reviewsObject = oneMovie.getJSONObject(REVIEWS);\n\t\tJSONArray reviewsArray = reviewsObject.getJSONArray(RESULT);\n\t\tint nbReviews = reviewsArray.length();\n\t\tComments comment[] = new Comments[nbReviews];\n\t\tfor (int i = 0; i < nbReviews; i++) {\n\t\t\tJSONObject reviewObject = reviewsArray.getJSONObject(i);\n\t\t\tString authorName = reviewObject.getString(AUTHOR);\n\t\t\tString review = reviewObject.getString(COMMENT);\n\t\t\tcomment[i] = new Comments(authorName, review);\n\t\t}\n\t\t\n\t\t//Extract trailers\n\t\tJSONObject videosObject = oneMovie.getJSONObject(VIDEOS);\n\t\tJSONArray videosArray = videosObject.getJSONArray(RESULT);\n\t\tint nbVideos = videosArray.length();\n\t\tString arrayVideos[] = new String[nbVideos]; \n\t\tfor (int i = 0; i < nbVideos; i++) {\n\t\t\tarrayVideos[i] = videosArray.getJSONObject(i).getString(KEY);\n\t\t}\n\t\t\n\t\t//Extract genres\n\t\tJSONArray genresArray = oneMovie.getJSONArray(GENRES);\n\t\tint nbGenres = genresArray.length();\n\t\tString arrayGenres[] = new String[nbGenres];\n\t\tfor (int i = 0; i < nbGenres; i++) {\n\t\t\tarrayGenres[i] = genresArray.getJSONObject(i).getString(NAME);\n\t\t}\n\t\t\n\t\t//Extract cast infos\n\t\tJSONObject castInfosObject = oneMovie.getJSONObject(CREDITS);\n\t\tJSONArray castArray = castInfosObject.getJSONArray(CAST);\n\t\tint nbCast = castArray.length();\n\t\tActor arrayActor[] = new Actor[nbCast];\n\t\tfor (int i = 0; i < nbCast; i++) {\n\t\t\tJSONObject oneCast = castArray.getJSONObject(i);\n\t\t\tint idCast = oneCast.getInt(ID);\n\t\t\tString name = oneCast.getString(CAST_NAME);\n\t\t\tString profilePath = Utility.builtUrlImage(oneCast.getString(PROFILE_PATH), Constantes.IMAGE_SIZE_W154);\n\t\t\tarrayActor[i] = new Actor(idCast, name, profilePath);\n\t\t\t\n\t\t}\n\t\t\n\t\t//Extract similar movies\n\t\tJSONObject similarObject = oneMovie.getJSONObject(SIMILAR);\n\t\tJSONArray resultArray = similarObject.getJSONArray(RESULT);\n\t\tint nbSimilar = resultArray.length();\n\t\tMovies arraySimilarMovie[] = new Movies[nbSimilar];\n\t\tfor (int i = 0; i < nbSimilar; i++) {\n\t\t\tJSONObject movie = resultArray.getJSONObject(i);\n\t\t\tint movieId = movie.getInt(ID);\n\t\t\tString movieTitle = movie.getString(TITLE);\n\t\t\tString moviePoster = Utility.builtUrlImage(movie.getString(POSTER_PATH), Constantes.IMAGE_SIZE_W154);\n\t\t\tarraySimilarMovie[i] = new Movies(movieId, movieTitle, moviePoster);\n\t\t}\n\t\t\n\t\tresult = new Movies(id, title, Utility.builtUrlImage(posterPath, Constantes.IMAGE_SIZE_W342), releaseDate,\n\t\t\t\t\t\t\tduree, rating, vote_count, overview, arrayBackdrops, comment, arrayVideos, \n\t\t\t\t\t\t\tarrayGenres, arrayActor, arraySimilarMovie);\n\t\treturn result;\n\t}",
"public static List<Movie> getMovieListFromJson(String jsonString) {\n //if the JSON string is empty or null, then return null.\n if (TextUtils.isEmpty(jsonString)) {\n return null;\n }\n\n List<Movie> movieList = new ArrayList<>();\n\n //parsing json string\n try {\n\n //create a json Object from the json string\n JSONObject baseJsonResponse = new JSONObject(jsonString);\n\n //extract the json array with the key \"results\",\n JSONArray resultArray = baseJsonResponse.getJSONArray(RESULTS);\n\n //get results array length\n int count = resultArray.length();\n\n //from article array extract individual movie details\n for (int i = 0; i < count; i++) {\n\n JSONObject currentMovie = resultArray.getJSONObject(i);\n\n //extract integer value for key \"id\"\n int currentMovieId = currentMovie.optInt(ID);\n\n //extract string value for key \"poster_path\"\n String currentPosterPath = currentMovie.optString(POSTER);\n\n //extract string value for key \"title\"\n String currentTitle = currentMovie.optString(TITLE);\n\n //extract string value for key \"release_date\"\n String currentReleaseDate = currentMovie.optString(RELEASE_DATE);\n\n //extract string value for key \"backdrop_path\"\n String currentBockdop = currentMovie.optString(BACKDROP);\n\n //extract double value for key \"vote_average\"\n String currentVote = Double.toString(currentMovie.optDouble(VOTE));\n\n //extract string value for key \"overview\"\n String currentPlot = currentMovie.optString(PLOT);\n\n //create Movie object and add to list\n Movie movie = new Movie(currentMovieId,currentPosterPath,currentTitle,currentReleaseDate,currentBockdop,currentVote,currentPlot);\n movieList.add(movie);\n }\n\n } catch (JSONException e) {\n // catch the exception here & print a log message\n Log.e(\"JSONUtils\", \"Problem parsing json results\", e);\n }\n\n // Return the list of Movies\n return movieList;\n }",
"public static void parseMovieJSONResult( String jsonResult, ArrayList<Movie> moviesList) {\n\n Movie newMovie;\n try {\n // Create the root JSONObject from the JSON string.\n JSONObject jsonRootObject = new JSONObject(jsonResult);\n Log.d(TAG, \".parseMovieJSONResult(): object parsed from JSON: \" + jsonRootObject.toString());\n\n //Get the instance of JSONArray that contains JSONObjects\n JSONArray jsonArray = jsonRootObject.optJSONArray(RESULT_ARRAY);\n\n //Iterate the jsonArray and print the info of JSONObjects\n for(int i=0; i < jsonArray.length(); i++){\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n // parse all elements of JSON object we are interested in\n int id = Integer.parseInt(jsonObject.optString(ID).toString());\n String posterPath = jsonObject.optString(POSTER_PATH).toString();\n String plotSynopsis = jsonObject.optString(PLOT_SYNOPSIS).toString();\n String title = jsonObject.optString(TITLE).toString();\n float rating = Float.parseFloat(jsonObject.optString(RATING).toString());\n String releaseDate = jsonObject.optString(RELEASE_DATE).toString();\n\n newMovie = new Movie(id, title, posterPath, plotSynopsis, rating, releaseDate);\n moviesList.add(newMovie);\n }\n Log.d(TAG, \".parseMovieJSONResult(): JSON parsed to movie array of length\" + moviesList.size());\n } catch (JSONException e) {\n Log.e(TAG, \".parseMovieJSONResult(): JSON parsing failed: \" + e.getMessage());\n e.printStackTrace();\n }\n }",
"private ArrayList<MovieModel.MovieItem> getMovieDataFromJSON(String jsonStr)\n throws JSONException {\n final String RESULTS_ARRAY_KEY = \"results\";\n final String ADULT_BOOL_KEY = \"adult\";\n final String POSTER_PATH_STRING_KEY = \"poster_path\";\n final String OVERVIEW_STRING_KEY = \"overview\";\n final String RELEASE_DATE_STRING_KEY = \"release_date\";\n final String TITLE_STRING_KEY = \"title\";\n final String VOTE_AVERAGE_STRING_KEY = \"vote_average\";\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray movieArray = jsonObject.getJSONArray(RESULTS_ARRAY_KEY);\n String[] resultStrs = new String[movieArray.length()];\n ArrayList<MovieModel.MovieItem> movieItems = new ArrayList<>();\n for(int i = 0; i < resultStrs.length; i++) {\n JSONObject movieObject = movieArray.getJSONObject(i);\n boolean adult = movieObject.getBoolean(ADULT_BOOL_KEY);\n if ( !adult ) {\n String id = \"\"+movieItems.size();\n MovieModel.MovieItem movieItem = new MovieModel.MovieItem(id);\n movieItem.overview = movieObject.getString(OVERVIEW_STRING_KEY);\n String posterPath = movieObject.getString(POSTER_PATH_STRING_KEY);\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"http\").authority(\"image.tmdb.org\").appendPath(\"t\").appendPath(\"p\").appendPath(\"w185\").appendPath(posterPath);\n posterPath = builder.build().toString();\n try {\n posterPath = java.net.URLDecoder.decode(posterPath, \"UTF-8\");\n } catch ( UnsupportedEncodingException e ) {\n Log.e(LOG_TAG, \"Exception \"+e.toString());\n }\n movieItem.posterPath = posterPath;\n movieItem.releaseDate = movieObject.getString(RELEASE_DATE_STRING_KEY);\n movieItem.title = movieObject.getString(TITLE_STRING_KEY);\n movieItem.voteAverage = movieObject.getString(VOTE_AVERAGE_STRING_KEY);\n movieItems.add(movieItem);\n }\n }\n for (String s : resultStrs) {\n if ( VERBOSE_LOGGING ) Log.v(LOG_TAG, \"Movie entry: \" + s);\n }\n return movieItems;\n }",
"List<Movie> mapToMovieList(List<MovieResultJson> jsonResults);",
"private void loadMoviesData()\n {\n showMoviesDataView();\n new FetchMovieData(this, new FetchMovieDataCompleteListener()).execute(MOVIE_DB_URL_POPULAR+API_Key);\n\n }",
"private void fetchMovieDetails() {\n Stream.of(movieListings).forEach(movieListing -> {\n Picasso.with(MoviesApplication.getApp()).load(movieListing.getPosterUrl()).fetch();\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieDetails(movieListing.getId()).enqueue(movieDetailCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieVideos(movieListing.getId()).enqueue(movieVideoCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieReviews(movieListing.getId()).enqueue(movieReviewCallback);\n });\n }",
"private ArrayList<Movie> getMovies(String moviesJsonStr) throws JSONException {\n final String TMDB_RESULTS = \"results\";\n final String TMDB_backdrop_path = \"backdrop_path\";\n final String TMDB_ID = \"id\";\n final String TMDB_ORIGINAL_TITLE = \"original_title\";\n final String TMDB_OVERVIEW = \"overview\";\n final String TMDB_RELEASE_DATE = \"release_date\";\n final String TMDB_POSTER_PATH = \"poster_path\";\n final String TMDB_VOTE_AVERAGE = \"vote_average\";\n final String TMDB_VOTE_COUNT = \"vote_count\";\n\n JSONObject moviesJson = new JSONObject(moviesJsonStr);\n JSONArray moviesArray = moviesJson.getJSONArray(TMDB_RESULTS);\n\n int moviesArrayLength = moviesArray.length();\n\n mMoviesList = new ArrayList<Movie>();\n for (int i = 0; i < moviesArrayLength; i++) {\n JSONObject movieInfo = moviesArray.getJSONObject(i);\n\n int id = movieInfo.getInt(TMDB_ID);\n\n String backdropPath = movieInfo.getString(TMDB_backdrop_path);\n String posterPath = movieInfo.getString(TMDB_POSTER_PATH);\n\n String originalTitle = movieInfo.getString(TMDB_ORIGINAL_TITLE);\n String overview = movieInfo.getString(TMDB_OVERVIEW);\n String releaseDate = movieInfo.getString(TMDB_RELEASE_DATE);\n\n String voteAverage = movieInfo.getString(TMDB_VOTE_AVERAGE);\n String voteCount = movieInfo.getString(TMDB_VOTE_COUNT);\n\n Movie movie = new Movie(id);\n movie.setBackdropPath(backdropPath);\n movie.setPosterPath(posterPath);\n movie.setOriginalTitle(originalTitle);\n movie.setOverview(overview);\n movie.setReleaseDate(releaseDate);\n movie.setVoteAverage(voteAverage);\n movie.setVoteCount(voteCount);\n mMoviesList.add(movie);\n }\n\n return mMoviesList;\n }",
"@Override\n public void onJsonParsingSuccess() {\n hideProgressDialog();\n selectedEpisode = jsonHandler.getEpisodeDetails();\n if(selectedEpisode != null){\n textViewYear.setText(selectedEpisode.getYear());\n textViewRated.setText(selectedEpisode.getRated());\n textViewReleased.setText(selectedEpisode.getReleased());\n textViewSeason.setText(selectedEpisode.getSeason());\n textViewEpisode.setText(selectedEpisode.getEpisode());\n textViewRuntime.setText(selectedEpisode.getRuntime());\n textViewImdb.setText(selectedEpisode.getImdbRating());\n textViewGenre.setText(selectedEpisode.getGenre());\n textViewDirector.setText(selectedEpisode.getDirector());\n }\n }",
"private static List<Movie> getMovieInfo(String movieJsonString) {\n List<Movie> movies = new ArrayList<>();\n\n try {\n JSONObject movieData = new JSONObject(movieJsonString);\n JSONArray movieArray = movieData.getJSONArray(\"results\");\n\n for (int i = 0; i < movieArray.length(); i++) {\n JSONObject individualMovie = movieArray.getJSONObject(i);\n int movieId = individualMovie.optInt(\"id\");\n String posterPath = individualMovie.optString(\"poster_path\", NA);\n String originalTitle = individualMovie.optString(\"original_title\", NA);\n String overview = individualMovie.optString(\"overview\", NA);\n String releaseDate = individualMovie.optString(\"release_date\", NA);\n double voteAverage = individualMovie.optDouble(\"vote_average\");\n\n //Create a new movie object if the movie has both an id and a relative path to the\n //movie poster image.\n if (movieId != 0 && !posterPath.equalsIgnoreCase(NA)) {\n movies.add(new Movie(movieId, posterPath, originalTitle,\n overview, releaseDate, voteAverage));\n }\n }\n return movies;\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Error parsing JSON data. \", e);\n return null;\n }\n }",
"public Map<String, MovieVO> populateMovieInfo(JSONArray entireMovieArray) {\n\n Log.d(TAG, \"In populateMovieInfo\");\n\n Map<String, MovieVO> movieMap = new HashMap<>();\n String voType = MOVIE_VO_TYPE;\n\n if(entireMovieArray == null) {\n Log.d(TAG, \"Movie array is null\");\n return null;\n }\n\n for (int movieCount = 0; movieCount < entireMovieArray.length(); movieCount++) {\n try {\n movieVO = new MovieVO(); //reinitialize movieVO so data gets cleared for old theater\n // go through array of all movies for a specific theater\n if(entireMovieArray.get(movieCount) instanceof JSONObject) {\n // this map contains info for one movie\n Map<String, Object> oneMovieMap = toMap(voType, entireMovieArray.getJSONObject(movieCount)); //each jsonObject: one movie\n\n String showtimeVOType = SHOWTIME_VO_TYPE;\n // go through map of one movie to see if there are more objects to loop through\n for (Map.Entry<String, Object> entry : oneMovieMap.entrySet()) {\n\n if (entry.getValue() instanceof JSONArray) {\n\n JSONArray showTimeJsonArray = (JSONArray) entry.getValue();\n // go through list of show times for each movie\n for (int showtimeCount = 0; showtimeCount < showTimeJsonArray.length(); showtimeCount++) {\n showtimeVO = new ShowtimeVO();\n if (showTimeJsonArray.get(showtimeCount) instanceof JSONObject) {\n Map<String, Object> showtimeMap = toMap(showtimeVOType, showTimeJsonArray.getJSONObject(showtimeCount));\n setValueInVO(showtimeVOType, showtimeMap);\n }\n // add showtime vo to the list\n if (showtimeVO.getCode() != null) {\n movieVO.setCode(showtimeVO.getCode());\n }\n if (showtimeVO.getName() != null) {\n if(movieVO.getShowtimeVOMap() == null) {\n //showtime map is null for movie, create it\n HashMap<String, List<ShowtimeVO>> showtimeVOMap = new HashMap<>();\n movieVO.setShowtimeVOMap(showtimeVOMap);\n }\n if(movieVO.getShowtimeVOMap() != null && movieVO.getShowtimeVOMap().get(showtimeVO.getName()) != null) {\n //showtime map has list of showtimes for that theater already\n movieVO.getShowtimeVOMap().get(showtimeVO.getName()).add(showtimeVO);\n }\n else if(movieVO.getShowtimeVOMap() != null) {\n //showtime map has no showtimes for that theater\n List <ShowtimeVO> showtimeList = new ArrayList<>();\n showtimeList.add(showtimeVO);\n movieVO.getShowtimeVOMap().put(showtimeVO.getName(), showtimeList);\n }\n }\n }\n }\n\n // result: movieVO is now a combination of all the hash map values that came from recursive function\n setValueInVO(voType, oneMovieMap);\n //movieVO.setShowtimeVOList(showTimeList);\n\n String movieTitle = movieVO.getTitle();\n if (movieTitle != null) {\n movieMap.put(movieTitle, movieVO);\n } else {\n Log.d(TAG, \"Cannot set in Map\");\n }\n }\n }\n\n } catch (JSONException e) {\n Log.e(TAG, \"Could not get JSON Object! \" + e.getMessage());\n }\n }\n\n StaticDataHolder.movieCache.put(StaticDataHolder.postalCode, movieMap); // set movie map in cache\n Log.d(TAG, \"Leaving populateMovieInfo\");\n return movieMap;\n\n }",
"public interface MovieMapperService {\n\n /**\n * Maps from model.MovieResultJson.class to model.Movie.class objects.\n *\n * @param jsonResults the movie results of themoviedb.org api search.\n * @return a list of mapped movies.\n */\n List<Movie> mapToMovieList(List<MovieResultJson> jsonResults);\n}",
"public static List<Movie> getMoviesFromJson(String jsonString){\n\n // initialize the list of movies\n List<Movie> movies = new ArrayList<Movie>();\n\n try {\n // get the entire response as an object\n JSONObject response = new JSONObject(jsonString);\n\n // The movies are contained in the \"results\" array\n JSONArray results = response.getJSONArray(MDB_RESULTS);\n\n // now we iterate over each result to get each movie\n for(int i = 0; i < results.length(); i++){\n // create a new movie\n JSONObject result = results.getJSONObject(i);\n // get the data\n int id = result.getInt(MDB_MOVIE_ID);\n String title = result.getString(MDB_TITLE);\n String releaseDate = result.getString(MDB_RELEASE_DATE);\n\n // create the full string for a poster url\n String poster = \"http://image.tmdb.org/t/p/w185/\" + result.getString(MDB_POSTER);\n int vote_avg = result.getInt(MDB_VOTE_AVG);\n String plot = result.getString(MDB_PLOT);\n\n // create a new movie\n Movie newMovie = new Movie(\n id,\n title,\n releaseDate,\n poster,\n vote_avg,\n plot);\n\n // add it to the list\n movies.add(newMovie);\n }\n\n } catch (JSONException e){\n e.printStackTrace();\n }\n\n return movies;\n }",
"private ArrayList<Movie> parseSearchedMovies(String jsonString) {\n ArrayList<Movie> movies = new ArrayList<>();\n try {\n JSONObject jsonObject = new JSONObject(jsonString);\n JSONArray jsonArray = jsonObject.getJSONArray(\"results\");\n for (int i = 0; i < jsonArray.length(); ++i) {\n JSONObject jsonMovie = jsonArray.getJSONObject(i);\n String name = jsonMovie.getString(\"title\");\n double rating = jsonMovie.getDouble(\"vote_average\");\n String posterImageUrl = jsonMovie.getString(\"poster_path\");\n String releaseDate = jsonMovie.getString(\"release_date\");\n String summary = jsonMovie.getString(\"overview\");\n String detailImageUrl = jsonMovie.getString(\"backdrop_path\");\n int id = jsonMovie.getInt(\"id\");\n Movie newMovie = new Movie(id, name, rating, posterImageUrl, releaseDate, summary, detailImageUrl);\n movies.add(newMovie);\n }\n\n } catch (JSONException e) {\n searchErrorTextView.setVisibility(View.VISIBLE);\n searchErrorTextView.setText(R.string.unexpectedMessage);\n e.printStackTrace();\n }\n return movies;\n }",
"private static Movie[] extractMovieList(String movieJSON) {\n Movie[] movieList = new Movie[20];\n if (TextUtils.isEmpty(movieJSON)) {return null;}\n try {\n JSONObject baseJsonResponse = new JSONObject(movieJSON);\n JSONArray results = baseJsonResponse.getJSONArray(\"results\");\n\n for (int i = 0; i < 20; i++) {\n JSONObject movieIndex = results.getJSONObject(i);\n movieList[i] = new Movie(movieIndex.getString(\"poster_path\"),\n movieIndex.getString(\"title\"),\n movieIndex.getString(\"release_date\"),\n movieIndex.getString(\"overview\"),\n movieIndex.getDouble(\"vote_average\"),\n movieIndex.getInt(\"id\"));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return movieList;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert a new edge into the graph. | public void insert(Edge edge) {
edges[edge.getSource()].add(edge);
if (!isDirected()) {
edges[edge.getDest()].add(new Edge(edge.getDest(),
edge.getSource(),
edge.getWeight()));
}
} | [
"public void insert(Edge edge);",
"public void insert(Edge e){\n\t\t\n\t\tedges.add(e); \n\t\t\n\t}",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }",
"public void insert(Edge edge, int index);",
"boolean insertEdge(EDEdge<W> edge);",
"void addEdge(E edge);",
"boolean insertEdge(V vOrig, V vDest, E edge, double eWeight);",
"void add(Edge edge);",
"public void insert( Edge e )\r\n {\r\n array[ size ] = e;\r\n size++;\r\n upHeap( size - 1 );\r\n }",
"void addEdge(Edge e);",
"public void add(Edge e) { edges.put(e.getFirst(),e); }",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"@Override\r\n\tpublic void addEdge(Edge<V, D> edge) {\r\n\t\tif (edge == null) throw new NullPointerException(\"edge == null\");\r\n\t\tNode<V> source = getNode(edge.source().value());\r\n\t\tif (source == null) throw new IllegalArgumentException(\r\n\t\t\t\t\"source of edge(\" + edge.source() + \") is not in the graph\");\r\n\t\tNode<V> destination = getNode(edge.destination().value());\r\n\t\tif (destination == null) throw new IllegalArgumentException(\r\n\t\t\t\t\"destination of edge(\" + edge.destination() + \") is not in the graph\");\r\n\t\tappendEdge(source, edge);\r\n\t\tappendEdge(destination, edge.swap());\r\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);",
"public void insertEdge(String s1,String s2) {\n\tint u = getIndex(s1);\n\tint v = getIndex(s2);\n\tif(u==v) {// we cant add edge to same vertex\n\t\tthrow new IllegalArgumentException(\"not valid edge\");\n\t\t}\n\tif(adj[u][v] == true) {// if we have an edge already we cant add new one\n\t\tSystem.out.println(\"edge is already present\");\n\t}\n\telse {// finally we can add edge now :D\n\t\tadj[u][v] = true;\n\t\te++;\n\t}\n}",
"public void insert(HalfEdge e) {\n // if no other edge around origin\n if (oNext() == this) {\n // set linkage so ring is correct\n insertAfter(e);\n return;\n }\n\n // otherwise, find edge to insert after\n int ecmp = compareTo(e);\n HalfEdge ePrev = this;\n do {\n HalfEdge oNext = ePrev.oNext();\n int cmp = oNext.compareTo(e);\n if (cmp != ecmp || oNext == this) {\n ePrev.insertAfter(e);\n return;\n }\n ePrev = oNext;\n } while (ePrev != this);\n Assert.shouldNeverReachHere();\n }",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void addOrUpdateEdge(EdgeData edgeToAdd)\n {\n if(edgeToAdd != null && edgeToAdd.getDestination() != null)\n {\n // look for an existing edge given the provided edgeToAdd parameter\n // and return that edge if it exists\n EdgeData edge = findEdgeThatPointsToGivenNodeName(edgeToAdd.getDestination().getName());\n\n // if the edge is null, the edge to add is new and will be connected with this node\n if(edge == null)\n {\n _edges.add(edgeToAdd); // add edge to _edges list\n }\n // edge already exists, therefore only change the weight\n else\n {\n edge.setWeight(edgeToAdd.getWeight()); // update existing edge's weight\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'SSL Configuration'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseSSLConfiguration(SSLConfiguration object) {
return null;
} | [
"public T caseClientSSLConfiguration(ClientSSLConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public T caseServerSSLConfiguration(ServerSSLConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public <C extends SSLConfiguration> T caseSecureEndpointConfiguration(SecureEndpointConfiguration<C> object) {\r\n\t\treturn null;\r\n\t}",
"public T caseConfiguration(Configuration object)\n {\n return null;\n }",
"public T caseConfiguration(Configuration object) {\n\t\treturn null;\n\t}",
"public SSLConfig getSSLConfig() {\n return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues);\n }",
"public interface SecurityConfigurator {\n\n /**\n * The provider to use for {@link SSLEngine}.\n */\n enum SslProvider {\n /**\n * Use the stock JDK implementation.\n */\n JDK,\n /**\n * Use the openssl implementation.\n */\n OPENSSL,\n /**\n * Auto detect which implementation to use.\n */\n AUTO\n }\n\n /**\n * Trusted certificates for verifying the remote endpoint's certificate. The input stream should\n * contain an {@code X.509} certificate chain in {@code PEM} format.\n *\n * @param trustCertChainSupplier a supplier for the certificate chain input stream.\n * <p>\n * The responsibility to call {@link InputStream#close()} is transferred to callers of the returned\n * {@link Supplier}. If this is not the desired behavior then wrap the {@link InputStream} and override\n * {@link InputStream#close()}.\n * @return {@code this}.\n */\n SecurityConfigurator trustManager(Supplier<InputStream> trustCertChainSupplier);\n\n /**\n * Trust manager for verifying the remote endpoint's certificate.\n * The {@link TrustManagerFactory} which take preference over any configured {@link Supplier}.\n *\n * @param trustManagerFactory the {@link TrustManagerFactory} to use.\n * @return {@code this}.\n */\n SecurityConfigurator trustManager(TrustManagerFactory trustManagerFactory);\n\n /**\n * The SSL protocols to enable, in the order of preference.\n *\n * @param protocols the protocols to use.\n * @return {@code this}.\n * @see SSLEngine#setEnabledProtocols(String[])\n */\n SecurityConfigurator protocols(String... protocols);\n\n /**\n * The cipher suites to enable, in the order of preference.\n *\n * @param ciphers the ciphers to use.\n * @return {@code this}.\n */\n SecurityConfigurator ciphers(Iterable<String> ciphers);\n\n /**\n * Set the size of the cache used for storing SSL session objects.\n *\n * @param sessionCacheSize the cache size.\n * @return {@code this}.\n */\n SecurityConfigurator sessionCacheSize(long sessionCacheSize);\n\n /**\n * Set the timeout for the cached SSL session objects, in seconds.\n *\n * @param sessionTimeout the session timeout.\n * @return {@code this}.\n */\n SecurityConfigurator sessionTimeout(long sessionTimeout);\n\n /**\n * Sets the {@link SslProvider} to use.\n *\n * @param provider the provider.\n * @return {@code this}.\n */\n SecurityConfigurator provider(SslProvider provider);\n}",
"public abstract SCEConfiguration getSCEConfiguration();",
"public T caseRemoteSSLEndpointConfiguration(RemoteSSLEndpointConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public T caseRemoteHTTPEndpointConfiguration(RemoteHTTPEndpointConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public T caseRemoteEndpointConfiguration(RemoteEndpointConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public Boolean getSslEnabled() {\n return sslEnabled;\n }",
"public static native long ChannelHandshakeConfig_default();",
"public YSConfiguration getConfiguration(){\n return mConfiguration;\n }",
"public <C extends SSLConfiguration> T caseTSTPEndpointConfiguration(TSTPEndpointConfiguration<C> object) {\r\n\t\treturn null;\r\n\t}",
"String getSslHandler();",
"public Integer sslPort() {\n return this.innerProperties() == null ? null : this.innerProperties().sslPort();\n }",
"public static Configuration getConfIfPossible(Object object) {\n if (object instanceof Configurable) {\n return ((Configurable) object).getConf();\n }\n return null;\n }",
"public TlsConfig getTlsConfig() {\n return this.tlsConfig;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates bash command. The command returns 0 if the command exists and is a file | private static String mkCheckCommandExistsCommand(final String commandName)
{
return "type -p " + commandName;
} | [
"Command createCommand();",
"private Command createCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\tswitch(tokens[0].toLowerCase()) {\n\t\tcase DRAW:\n\t\t\treturn createDrawCommand(command);\n\t\t\n\t\tcase SKIP:\n\t\t\treturn createSkipCommmand(command);\n\t\t\t\n\t\tcase SCALE:\n\t\t\treturn createScaleCommand(command);\n\t\t\t\n\t\tcase ROTATE:\n\t\t\treturn createRotateCommand(command);\n\t\t\t\n\t\tcase PUSH:\n\t\t\treturn createPushCommand();\n\t\t\t\n\t\tcase POP:\n\t\t\treturn createPopCommand();\n\t\t\t\n\t\tcase COLOR:\n\t\t\treturn createColorCommand(command);\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\"Invalid command argument\");\n\t\t}\n\t}",
"public static String createCommand(String command, String usage) {\n\t\treturn formatCommand(command) + usage;\n\t}",
"public static String createCommand(String command, String usage, boolean hasPermission) {\n\t\treturn formatCommand(command) + (hasPermission ? \"\" : ChatColor.RED) + usage;\n\t}",
"String executeLinuxCmd(String cmd) throws IOException, InterruptedException;",
"@Test\n\tpublic void testCreateCommand_1()\n\t\tthrows Exception {\n\t\tint cmdId = 0;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"public Command makeCommand(String commandType);",
"private static void runShellCommand(String cmd) throws Exception {\n ProcessBuilder pb = new ProcessBuilder(\"bash\", \"-c\", cmd); // create a process for the shell\n pb.redirectErrorStream(true); // use this to capture messages sent to stderr\n Process shell = pb.start();\n InputStream shellIn = shell.getInputStream(); // this captures the output from the command\n try {\n int shellExitStatus = shell.waitFor(); // wait for the shell to finish and get the return code\n if (shellExitStatus != 0) {\n // error? report on it and fail\n throw new Exception(\"Shell exited with non-zero status: \" + shellExitStatus + \"; \" + inputStreamToString(shellIn));\n }\n } finally {\n shellIn.close();\n }\n }",
"@Test\n\tpublic void testCreateCommand_11()\n\t\tthrows Exception {\n\t\tint cmdId = 10;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"int executeLinuxCmdWithResultInt(String cmd) throws IOException, InterruptedException;",
"java.lang.String createFile(avro.commands.CreateFileCommand command) throws org.apache.avro.AvroRemoteException, avro.commands.Curse;",
"public static void buildFile(String commandFFMPEGToAdd){\n\t\tString pathToFileToWrite;\n\t\tString currentCommand;\n\t\tint numberOfLines=0;\n\t\t//String pathFileDirectory = filePath.substring(0,filePath.length()-fileName.length());\n\n\t\tpathToFileToWrite = Main.pathTempDirectory+fileCommand;\n\t\t\tSystem.out.println(\"Constructing \"+Main.fileCommand);\n\t\t\n\t\ttry {\n\t\t\tBufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(pathToFileToWrite));\n\n\t\t\t//This line add the support for special characters like greek ones.\n\t\t\tcurrentCommand = \"CHCP 65001\";\n\t\t\twriter.write(currentCommand.getBytes());\n\t\t\twriter.write(System.getProperty(\"line.separator\").getBytes());\n\t\t\tnumberOfLines++;\n\n\t\t\t//we add the path directly of the ffmpeg file in the variables of windows so we can use the tool\n\t\t\tcurrentCommand = \"SET PATH=\"+ Main.pathTempDirectory +\";%PATH%\";\n\t\t\twriter.write(currentCommand.getBytes());\n\t\t\twriter.write(System.getProperty(\"line.separator\").getBytes());\n\t\t\tnumberOfLines++;\n\n\t\t\t//the getBytes function is used to ensure the right encoding of all characters.\n\t\t\twriter.write(commandFFMPEGToAdd.getBytes(\"UTF-8\"));\n\t\t\tnumberOfLines++;\n\n\t\t\twriter.close();\n\t\t\tSystem.out.println(\"File constructed without error (\"+numberOfLines+\" lines)\");\n\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error while creating .bat file (IO Exception) :\");\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"String buildExecutablePath( String rubyRuntimeName, String rubyExecutablePath, String command );",
"public static String createCommand(String command, String usage, Player player, String permission) {\n\t\treturn createCommand(command, usage, player.hasPermission(permission));\n\t}",
"ACommand CheckCommand(String NameCommand);",
"public static ICommand createCommand(String cmd, String... args) {\n return new Command(cmd, args);\n }",
"IfCommand createIfCommand();",
"boolean addCommand(Command command);",
"@Test\n\tpublic void testCreateCommand_10()\n\t\tthrows Exception {\n\t\tint cmdId = 9;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the tempblock (barrier or bedrock) with the opacity closest to state (tries to minimize the load on the lightning engine) | public static IBlockState getTempState(final IBlockState state)
{
return (state.getBlock().getLightOpacity() < 8 ? Blocks.barrier : Blocks.bedrock).getDefaultState();
} | [
"public static IBlockState getTempState(final IBlockState state1, final IBlockState state2)\n\t{\n\t\treturn (state1.getBlock().getLightOpacity() + state2.getBlock().getLightOpacity() < 15 ? Blocks.barrier : Blocks.bedrock).getDefaultState();\n\t}",
"@Override\n public int getLightOpacity(IBlockState state)\n {\n return this.worldLightOpacity(state).opacity;\n }",
"private Vehicle findBicycleLeastUsed(){\n return getVehicleByMaxWeight(0.0,100.00);\n }",
"private Block getPlayerBlock(Player player) {\r\n \r\n HashSet<Byte> transparent = new HashSet<Byte>();\r\n \r\n // Snow covered chests should be accessable without removing the snow.\r\n transparent.add((byte)Material.SNOW.getId());\r\n \r\n // Air is transparent.\r\n transparent.add((byte)Material.AIR.getId());\r\n \r\n // Glass is also transparent.\r\n transparent.add((byte)Material.GLASS.getId());\r\n \r\n // Return the block the player is looking at. Glass, Air, and snow that covers blocks will be ignored.\r\n return player.getTargetBlock(transparent, 10);\r\n \r\n }",
"private Vehicle findBigTruckLeastUsed(){\n return getVehicleByMaxWeight(10000.00,Double.MAX_VALUE);\n }",
"private IBlockState selectBestAdjacentBlock(IBlockAccess world, BlockPos blockPos)\n {\n final IBlockState UNCAMOUFLAGED_BLOCK = Blocks.AIR.getDefaultState();\n TreeMap<EnumFacing, IBlockState> adjacentSolidBlocks = new TreeMap<EnumFacing, IBlockState>();\n\n HashMap<IBlockState, Integer> adjacentBlockCount = new HashMap<IBlockState, Integer>();\n for (EnumFacing facing : EnumFacing.values()) {\n BlockPos adjacentPosition = blockPos.add(facing.getFrontOffsetX(),\n facing.getFrontOffsetY(),\n facing.getFrontOffsetZ());\n IBlockState adjacentIBS = world.getBlockState(adjacentPosition);\n Block adjacentBlock = adjacentIBS.getBlock();\n if (adjacentBlock != Blocks.AIR\n && adjacentBlock.getBlockLayer() == BlockRenderLayer.SOLID\n && adjacentBlock.isOpaqueCube(adjacentIBS)) {\n adjacentSolidBlocks.put(facing, adjacentIBS);\n if (adjacentBlockCount.containsKey(adjacentIBS)) {\n adjacentBlockCount.put(adjacentIBS, 1 + adjacentBlockCount.get(adjacentIBS));\n } else if (adjacentIBS.getBlock() != this){\n adjacentBlockCount.put(adjacentIBS, 1);\n }\n }\n }\n\n if (adjacentBlockCount.isEmpty()) {\n return UNCAMOUFLAGED_BLOCK;\n }\n\n if (adjacentSolidBlocks.size() == 1) {\n IBlockState singleAdjacentBlock = adjacentSolidBlocks.firstEntry().getValue();\n if (singleAdjacentBlock.getBlock() == this) {\n return UNCAMOUFLAGED_BLOCK;\n } else {\n return singleAdjacentBlock;\n }\n }\n\n int maxCount = 0;\n ArrayList<IBlockState> maxCountIBlockStates = new ArrayList<IBlockState>();\n for (Map.Entry<IBlockState, Integer> entry : adjacentBlockCount.entrySet()) {\n if (entry.getValue() > maxCount) {\n maxCountIBlockStates.clear();\n maxCountIBlockStates.add(entry.getKey());\n maxCount = entry.getValue();\n } else if (entry.getValue() == maxCount) {\n maxCountIBlockStates.add(entry.getKey());\n }\n }\n\n assert maxCountIBlockStates.isEmpty() == false;\n if (maxCountIBlockStates.size() == 1) {\n return maxCountIBlockStates.get(0);\n }\n\n // for each block which has a match on the opposite side, add 10 to its count.\n // exact matches are counted twice --> +20, match with BlockCamouflage only counted once -> +10\n for (Map.Entry<EnumFacing, IBlockState> entry : adjacentSolidBlocks.entrySet()) {\n IBlockState iBlockState = entry.getValue();\n if (maxCountIBlockStates.contains(iBlockState)) {\n EnumFacing oppositeSide = entry.getKey().getOpposite();\n IBlockState oppositeBlock = adjacentSolidBlocks.get(oppositeSide);\n if (oppositeBlock != null && (oppositeBlock == iBlockState || oppositeBlock.getBlock() == this) ) {\n adjacentBlockCount.put(iBlockState, 10 + adjacentBlockCount.get(iBlockState));\n }\n }\n }\n\n maxCount = 0;\n maxCountIBlockStates.clear();\n for (Map.Entry<IBlockState, Integer> entry : adjacentBlockCount.entrySet()) {\n if (entry.getValue() > maxCount) {\n maxCountIBlockStates.clear();\n maxCountIBlockStates.add(entry.getKey());\n maxCount = entry.getValue();\n } else if (entry.getValue() == maxCount) {\n maxCountIBlockStates.add(entry.getKey());\n }\n }\n assert maxCountIBlockStates.isEmpty() == false;\n if (maxCountIBlockStates.size() == 1) {\n return maxCountIBlockStates.get(0);\n }\n\n EnumFacing [] orderOfPreference = new EnumFacing[] {EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.EAST,\n EnumFacing.WEST, EnumFacing.DOWN, EnumFacing.UP};\n\n for (EnumFacing testFace : orderOfPreference) {\n if (adjacentSolidBlocks.containsKey(testFace) &&\n maxCountIBlockStates.contains(adjacentSolidBlocks.get(testFace))) {\n return adjacentSolidBlocks.get(testFace);\n }\n }\n assert false : \"this shouldn't be possible\";\n return null;\n }",
"protected static float getBestFuelLevel()\n {\n float retval = 0;\n \n if( lastStableFuelLevel > 0 )\n {\n retval = lastStableFuelLevel;\n }\n else if( fuelEventBeginFuelLevel > 0 )\n {\n retval = fuelEventBeginFuelLevel;\n }\n else if( lastValidFuelLevel > 0 )\n {\n retval = lastValidFuelLevel;\n }\n return retval;\n }",
"public static SbColor\ngetEmissive(SoState state) \n{ \n SoLazyElement elem = getInstance(state);\n if(state.isCacheOpen()) elem.registerGetDependence(state, masks.EMISSIVE_MASK.getValue());\n //return curElt.ivState.emissiveColor;\n\treturn elem.coinstate.emissive;\n}",
"public TemplateState getBestTemplate( ArrayList<TemplateState> states )\r\n {\r\n TemplateState bestState = null;\r\n double quality = Double.MIN_VALUE;\r\n for( TemplateState state : states ) {\r\n if( state.getQuality() > quality ) {\r\n quality = state.getQuality();\r\n bestState = state;\r\n }\r\n }\r\n return bestState;\r\n }",
"public IObject getNearestGas() {\r\n\t\tdouble distance, mindistance = 10000000;\r\n\t\tIObject closestgas = null;\r\n\t\tfor (int i = 0; i < World.getFuelDepots().length; ++i) {\r\n\t\t\tdistance = getDistanceTo(World.getFuelDepots()[i]);\r\n\t\t\tif (distance < mindistance) {\r\n\t\t\t\tmindistance = distance;\r\n\t\t\t\tclosestgas = World.getFuelDepots()[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closestgas;\r\n\t}",
"public float getB() {\n\t\tlightProvider.fetchSample(lightData, 0); // acquire data\n\t\treturn lightData[2];\n\t}",
"private Floor getLowestButPan(LiftButton[] bP){\r\n\t\t\r\n\t\tint x=0;\r\n\t\twhile(x<numberOfFloors){\r\n\t\t\tif(bP[x]==LiftButton.ACTIVE)return new Floor(x);\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn new Floor(numberOfFloors-1);\r\n\t}",
"public Block findGround(Entity e) {\n\t\tRectangle personRect = e.getBox();\n\t\tfor(List<Block> row:terrain) {\n\t\t\tfor (Block b:row) {\n\t\t\t\tif (b != null) {\n\t\t\t\t\tDirection d = b.getDirectionComingFrom(personRect);\n\t\t\t\t\tif (d == Direction.NORTH) {\n\t\t\t\t\t\treturn b;\n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String lowestEnergyState() {\n\treturn state(bestEverPoints, temperature, bestEverStateEnergy);\n }",
"public float onAbsorbHeat(float rfAbsorbed) {\n\t\tif(getFluidAmount(COLD) <= 0 || rfAbsorbed <= 0) { return rfAbsorbed; }\n\n\t\tFluid coolantType = getCoolantType();\n\t\tint coolantAmt = getFluidAmount(COLD);\n\n\t\tfloat heatOfVaporization = getHeatOfVaporization(coolantType);\n\t\t\n\t\tint mbVaporized = Math.min(coolantAmt, (int)(rfAbsorbed / heatOfVaporization));\n\n\t\t// Cap by the available space in the vapor chamber\n\t\tmbVaporized = Math.min(mbVaporized, getRemainingSpaceForFluid(HOT));\n\t\t\n\t\t// We don't do partial vaporization. Just return all the heat.\n\t\tif(mbVaporized < 1) { return rfAbsorbed; }\n\n\t\t// Make sure we either have an empty vapor chamber or the vapor types match\n\t\tFluid newVaporType = getVaporizedCoolantFluid(coolantType);\n\t\tif(newVaporType == null) {\n\t\t\tBRLog.warning(\"Coolant in tank (%s) has no registered vapor type!\", coolantType.getName());\n\t\t\treturn rfAbsorbed;\n\t\t}\n\t\t\n\t\tFluid existingVaporType = getVaporType();\n\t\tif(existingVaporType != null && !newVaporType.getName().equals(existingVaporType.getName())) {\n\t\t\t// Can't vaporize anything with incompatible vapor in the vapor tank\n\t\t\treturn rfAbsorbed;\n\t\t}\n\t\t\n\t\t// Vaporize! -- POINT OF NO RETURN\n\t\tfluidVaporizedLastTick = mbVaporized;\n\t\tthis.drainCoolant(mbVaporized);\n\t\t\n\t\tif(existingVaporType != null) {\n\t\t\taddFluidToStack(HOT, mbVaporized);\n\t\t}\n\t\telse {\n\t\t\tfill(HOT, new FluidStack(newVaporType, mbVaporized), true);\n\t\t}\n\t\t\n\t\t// Calculate how much we actually absorbed via vaporization\n\t\tfloat energyConsumed = (float)mbVaporized * heatOfVaporization;\n\t\t\n\t\t// And return energy remaining after absorption\n\t\treturn Math.max(0f, rfAbsorbed - energyConsumed);\n\t}",
"protected float getTopFadingEdgeStrength() { throw new RuntimeException(\"Stub!\"); }",
"public float getBlockPathWeight(int x, int y, int z)\n {\n \tfloat weight;\n \tif(state == 1)\n \t{\n \t\treturn 0.5F - world.getLightBrightness(new BlockPos(x, y, z));\n \t}\n \t\n \treturn world.getBlockState(new BlockPos(x, y - 1, z)).getBlock() == Blocks.GLASS \n \t\t\t? 10.0F : world.getLightBrightness(new BlockPos(x, y, z)) - 0.5F;\n }",
"POGOProtos.Rpc.GameplayWeatherProto.WeatherCondition getWeatherBoostedCondition();",
"public float getOpacityDeep()\n{\n float op = getOpacity();\n for(RMShape s=_parent; s!=null; s=s._parent) op *= s.getOpacity();\n return op;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a copy of the value of the Volume property | public long getPropertyVolume(); | [
"@Override\n public double getVolume() {\n return l.getVolume();\n }",
"java.lang.String getVolume();",
"public int getVolume(){\n return volume;\n }",
"long getVolume();",
"public int getCurrentVolume() {\n return mCurrentVolume;\n }",
"public long getCurrentVolume() {\n return currentVolume;\n }",
"public BigDecimal getVolume() {\r\n return bank.getVolume();\r\n }",
"public float getVolume(){return (float) getDouble(\"volume\");}",
"public java.lang.String getVolume() {\n java.lang.Object ref = volume_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n volume_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public MediaStorageVolume getVolume();",
"public long getPropertyVolumeUnity();",
"public int getVolumeInt() {\r\n return this.volume;\r\n }",
"int getVolume();",
"public double getTotalVolume() {\n return totalVolume;\n }",
"public double getVolume() {\r\n\t\treturn percent;\r\n\t}",
"public long getPropertyVolumeUnity()\n {\n return iPropertyVolumeUnity.getValue();\n }",
"public float getVolume() {\n return mDrones.get(0).getVolume();\n }",
"float getVolume();",
"public com.mesosphere.dcos.cassandra.common.CassandraProtos.Volume getVolume() {\n return volume_;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field permission is set (has been assigned a value) and false otherwise | public boolean isSetPermission() {
return this.permission != null;
} | [
"public boolean hasPermission() {\n return fieldSetFlags()[1];\n }",
"public boolean isSetPermission() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PERMISSION_ISSET_ID);\n }",
"boolean getHasPermission();",
"public boolean isSetPermissionGroup() {\n return this.permissionGroup != null;\n }",
"public boolean isSetPermissionDesc() {\n return this.permissionDesc != null;\n }",
"public boolean isSetTblPerm() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TBLPERM_ISSET_ID);\n }",
"public boolean isSetRolePermission() {\n return this.rolePermission != null;\n }",
"public boolean isSetPermissionDescFull() {\n return this.permissionDescFull != null;\n }",
"public boolean isSetField() {\r\n return this.field != null;\r\n }",
"boolean hasSetAcl();",
"public boolean isSetAccession()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(ACCESSION$2) != 0;\r\n }\r\n }",
"boolean isFieldManagementAvailable();",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean isPermissionGranted() {\n return permissionGranted;\n }",
"public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case DATA_ID:\n return isSetDataId();\n }\n throw new IllegalStateException();\n }",
"public boolean isSetValue() {\n return this.Value != null;\n }",
"public boolean isSetFieldValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FIELDVALUE$2) != 0;\n }\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean is_set_fields() {\n return this.fields != null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets overload matching the specified list of parameter expressions from the registered overload in this descriptor. | @Override
public SubroutineDescriptor getOverload(List<ExpressionNode> actualParameters) throws LexicalException {
for (SubroutineDescriptor descriptor : this.overloads) {
if (this.compareActualWithFormatParameters(descriptor.getFormalParameters(), actualParameters)) {
return descriptor;
}
}
throw new LexicalException("Not existing overload for this subroutine");
} | [
"private void findConstantParameter(List<Method> methods, InstructionContext invokeCtx)\n\t{\n\t\tcheckMethodsAreConsistent(methods);\n\n\t\tMethod method = methods.get(0); // all methods must have the same signature etc\n\t\tint offset = method.isStatic() ? 0 : 1;\n\n\t\tList<StackContext> pops = invokeCtx.getPops();\n\n\t\t// object is popped first, then param 1, 2, 3, etc. double and long take two slots.\n\t\tfor (int lvtOffset = offset, parameterIndex = 0;\n\t\t\tparameterIndex < method.getDescriptor().size();\n\t\t\tlvtOffset += method.getDescriptor().getTypeOfArg(parameterIndex++).getSize())\n\t\t{\n\t\t\t// get(0) == first thing popped which is the last parameter,\n\t\t\t// get(descriptor.size() - 1) == first parameter\n\t\t\tStackContext ctx = pops.get(method.getDescriptor().size() - 1 - parameterIndex);\n\n\t\t\tConstantMethodParameter cmp = getCMPFor(methods, parameterIndex, lvtOffset);\n\n\t\t\tif (cmp.invalid)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (ctx.getPushed().getInstruction() instanceof PushConstantInstruction)\n\t\t\t{\n\t\t\t\tPushConstantInstruction pc = (PushConstantInstruction) ctx.getPushed().getInstruction();\n\n\t\t\t\tif (!(pc.getConstant() instanceof Number))\n\t\t\t\t{\n\t\t\t\t\tcmp.invalid = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tNumber number = (Number) pc.getConstant();\n\n\t\t\t\tif (!cmp.values.contains(number))\n\t\t\t\t{\n\t\t\t\t\tcmp.values.add((Number) pc.getConstant());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcmp.invalid = true;\n\t\t\t}\n\t\t}\n\t}",
"public abstract Set<MethodElement> getImplementationsOf(DartExpression expr);",
"Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }",
"private Method getBestMatchingMethod(Object o, String methodName, Class[] parameterClasses) throws NoSuchMethodException {\r\n Method method = null;\r\n boolean hasMatch;\r\n\r\n for (Class c : parameterClasses) {\r\n hasMatch = true;\r\n try {\r\n method = o.getClass().getMethod(methodName, c);\r\n } catch (NoSuchMethodException e) {\r\n hasMatch = false;\r\n }\r\n if (hasMatch)\r\n break;\r\n }\r\n if (method == null)\r\n throw new NoSuchMethodException(\"No Such Method: \" + methodName);\r\n return method;\r\n }",
"@Test\n public void orMethodMatcherConciseWithMultipleSignatures() throws Exception {\n String yaml = \"- class_matcher: 'java/lang/Foo'\\n method_matcher:\\n - !exact_method_matcher [ 'getFoo', '(I)V', '(J)V' ]\\n - !exact_method_matcher [ 'getBar', '(I)I', '(Ljava/lang/String;)Ljava/lang/String;' ]\";\n PointCutConfig config = new PointCutConfig(new ByteArrayInputStream(yaml.getBytes(StandardCharsets.UTF_8)));\n Assert.assertEquals(1, config.getPointCuts().size());\n Assert.assertNotNull(config.getPointCuts().get(0));\n }",
"private static Method getMethod(Class<?> clazz, String methodName, Class[] objects) throws NoSuchMethodException {\n\n List<Method> methods = Arrays.asList(clazz.getMethods());\n\n // filter to methods with the correct name and which accept the correct number of parameters\n methods = methods.stream()\n // filter to methods with the same name\n .filter(method -> method.getName().equals(methodName) && method.getParameters().length == objects.length)\n .collect(Collectors.toList());\n\n // no matches? throw an exception\n if(methods.size() == 0) throw new NoSuchMethodException(\"Could not find a method named '\" + methodName + \"' that accepts the specified arguments, \" + objects);\n\n Method matchingMethod = null;\n\n // find a method that accepts the specified arguments\n for(Method method : methods){\n // if we found a match then we're done!\n if(compareParameters(method.getParameters(), objects)){\n matchingMethod = method;\n break;\n }\n }\n\n if(matchingMethod == null) throw new NoSuchMethodException(\"Could not find a method named '\" + methodName + \"' that accepts the specified arguments, \" + objects);\n\n return matchingMethod;\n\n }",
"public static Entry[] resolveOverload(final Entry[] candidates,\n final FuncInfo callSig, final Object[] args) {\n if (callSig == null) {\n return candidates;\n }\n\n final Entry[] applicable = applicableFuncs(candidates, callSig, args);\n if (applicable.length <= 1) {\n return applicable; // if nothing or just one applicable, return now\n }\n\n return bestFuncMatch(applicable, callSig, args);\n }",
"String getAllowedSignatures(SqlOperator op, String opName);",
"ExpressionList getExpressionList();",
"public ExprNode[] getParameterExpressions() {\n return parameterExpressions;\n }",
"List<ParameterDescriptor> getParameterDescriptors();",
"OpDefParameterList createOpDefParameterList();",
"@java.lang.Deprecated\n public java.util.List<io.kubernetes.client.openapi.models.V1NodeSelectorRequirement> getMatchExpressions();",
"public List<jooq.sqlite.gen.tables.pojos.Hyperparameter> fetchByParamvalue(String... values) {\n return fetch(Hyperparameter.HYPERPARAMETER.PARAMVALUE, values);\n }",
"List<ParameterValue<?>> getConstantParameterValues();",
"public Method findMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tChecker.notNull(\"parameter:methodName\", methodName);\r\n\t\tChecker.notNull(\"parameter:parameterTypes\", parameterTypes);\r\n\r\n\t\tfinal MostDerivedMethodFinder finder = new MostDerivedMethodFinder();\r\n\t\tfinder.setMethodName(methodName);\r\n\t\tfinder.setParameterTypes(parameterTypes);\r\n\t\tfinder.start(this);\r\n\t\treturn finder.getFound();\r\n\t}",
"PointcutParameter[] getParameterBindings();",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.RateTableMatchOp getParameter();",
"public static <T extends ReflectMethod> T findMatchingExecutable(Executable[] executables,\n Object... values) throws NoSuchMethodException, IllegalStateException\n {\n if (values.length == 0)\n {\n for (Executable executable : executables)\n {\n if (executable.getParameterCount() == 0)\n {\n return wrap(executable, true);\n }\n }\n throw new NoSuchMethodException(\"Can't find no-args constructor.\");\n }\n Class<?>[] paramTypes = new Class<?>[values.length];\n for (int i = 0; i < values.length; i++)\n {\n Object value = values[i];\n paramTypes[i] = (value == null) ? null : value.getClass();\n }\n // try to find exact matching constructor, and add any just compatible to collection.\n int exactMatches = 0;\n Executable exact = null;\n Executable bestMatch = null;\n for (Executable executable : executables)\n {\n if (executable.getParameterCount() != values.length)\n {\n continue;\n }\n CompatibleExecutableResults compatibleConstructor = isCompatibleExecutable(executable, paramTypes);\n if (compatibleConstructor == CompatibleExecutableResults.EXACT)\n {\n if (exactMatches >= 1)\n {\n throw new IllegalStateException(\"Ambiguous constructors found \" + Arrays.toString(paramTypes));\n }\n exact = executable;\n exactMatches += 1;\n }\n if (compatibleConstructor != CompatibleExecutableResults.INVALID)\n {\n bestMatch = getMoreSpecialized(bestMatch, executable);\n }\n }\n if (bestMatch == null)\n {\n throw new NoSuchMethodException(\"Can't find matching constructor for: \" + Arrays.toString(paramTypes));\n }\n if (exact != null)\n {\n if (! bestMatch.equals(exact))\n {\n throw new IllegalStateException(\"Ambiguous constructors found \" + Arrays.toString(paramTypes));\n }\n return wrap(exact, true);\n }\n return wrap(bestMatch, true);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a redundancy copy of a bucket on a given node. This call may be asynchronous, it will notify the completion when the the operation is done. Note that the completion is not required to be threadsafe, so implementors should ensure the completion is invoked by the calling thread of createRedundantBucket, usually by invoking the completions in waitForOperations. | void createRedundantBucket(InternalDistributedMember targetMember,
int bucketId, Map<String, Long> colocatedRegionBytes, Completion completion); | [
"public interface BucketOperator {\n\n /**\n * Create a redundancy copy of a bucket on a given node. This call may be\n * asynchronous, it will notify the completion when the the operation is done.\n * \n * Note that the completion is not required to be threadsafe, so implementors\n * should ensure the completion is invoked by the calling thread of\n * createRedundantBucket, usually by invoking the completions in waitForOperations.\n * \n * @param targetMember\n * the node to create the bucket on\n * @param bucketId\n * the id of the bucket to create\n * @param colocatedRegionBytes\n * the size of the bucket in bytes\n * @param completion\n * a callback which will receive a notification on the success or\n * failure of the operation.\n */\n void createRedundantBucket(InternalDistributedMember targetMember,\n int bucketId, Map<String, Long> colocatedRegionBytes, Completion completion);\n\n /**\n * Remove a bucket from the target member.\n */\n boolean removeBucket(InternalDistributedMember memberId, int id,\n Map<String, Long> colocatedRegionSizes);\n\n /**\n * Move a bucket from one member to another\n * @param sourceMember The member we want to move the bucket off of. \n * @param targetMember The member we want to move the bucket too.\n * @param bucketId the id of the bucket we want to move\n * @return true if the bucket was moved successfully\n */\n boolean moveBucket(InternalDistributedMember sourceMember,\n InternalDistributedMember targetMember, int bucketId,\n Map<String, Long> colocatedRegionBytes);\n\n /**\n * Move a primary from one node to another. This method will\n * not be called unless both nodes are hosting the bucket, and the source\n * node is the primary for the bucket.\n * @param source The old primary for the bucket\n * @param target The new primary for the bucket\n * @param bucketId The id of the bucket to move;\n * @return true if the primary was successfully moved.\n */\n boolean movePrimary(InternalDistributedMember source,\n InternalDistributedMember target, int bucketId);\n \n /**\n * Wait for any pending asynchronous operations that this thread submitted\n * earlier to complete. Currently only createRedundantBucket may be\n * asynchronous.\n */\n public void waitForOperations();\n \n /**\n * Callbacks for asnychonous operations. These methods will be invoked when an\n * ansynchronous operation finishes.\n * \n * The completions are NOT THREADSAFE.\n * \n * They will be completed when createRedundantBucket or waitForOperations is\n * called.\n */\n public interface Completion {\n public void onSuccess();\n public void onFailure();\n }\n}",
"BucketEntity createBucket(BucketEntity bucket);",
"protected void createBucket() {\n }",
"Map<String, Object> createBucket(String key);",
"@PostMapping(\"/buckets\")\n @Timed\n public ResponseEntity<BucketDTO> createBucket(@RequestBody BucketDTO bucketDTO) throws URISyntaxException {\n log.debug(\"REST request to save Bucket : {}\", bucketDTO);\n if (bucketDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new bucket cannot already have an ID\")).body(null);\n }\n BucketDTO result = bucketService.save(bucketDTO);\n return ResponseEntity.created(new URI(\"/api/buckets/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void updateBucketAssignment(long distributionId, int bucketNumber, String nodeId);",
"int getNumBucketsWithoutRedundancy();",
"ResultIterator<BucketShards> getShardNodesBucketed(long tableId, boolean merged, List<String> bucketToNode, TupleDomain<RaptorColumnHandle> effectivePredicate, boolean tableSupportsDeltaDelete);",
"void createBuckets(long distributionId, int bucketCount);",
"private void reclaimWronglyAllocatedBuckets(Context ctx, OperationResult result)\n\t\t\tthrows SchemaException, PreconditionViolationException, ObjectNotFoundException, ObjectAlreadyExistsException {\n\t\tif (ctx.coordinatorTask.getWorkState() == null) {\n\t\t\treturn;\n\t\t}\n\t\tTaskWorkStateType newState = ctx.coordinatorTask.getWorkState().clone();\n\t\tint reclaiming = 0;\n\t\tSet<String> deadWorkers = new HashSet<>();\n\t\tSet<String> liveWorkers = new HashSet<>();\n\t\tfor (WorkBucketType bucket : newState.getBucket()) {\n\t\t\tif (bucket.getState() == WorkBucketStateType.DELEGATED) {\n\t\t\t\tString workerOid = bucket.getWorkerRef() != null ? bucket.getWorkerRef().getOid() : null;\n\t\t\t\tif (isDead(workerOid, deadWorkers, liveWorkers, result)) {\n\t\t\t\t\tLOGGER.info(\"Reclaiming wrongly allocated work bucket {} from worker task {}\", bucket, workerOid);\n\t\t\t\t\tbucket.setState(WorkBucketStateType.READY);\n\t\t\t\t\tbucket.setWorkerRef(null);\n\t\t\t\t\t// TODO modify also the worker if it exists (maybe)\n\t\t\t\t\treclaiming++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOGGER.trace(\"Reclaiming wrongly allocated buckets found {} buckets to reclaim in {}\", reclaiming, ctx.coordinatorTask);\n\t\tif (reclaiming > 0) {\n\t\t\tCONTENTION_LOGGER.debug(\"Reclaiming wrongly allocated buckets found {} buckets to reclaim in {}\", reclaiming, ctx.coordinatorTask);\n\t\t\t// As for the precondition we use the whole task state (reflected by version). The reason is that if the work\n\t\t\t// state originally contains (wrongly) DELEGATED bucket plus e.g. last COMPLETE one, and this bucket is reclaimed\n\t\t\t// by two subtasks at once, each of them see the same state afterwards: DELEGATED + COMPLETE. The solution would\n\t\t\t// be either to enhance the delegated bucket with some information (like to whom it is delegated), or this one.\n\t\t\t// In the future we might go the former way; as it would make reclaiming much efficient - not requiring to read\n\t\t\t// the whole task tree.\n\t\t\trepositoryService.modifyObject(TaskType.class, ctx.coordinatorTask.getOid(),\n\t\t\t\t\tbucketsReplaceDeltas(newState.getBucket()),\n\t\t\t\t\tnew VersionPrecondition<>(ctx.coordinatorTask.getVersion()), null, result);\n\t\t\tctx.reloadCoordinatorTask(result);\n\t\t\tctx.registerReclaim(reclaiming);\n\t\t}\n\t}",
"public void createBucket() {\n\n\t\tSystem.out.println(\"Creating bucket \" + bucketName + \"\\n\");\n\n\t\ts3.createBucket(bucketName);\n\n\n\t}",
"private OMBucketCreateResponse createBucket(String volumeName,\n String bucketName, long transactionID) {\n\n BucketInfo.Builder bucketInfo =\n newBucketInfoBuilder(bucketName, volumeName)\n .setStorageType(OzoneManagerProtocolProtos.StorageTypeProto.DISK);\n OzoneManagerProtocolProtos.OMRequest omRequest =\n OMRequestTestUtils.newCreateBucketRequest(bucketInfo).build();\n\n OMBucketCreateRequest omBucketCreateRequest =\n new OMBucketCreateRequest(omRequest);\n\n return (OMBucketCreateResponse) omBucketCreateRequest\n .validateAndUpdateCache(ozoneManager, transactionID,\n ozoneManagerDoubleBufferHelper);\n\n }",
"public void copyBucket(LocalBucket bucket) {\n\t\tbucketLocker.callBucketHandlerUnderSharedLock(bucket,\n\t\t\t\tnew CopyBucketUnderLock());\n\t}",
"java.lang.String getBucket();",
"@POST\n @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Path(\"/{id}/protection/full-copies\")\n @CheckPermission(roles = { Role.SYSTEM_ADMIN }, acls = { ACL.ANY })\n public TaskList createConsistencyGroupFullCopy(@PathParam(\"id\") URI cgURI,\n VolumeFullCopyCreateParam param) {\n // Verify the consistency group in the requests and get the\n // volumes in the consistency group.\n List<Volume> cgVolumes = verifyCGForFullCopyRequest(cgURI);\n\n // Get the storage system for the consistency group.\n StorageSystem storage = _permissionsHelper.getObjectById(cgVolumes.get(0).getStorageController(), StorageSystem.class);\n\n // Group clone for IBM XIV storage system type is not supported\n if (Type.ibmxiv.name().equalsIgnoreCase(storage.getSystemType())) {\n throw APIException.methodNotAllowed.notSupportedWithReason(\n \"Consistency Group Full Copy is not supported on IBM XIV storage systems\");\n }\n\n // block CG operation if any of its volumes is in COPY type VolumeGroup (Application)\n validateVolumeNotPartOfApplication(cgVolumes, FULL_COPY);\n\n // Grab the first volume and call the block full copy\n // manager to create the full copies for the volumes\n // in the CG. Note that it will take into account the\n // fact that the volume is in a CG.\n return getFullCopyManager().createFullCopy(cgVolumes.get(0).getId(), param);\n }",
"public void reallocateBuckets() {\n lockAllAndThen(() -> {\n final ItemNode<K,V>[] newBuckets = makeBuckets(2 * buckets.length);\n for (int hash=0; hash<buckets.length; hash++) {\n ItemNode<K,V> node = buckets[hash];\n while (node != null) {\n final int newHash = getHash(node.k) % newBuckets.length;\n ItemNode<K,V> next = node.next;\n node.next = newBuckets[newHash];\n newBuckets[newHash] = node;\n node = next;\n }\n }\n buckets = newBuckets;\n });\n }",
"public static void createBucket(String bucketName, AmazonS3 client) {\r\n\t\tfor (Bucket bucket : client.listBuckets()) {\r\n\t\t\tif(bucket.getName().compareTo(bucketName) == 0) {\r\n\t\t\t\tlogger.info(\"The bucket: \"+ bucketName + \" exists\");\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\t\t}\r\n\t\tclient.createBucket(bucketName);\r\n\t}",
"public abstract Node copy(Node srcNode, String destAbsNodePath) throws PathNotFoundException, ItemExistsException,\n LockException, VersionException, RepositoryException;",
"ConstraintRedundancy createConstraintRedundancy();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: load previous table this.scopeAlias.clear(); | protected void clearTableAlias(int pushCounter) {
this.tablesInScope = this.tablesInScope.clearAndGetPrevious();
se.resetConstraints(pushCounter);
} | [
"public void resetScope() {\n\t // TODO Auto-generated method stub\n\t _scope = _oldScope;\n }",
"private void eraseParentAlias(Scope scope) {\n if (isStartWithParentAlias(scope)) {\n expr.setName(name());\n }\n }",
"public void clearAliases() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"public void endScope() {\n while (top != null) {\n Binder<T> e = table.get(top);\n if (e.tail != null)\n table.put(top, e.tail);\n else\n table.remove(top);\n top = e.prevtop;\n }\n top = marks.prevtop;\n marks = marks.tail;\n }",
"@Override\n public void reset() {\n subQueryId = null;\n executionStats.reset();\n }",
"protected void resetAliasCounter() {\n aliasCounter = 0;\n }",
"private void popScope(Analyzer analyzer, QueryStmt stmt,\n ArrayList<BaseTableRef> unresolvedTableRefs) {\n if (stmt.hasWithClause()) {\n // Since we are in a nested WITH clause (scope) re-enable view replacement to\n // allow the references to be resolved in the parent scope.\n ArrayList<BaseTableRef> nestedUnresolvedTableRefs =\n stmt.getWithClause().getUnresolvedTableRefs();\n for (BaseTableRef baseTblRef: nestedUnresolvedTableRefs) {\n baseTblRef.enableWithViewReplacement();\n }\n unresolvedTableRefs.addAll(nestedUnresolvedTableRefs);\n }\n }",
"private void clearAliasList() throws AliasNotFoundException {\n for (Alias alias : uniqueAliasList.getAliasObservableList()) {\n uniqueAliasList.remove(alias.getAlias());\n }\n }",
"@Override\n public boolean undo() {\n // TODO Auto-generated method stub\n \n assert model != null;\n \n AliasSymbol toRemove = null;\n for(AliasSymbol symbol : model.getSavvyTasker().getReadOnlyListOfAliasSymbols()) {\n if (symbol.getKeyword().equals(this.keyword)) {\n toRemove = symbol;\n break;\n }\n }\n try {\n model.removeAliasSymbol(toRemove);\n } catch (SymbolKeywordNotFoundException e) {\n e.printStackTrace();\n }\n \n return true;\n }",
"default void updateScopes() {\n\n }",
"public void clearQuery (){\n\treset (\"\");\n }",
"public void unsetAlias()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ALIAS$2, 0);\n }\n }",
"void removeScope() throws EmptySymTableException {\n\n\t\t// if Symtable's list empty, throw empty\n\t\tif (list.isEmpty()) {\n\t\t\tthrow new EmptySymTableException();\n\t\t} else { // else remove HashMap from front of list\n\t\t\tlist.removeFirst();\n\t\t}\n\t}",
"public abstract void resetQuery();",
"public export.serializers.avro.DeviceInfo.Builder clearAlias() {\n alias = null;\n fieldSetFlags()[4] = false;\n return this;\n }",
"public void resetLastIds() {\n this.lastTableId.clear();\n }",
"public void clear() {\n usedNames.clear();\n }",
"public void endScope(){\n if(front == null) return;\n\n ListNode<String,Object> temp = front;\n ListNode<String,Object> prev = front;\n\n while(temp != null && temp.scope != scope){\n prev = temp;\n temp = temp.next;\n }\n\n prev.next = null;\n if(prev.scope == scope)\n prev = null;\n front = prev;\n scope--;\n }",
"public void reset() {\r\n\t\tscopedContext = new NamedScopeEvaluationContext();\r\n\t\texpressionParser = new SpelExpressionParser();\r\n\t\t\r\n\t\t// init named contexts\r\n\t\tscopedContext.addContext(\"model\", model);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates unique ids to create secret keys. | public String generateNewKey(); | [
"private String generateId() {\n byte[] id = new byte[BACKUP_KEY_SUFFIX_LENGTH_BITS / BITS_PER_BYTE];\n mSecureRandom.nextBytes(id);\n return BACKUP_KEY_ALIAS_PREFIX + ByteStringUtils.toHexString(id);\n }",
"private String generateId() {\n\t\tStringBuilder finalString = new StringBuilder(20).append(\"EWOK\");\n\t\tRandom rng = new Random(System.currentTimeMillis());\n\t\tfor (int i = 0; i < 16; ++i) {\n\t\t\tfinalString.append((char)(rng.nextInt(26) + 65));\n\t\t}\n\t\treturn finalString.toString();\n\t}",
"long generateKey();",
"private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }",
"private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }",
"default String generateId() {\n\t\treturn \"ier-\" + A3ServiceUtil.generateRandonAlphaNumberic(15, 15, \"\");\n\t}",
"private void generarIdSesion()\n\t{\n\t\tidSesion = UUID.randomUUID().toString();\n\t}",
"public static synchronized String genUniqueKey(){\n Random random = new Random();\n Integer number = random.nextInt(900000) + 100000;\n\n return System.currentTimeMillis()+ String.valueOf(number);\n }",
"private String generateDistinctId() {\n final Random random = new Random();\n final byte[] randomBytes = new byte[32];\n random.nextBytes(randomBytes);\n return Base64.encodeToString(randomBytes, Base64.NO_WRAP | Base64.NO_PADDING);\n }",
"private String createId()\n {\n return UUID.randomUUID().toString();\n }",
"void generateSecretKey() {\n\n Random rand = new Random();\n \n // randomly generate alphabet chars\n this.secretKey.setCharAt(0, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(1, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(4, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(5, (char) (rand.nextInt(26) + 'a'));\n\n // randomly generate special chars\n // special chars are between 33-47 and 58-64 on ASCII table\n if (rand.nextBoolean()) {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(15) + '!'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(15) + '!'));\n } else {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(7) + ':'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(7) + ':'));\n }\n \n // randomly generate int between 2 and 5\n this.secretKey.setCharAt(7, (char) (rand.nextInt(4) + '2'));\n }",
"AccountID generate();",
"private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }",
"public static String generatePeerId() {\n\t\tchar[] chars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".toCharArray();\n\t\tRandom rando = new Random();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tsb.append(chars[rando.nextInt(chars.length)]);\n\t\t}\n\t\treturn sb.toString();\t\n\t}",
"byte[] generateAndSetClientId() throws RiakException;",
"private byte[] generateSecret(){\n SecureRandom random = new SecureRandom();\r\n byte[] sharedSecret = new byte[32];\r\n random.nextBytes(sharedSecret);\r\n return sharedSecret;\r\n }",
"public static void generateId()\r\n\t{\r\n\t\trequestId = requestId + 1;\r\n\t}",
"public String createSmartKey(long ... ids);",
"@Override\r\n protected String generateId() {\r\n return String.format(\"S%04d\", nextId++);\r\n\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getRota method, of class Mapa. | @Test
public void testGetRotaDistancia() {
System.out.println("getRotaDistancia");
mapa.adicionarLigacoes(ligacoes);
mapa.criarGrafoTipo(TipoPesoEnum.DISTANCIA, veiculos.get(0));
List<LigacaoLocais> result = mapa.getRota(locais.get(3), locais.get(0));
assertTrue(result.size() == 2, "O tamanho da rota Γ© de 2");
} | [
"@Test\n public void testGetRotaTempo() {\n System.out.println(\"getRotaEnergia\");\n\n mapa.adicionarLigacoes(ligacoes);\n mapa.criarGrafoTipo(TipoPesoEnum.TEMPO, veiculos.get(0));\n List<LigacaoLocais> result = mapa.getRota(locais.get(3), locais.get(0));\n\n assertTrue(result.size() == 2, \"O tamanho da rota Γ© de 2\");\n }",
"@Test\n public void testGetRotaEnergia() {\n System.out.println(\"getRotaEnergia\");\n\n mapa.adicionarLigacoes(ligacoes);\n mapa.criarGrafoTipo(TipoPesoEnum.ENERGIA, veiculos.get(0));\n List<LigacaoLocais> result = mapa.getRota(locais.get(3), locais.get(0));\n\n assertTrue(result.size() == 2, \"O tamanho da rota Γ© de 2\");\n }",
"@Test\n\tpublic void testDistanciaParaUmaRota() {\n\t\tSystem.out.println(\"distanciaParaUmaRota\");\n\t\tList<Local> rota = new ArrayList<>();\n\t\trota.add(A);\n\t\trota.add(B);\n\t\trota.add(E);\n\t\trota.add(F);\n\t\trota.add(G);\n\t\tdouble expResult = 1556728;\n\t\tdouble result = (int) r.distanciaParaUmaRota(rota);\n\t\tassertEquals(expResult, result);\n\t}",
"@Test\n\tpublic void testRotaMaisCurta() {\n\t\tSystem.out.println(\"RotaMaisCurta\");\n\t\tLocal orig = A;\n\t\tLocal dest = G;\n\t\tList<Local> expResult = new ArrayList<>();\n\t\texpResult.add(A);\n\t\texpResult.add(B);\n\t\texpResult.add(E);\n\t\texpResult.add(F);\n\t\texpResult.add(G);\n\t\tList<Local> result = r.rotaMaisCurta(orig, dest);\n\t\tassertEquals(expResult, result);\n\t}",
"@Test\n\tpublic void testEnergiaParaUmaRota() {\n\t\tSystem.out.println(\"energiaParaUmaRota\");\n\t\tList<Local> rota = new ArrayList<>();\n\t\trota.add(A);\n\t\trota.add(B);\n\t\trota.add(E);\n\t\trota.add(F);\n\t\trota.add(G);\n\t\tdouble expResult = 929.874;\n\t\tdouble result = r.energiaParaUmaRota(rota, u, v);\n\t\tassertEquals(expResult, result, 1);\n\t}",
"protected void rotar(int angulo) {\n // TODO implement here\n \n }",
"public String getRotina() {\n return rotina;\n }",
"@Test\n public void testGetLigacaoLocais() {\n System.out.println(\"getLigacaoLocais\");\n int from = 0;\n int to = 0;\n assertEquals(null, mapa.getLigacaoLocais(from, to));\n mapa.adicionarLigacoes(ligacoes);\n assertEquals(null, mapa.getLigacaoLocais(from, to));\n assertEquals(ligacoes.get(0), mapa.getLigacaoLocais(1, 3));\n\n Farmacia f1 = new Farmacia(\"Farmacia1\", 111111111, \"farm1@mail.com\", 999999999, new Endereco(1, \"Farmacia Sousa Torres\", 41.2196991, -8.5608657, 83D));\n f1.setId(1);\n Cliente c3 = new Cliente(\"Cliente 3\", \"cli3@email.com\", 777777777, \"132\", 3, \"centro comercial parque\", 41.1845917, -8.6843009, 27.0, 1234567);\n c3.setId(3);\n LigacaoLocais ligA = new LigacaoLocais(f1, c3, 0, 10D, 267D, 0.5D);\n assertEquals(ligA, mapa.getLigacaoLocais(1, 3));\n }",
"public Mapa(String ruta){\r\n cargarMapa(ruta);\r\n generarMapa();\r\n }",
"@Test\n public void testGetNumligacoes() {\n\n assertEquals(0, mapa.getNumligacoes());\n mapa.adicionarLigacoes(ligacoes);\n int expected = 5;\n int result = mapa.getNumligacoes();\n assertEquals(expected, result);\n mapa.removerLigacao(ligacoes.get(0).getFrom(), ligacoes.get(0).getTo());\n\n // assertEquals(expected -1 , mapa.getNumligacoes());\n mapa.adicionarLigacao(ligacoes.get(0));\n assertEquals(expected, result);\n mapa.removerTodasLigacoes();\n assertEquals(0, mapa.getNumligacoes());\n\n }",
"@Test\n public void testRotate90Degrees1(){\n double[][] a = new double[5][5];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.rotateArray90(a);\n checkRotate(a, newA);\n }",
"@Test\n public void testRotate() {\n\t\tGPSCoordinate testCoordinatesRotate[] = {\n\t\t\tnew GPSCoordinate(0.0, 0.01), //SE shifted\n new GPSCoordinate(0.0, 0.0), //SW shifted\n new GPSCoordinate(0.01, 0.0), // NW shifted\n\t\t\tnew GPSCoordinate(0.01, 0.01), //NE shifted\n\t\t\t\n\t\t\tnew GPSCoordinate(0.0, 0.01), //SE shifted\n new GPSCoordinate(0.0, 0.0), //SW shifted\n new GPSCoordinate(0.01, 0.0), // NW shifted\n\t\t\tnew GPSCoordinate(0.01, 0.01), //NE shifted\n\t\t\t\n new GPSCoordinate(-0.005, 0.005), //SE\n new GPSCoordinate(-0.005, -0.005), //SW\n new GPSCoordinate(0.005, -0.005), // NW \n\t\t\tnew GPSCoordinate(0.005, 0.005), //NE\n\t\t\t\n\t\t\tnew GPSCoordinate(0.005, 0.005), //NE\n new GPSCoordinate(-0.005, 0.005), //SE\n new GPSCoordinate(-0.005, -0.005), //SW\n new GPSCoordinate(0.005, -0.005), // NW \n\t\t\t\n\t\t\tnew GPSCoordinate(0.005, 0.005), //NE\n new GPSCoordinate(-0.005, 0.005), //SE\n new GPSCoordinate(-0.005, -0.005), //SW\n new GPSCoordinate(0.005, -0.005), // NW \n\t\t\t\n\t\t\tnew GPSCoordinate(0.00065, 0.00065), //NE\n new GPSCoordinate(-0.00065, 0.00065), //SE\n new GPSCoordinate(-0.00065, -0.00065), //SW\n new GPSCoordinate(0.00065, -0.00065), // NW \n\t\t};\n\t\t\n GPSCoordinate coordinatesExpected[] = {\n\t\t\tnew GPSCoordinate(0.005 - 0.007071068, 0.005), //SE shifted -ve rotation\n\t\t\tnew GPSCoordinate(0.005, 0.005 - 0.007071068), //SW shifted -ve rotation\n\t\t\tnew GPSCoordinate(0.005 + 0.007071068, 0.005), //NW shifted -ve rotation\n\t\t\tnew GPSCoordinate(0.005, 0.007071068 + 0.005), //NE shifted -ve rotation\n\t\t\t\n\t\t\tnew GPSCoordinate(0.005, 0.007071068 + 0.005), //SE shifted\n new GPSCoordinate(0.005 - 0.007071068, 0.005), //SW shifted\n new GPSCoordinate(0.005, 0.005 - 0.007071068), // NW shifted\n\t\t\tnew GPSCoordinate(0.005 + 0.007071068, 0.005), //NE shifted\n\t\t\t\n new GPSCoordinate(0.005, 0.005), //SE rotated 90\n new GPSCoordinate(-0.005, 0.005), //SW rotated 90\n new GPSCoordinate(-0.005, -0.005), // NW rotated 90\n\t\t\tnew GPSCoordinate(0.005, -0.005), //NE rotated 90\n\t\t\t\n new GPSCoordinate(0.005, 0.005), //NE not rotated\n new GPSCoordinate(-0.005, 0.005), //SE not rotated\n new GPSCoordinate(-0.005, -0.005), //SW not rotated\n new GPSCoordinate(0.005, -0.005), // NW not rotated\n\t\t\t\n\t\t\tnew GPSCoordinate(0.007071068, 0.0), //NE rotated 45 degrees\n new GPSCoordinate(0.0, 0.007071068), //SE rotated 45 degrees\n new GPSCoordinate(-0.007071068, 0.0), //SW rotated 45 degrees\n new GPSCoordinate(0.0, -0.007071068), // NW rotated 45 degrees\n\t\t\t\n\t\t\tnew GPSCoordinate(0.000919239, 0.0), //NE rotated 45 degrees\n new GPSCoordinate(0.0, 0.000919239), //SE rotated 45 degrees \n new GPSCoordinate(-0.000919239, 0.0), //SW rotated 45 degrees \n new GPSCoordinate(0.0, -0.000919239), // NW rotated 45 degrees \n };\n\t\t\n\t\tGPSCoordinate origin2 = new GPSCoordinate(0.005, 0.005);\n\t\t\n\t\tSystem.out.println(\"Testing rotate() function with a bearing of -45.0 with shifted origin\");\n\t\tfor (int i = 0; i < 4; i++) {\n GPSCoordinate expResult = coordinatesExpected[i];\n GPSCoordinate result = origin2.rotate(testCoordinatesRotate[i], -45.0);\n\t\t\tSystem.out.println(\"Expected Lat: \" + expResult.latitude() + \", Actual Lat: \" + result.latitude());\n\t\t\tSystem.out.println(\"Expected Lon: \" + expResult.longitude() + \", Actual Lon: \" + result.longitude());\n\t\t\tSystem.out.println(\"\");\n assertEquals(expResult.latitude(), result.latitude(), 0.000001);\n\t\t\tassertEquals(expResult.longitude(), result.longitude(), 0.000001);\n }\n\t\t\n\t\tSystem.out.println(\"Testing rotate() function with a bearing of 45.0 with shifted origin\");\n\t\tfor (int i = 4; i < 8; i++) {\n GPSCoordinate expResult = coordinatesExpected[i];\n GPSCoordinate result = origin2.rotate(testCoordinatesRotate[i], 45.0);\n\t\t\tSystem.out.println(\"Expected Lat: \" + expResult.latitude() + \", Actual Lat: \" + result.latitude());\n\t\t\tSystem.out.println(\"Expected Lon: \" + expResult.longitude() + \", Actual Lon: \" + result.longitude());\n\t\t\tSystem.out.println(\"\");\n assertEquals(expResult.latitude(), result.latitude(), 0.000001);\n\t\t\tassertEquals(expResult.longitude(), result.longitude(), 0.000001);\n }\n\t\t\n\t\tSystem.out.println(\"Testing rotate() function with a bearing of 90.0\");\n\t\tfor (int i = 8; i < 12; i++) {\n GPSCoordinate expResult = coordinatesExpected[i];\n GPSCoordinate result = this.origin.rotate(testCoordinatesRotate[i], 90.0);\n\t\t\tSystem.out.println(\"Expected Lat: \" + expResult.latitude() + \", Actual Lat: \" + result.latitude());\n\t\t\tSystem.out.println(\"Expected Lon: \" + expResult.longitude() + \", Actual Lon: \" + result.longitude());\n\t\t\tSystem.out.println(\"\");\n assertEquals(expResult.latitude(), result.latitude(), 0.000001);\n\t\t\tassertEquals(expResult.longitude(), result.longitude(), 0.000001);\n }\n\t\t\n\t\tSystem.out.println(\"Testing rotate() function with a bearing of 0.0\");\n\t\tfor (int i = 12; i < 16; i++) {\n GPSCoordinate expResult = coordinatesExpected[i];\n GPSCoordinate result = this.origin.rotate(testCoordinatesRotate[i], 0.0);\n\t\t\tSystem.out.println(\"Expected Lat: \" + expResult.latitude() + \", Actual Lat: \" + result.latitude());\n\t\t\tSystem.out.println(\"Expected Lon: \" + expResult.longitude() + \", Actual Lon: \" + result.longitude());\n\t\t\tSystem.out.println(\"\");\n assertEquals(expResult.latitude(), result.latitude(), 0.000001);\n\t\t\tassertEquals(expResult.longitude(), result.longitude(), 0.000001);\n }\n\t\t\n\t\tSystem.out.println(\"Testing rotate() function with a bearing of 45.0\");\n for (int i = 16; i < testCoordinatesRotate.length; i++) {\n GPSCoordinate expResult = coordinatesExpected[i];\n GPSCoordinate result = this.origin.rotate(testCoordinatesRotate[i], 45.0);\n\t\t\tSystem.out.println(\"Expected Lat: \" + expResult.latitude() + \", Actual Lat: \" + result.latitude());\n\t\t\tSystem.out.println(\"Expected Lon: \" + expResult.longitude() + \", Actual Lon: \" + result.longitude());\n\t\t\tSystem.out.println(\"\");\n assertEquals(expResult.latitude(), result.latitude(), 0.000001);\n\t\t\tassertEquals(expResult.longitude(), result.longitude(), 0.000001);\n }\n }",
"public int obtenerRotacion(){\n return this.rotacion;\n }",
"@Test\n public void WrongRotatePieces() {\n test(\"B1\", 0, 130, 220, \"b01N\");\n test(\"B2\", 0, 135, 225, \"B01N\");\n test(\"G1\", 1, 130, 220, \"g01E\");\n test(\"G2\", 1, 135, 225, \"G01E\");\n test(\"N1\", 2, 130, 220, \"n01S\");\n test(\"N2\", 2, 135, 225, \"N01S\");\n test(\"R1\", 3, 130, 220, \"r01W\");\n test(\"R2\", 3, 135, 225, \"R01W\");\n\n // test invalid rotate index\n for(int i=0; i<100; i++) {\n int index1 = (int) (Math.random()*100 + 4);\n int index2 = - (int) (Math.random()*100);\n test(\"O1\", index1, 130, 220, null);\n test(\"O2\", index2, 130, 220, null);\n }\n }",
"@Test\n public void testCriarGrafoTipo() {\n System.out.println(\"criarGrafoTipo\");\n mapa.adicionarLigacoes(ligacoes);\n mapa.criarGrafoTipo(TipoPesoEnum.DISTANCIA, veiculos.get(0));\n mapa.criarGrafoTipo(TipoPesoEnum.ENERGIA, veiculos.get(0));\n }",
"@Test\n public void testGetNumLocais() {\n mapa.adicionarLigacoes(ligacoes);\n int expResult = 4;\n int result = mapa.getNumLocais();\n assertEquals(expResult, result);\n Mapa other = new Mapa(new ArrayList<>());\n assertEquals(0, other.getNumLocais());\n }",
"public static void testAfrica(){\r\n\t\tMapa afr = new Mapa();\r\n\t\tZona sudA = new Zona(\"Sudafrica\");\r\n\t\tZona mos = new Zona(\"Mosambique\");\r\n\t\tZona sim = new Zona(\"Simbabue\");\r\n\t\tZona bod = new Zona(\"Bodsuana\");\r\n\t\tZona nam = new Zona(\"Namibia\");\r\n\t\tZona mal = new Zona(\"Malaui\");\r\n\t\tZona sam = new Zona(\"Sambia\");\r\n\t\tZona ang = new Zona(\"Angola\");\r\n\t\tZona tan = new Zona(\"Tanzania\");\r\n\t\tZona con = new Zona(\"Rep Congo\");\r\n\t\tZona rua = new Zona(\"Ruanda\");\r\n\t\tZona bur = new Zona(\"Burundi\");\r\n\t\tZona gab = new Zona(\"Gabon\");\r\n\t\tZona uga = new Zona(\"Uganda\");\r\n\t\tZona ken = new Zona(\"Kenia\");\r\n\t\tZona som = new Zona(\"Somalia\");\r\n\t\tZona eti = new Zona(\"Etiopia\");\r\n\t\tZona sudanS = new Zona(\"Sudan del Sur\");\r\n\t\tZona cent = new Zona(\"CentroAfica\");\r\n\t\tZona cam = new Zona(\"Camerun\");\r\n\t\tZona gin = new Zona(\"Ginea Ecuatorial\");\t\t\r\n\t\t//Zona eri = new Zona(\"Eritrea\");\r\n\t\tZona sud = new Zona(\"Sudan\");\r\n\t\tZona chad = new Zona(\"Chad\");\r\n\t\tZona nig = new Zona(\"Nigeria\");\r\n\t\tZona egi = new Zona(\"Egipto\");\r\n\t\tZona lib = new Zona(\"Libia\");\r\n\t\tZona niger = new Zona(\"Niger\");\r\n\t\tZona tun = new Zona(\"Tunes\");\r\n\t\tZona arg = new Zona(\"Argelia\");\r\n\t\tZona mar = new Zona(\"Marruecos\");\r\n\t\tZona mali = new Zona(\"Mali\");\r\n\t\tZona mau = new Zona(\"Mauritania\");\r\n\t\tZona sen = new Zona(\"Senegal\");\r\n\t\t//Zona gam = new Zona(\"Gambia\");\r\n\t\tZona ginB = new Zona(\"Guinea Bisau\");\r\n\t\tZona ginea = new Zona(\"Guinea\");\r\n\t\tZona sie = new Zona(\"Sierra Leona\");\r\n\t\tZona libe = new Zona(\"Liberia\");\r\n\t\tZona cos = new Zona(\"Costa de Marfil\");\r\n\t\tZona gan = new Zona(\"Ghana\");\r\n\t\tZona burqui = new Zona(\"Burkina Faso\");\r\n\t\tZona tog = new Zona(\"Togo\");\r\n\t\tZona ben = new Zona(\"Benin\");\r\n\t\t\r\n\t\t\r\n\t\tafr.agregarZona(sudA);\r\n\t\tafr.agregarZona(mos);\r\n\t\tafr.agregarZona(sim);\r\n\t\tafr.agregarZona(bod);\r\n\t\tafr.agregarZona(nam);\r\n\t\tafr.agregarZona(mal);\r\n\t\tafr.agregarZona(sam);\r\n\t\tafr.agregarZona(ang);\r\n\t\tafr.agregarZona(tan);\r\n\t\tafr.agregarZona(con);\r\n\t\tafr.agregarZona(rua);\r\n\t\tafr.agregarZona(bur);\r\n\t\tafr.agregarZona(gab);\r\n\t\tafr.agregarZona(uga);\r\n\t\tafr.agregarZona(ken);\r\n\t\tafr.agregarZona(som);\r\n\t\tafr.agregarZona(eti);\r\n\t\tafr.agregarZona(sudanS);\r\n\t\tafr.agregarZona(cent);\r\n\t\tafr.agregarZona(cam);\r\n\t\tafr.agregarZona(gin);\t\t\r\n\t\t//afr.agregarZona(eri);\r\n\t\tafr.agregarZona(sud);\r\n\t\tafr.agregarZona(chad);\r\n\t\tafr.agregarZona(nig);\r\n\t\tafr.agregarZona(egi);\r\n\t\tafr.agregarZona(lib);\r\n\t\tafr.agregarZona(niger);\r\n\t\tafr.agregarZona(tun);\r\n\t\tafr.agregarZona(arg);\r\n\t\tafr.agregarZona(mar);\r\n\t\tafr.agregarZona(mali);\r\n\t\tafr.agregarZona(mau);\r\n\t\tafr.agregarZona(sen);\r\n\t\t//afr.agregarZona(gam);\r\n\t\tafr.agregarZona(ginB);\r\n\t\tafr.agregarZona(ginea);\r\n\t\tafr.agregarZona(sie);\r\n\t\tafr.agregarZona(libe);\r\n\t\tafr.agregarZona(cos);\r\n\t\tafr.agregarZona(gan);\r\n\t\tafr.agregarZona(burqui);\r\n\t\tafr.agregarZona(tog);\r\n\t\tafr.agregarZona(ben);\r\n\t\t\r\n\t\t\r\n\t\t//Paises limitrofes de Sudafrica\r\n\t\tafr.relacionarZonas(sudA, bod);\r\n\t\tafr.relacionarZonas(sudA, nam);\r\n\t\tafr.relacionarZonas(sudA, sim);\r\n\t\tafr.relacionarZonas(sudA, mos);\t\r\n\t\tafr.relacionarZonas(nam, bod);\r\n\t\tafr.relacionarZonas(nam, ang);\r\n\t\tafr.relacionarZonas(nam, sam);\t\t\r\n\t\tafr.relacionarZonas(bod, sim);\t\r\n\t\tafr.relacionarZonas(sim, mos);\r\n\t\tafr.relacionarZonas(sim, sam);\t\t\r\n\t\tafr.relacionarZonas(mos, mal);\r\n\t\tafr.relacionarZonas(mos, sam);\t\t\r\n\t\tafr.relacionarZonas(mal, sam);\r\n\t\tafr.relacionarZonas(mal, tan);\t\t\r\n\t\tafr.relacionarZonas(sam, tan);\r\n\t\tafr.relacionarZonas(sam, ang);\r\n\t\tafr.relacionarZonas(sam, con);\t\t\r\n\t\tafr.relacionarZonas(ang, con);\t\t\r\n\t\tafr.relacionarZonas(tan, con);\r\n\t\tafr.relacionarZonas(tan, bur);\r\n\t\tafr.relacionarZonas(tan, rua);\r\n\t\tafr.relacionarZonas(tan, uga);\r\n\t\tafr.relacionarZonas(tan, ken);\t\t\r\n\t\tafr.relacionarZonas(con, gab);\r\n\t\tafr.relacionarZonas(con, cent);\r\n\t\tafr.relacionarZonas(con, cam);\r\n\t\tafr.relacionarZonas(con, sudanS);\r\n\t\tafr.relacionarZonas(con, uga);\r\n\t\tafr.relacionarZonas(con, rua);\r\n\t\tafr.relacionarZonas(con, bur);\t\t\r\n\t\tafr.relacionarZonas(uga, rua);\t\t\r\n\t\tafr.relacionarZonas(uga, ken);\r\n\t\tafr.relacionarZonas(uga, sudanS);\t\r\n\t\tafr.relacionarZonas(ken, som);\r\n\t\tafr.relacionarZonas(ken , eti);\t\t\r\n\t\tafr.relacionarZonas(ken, sudanS);\t\r\n\t\tafr.relacionarZonas(som, eti);\t\r\n\t\tafr.relacionarZonas(eti, sudanS);\r\n\t\tafr.relacionarZonas(eti, sud);\t\t\r\n\t\tafr.relacionarZonas(sudanS, sud);\r\n\t\tafr.relacionarZonas(sudanS, cent);\t\r\n\t\tafr.relacionarZonas(cent, sud);\r\n\t\tafr.relacionarZonas(cent, chad);\r\n\t\tafr.relacionarZonas(cent, cam);\t\r\n\t\tafr.relacionarZonas(cam, chad);\r\n\t\tafr.relacionarZonas(cam, nig);\r\n\t\t//afr.relacionarZonas(som, eti);\t\r\n\t\tafr.relacionarZonas(gab, gin);\r\n\t\tafr.relacionarZonas(gin, cam);\t\t\t\r\n\t\tafr.relacionarZonas(sud, egi);\r\n\t\tafr.relacionarZonas(sud, chad);\r\n\t\tafr.relacionarZonas(sud, lib);\t\r\n\t\tafr.relacionarZonas(chad, lib);\r\n\t\tafr.relacionarZonas(chad, niger);\r\n\t\tafr.relacionarZonas(chad, nig);\t\t\r\n\t\tafr.relacionarZonas(nig, niger);\r\n\t\tafr.relacionarZonas(nig, ben);\t\t\r\n\t\tafr.relacionarZonas(egi, lib);\t\t\r\n\t\tafr.relacionarZonas(lib, tun);\r\n\t\tafr.relacionarZonas(lib, arg);\t\t\r\n\t\tafr.relacionarZonas(niger, lib);\r\n\t\tafr.relacionarZonas(niger, arg);\r\n\t\tafr.relacionarZonas(niger, mali);\t\r\n\t\tafr.relacionarZonas(ben, niger);\r\n\t\tafr.relacionarZonas(ben , burqui);\r\n\t\tafr.relacionarZonas(ben, tog);\t\r\n\t\tafr.relacionarZonas(tog, burqui);\r\n\t\tafr.relacionarZonas(tog, gan);\t\r\n\t\tafr.relacionarZonas(gan, burqui);\r\n\t\tafr.relacionarZonas(gan, cos);\t\t\r\n\t\tafr.relacionarZonas(cos, burqui);\r\n\t\tafr.relacionarZonas(cos, libe);\r\n\t\tafr.relacionarZonas(cos, ginea);\r\n\t\tafr.relacionarZonas(cos, mali);\t\t\r\n\t\tafr.relacionarZonas(libe, sie);\r\n\t\tafr.relacionarZonas(libe, ginea);\t\r\n\t\tafr.relacionarZonas(sie, ginea);\t\r\n\t\tafr.relacionarZonas(ginea, mali);\r\n\t\tafr.relacionarZonas(ginea, sen);\r\n\t\tafr.relacionarZonas(ginea, ginB);\r\n\t\tafr.relacionarZonas(ginB, sen);\t\t\r\n\t\tafr.relacionarZonas(burqui, mali);\t\r\n\t\tafr.relacionarZonas(mali, arg);\r\n\t\tafr.relacionarZonas(mali,mau);\t\r\n\t\tafr.relacionarZonas(mali, sen);\t\t\r\n\t\tafr.relacionarZonas(mau, mar);\r\n\t\tafr.relacionarZonas(mau, arg);\t\t\r\n\t\tafr.relacionarZonas(arg, mar);\t\t\r\n\t\tafr.relacionarZonas(tun, arg);\r\n\t\t\r\n\r\n\t\tafr.colorear();\r\n\t\r\n\t\t//***************Salida por Consola****************/\r\n\t\t//*************************************************/\r\n\t\tSystem.out.println(\"*********************\");\r\n\t\tSystem.out.println(\"AFRICA\\n\"+ afr.toString());\t\t\r\n\t\tSystem.out.println(afr.cantColoreo());\r\n\t\tSystem.out.println(\"*********************\");\r\n\t\tSystem.out.println(\"La verificacion del coloreo \"\r\n\t\t\t\t+ \"de AFRICA es: \"+afr.verificarColoreo());\r\n\t\tSystem.out.println(\"*********************\");\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"private static void calcularRota() throws CloneNotSupportedException {\n Entregas matriz = new Entregas(entradas);\n rotas = matriz.processarEntregas();\n }",
"@Test\n public void testAdicionarLigacao() {\n\n mapa.adicionarLigacoes(ligacoes);\n\n System.out.println(\"adicionarLigacao\");\n LigacaoLocais ligZ = new LigacaoLocais(locais.get(0), locais.get(0), 0, 0D, 100D, 0.0D);\n assertEquals(true, mapa.adicionarLigacao(ligZ));\n\n assertEquals(ligacoes.size() + 1, mapa.getNumligacoes());\n\n assertEquals(false, mapa.adicionarLigacao(null));\n\n Farmacia f200 = new Farmacia(\"Farmacia2\", 222222022, \"farm2@mail.com\", 888888888, new Endereco(2, \"Farmacia Guifoes\", 41.2001, -8.66600, 70D));\n f200.setId(200);\n Cliente c300 = new Cliente(\"Cliente 3\", \"cli3@email.com\", 777707777, \"132\", 3, \"centro comercial parque\", 41.1845917, -8.6843000, 20.0, 1234560);\n c300.setId(300);\n LigacaoLocais ligK = new LigacaoLocais(f200, c300, 0, 10D, 267D, 0.5D);\n\n assertEquals(false, mapa.adicionarLigacao(ligK));\n\n ligK = new LigacaoLocais(null, null, 0, 10D, 267D, 0.5D);\n\n assertEquals(false, mapa.adicionarLigacao(ligK));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks to see if a Card is face up | public boolean isFaceUp(){
if(faceUpValue==false){
return false;
}
else
return true;
} | [
"public boolean isFaceUp(){\r\n return(getImage() == CardFaceUp);\r\n }",
"boolean isTurnedFaceUp();",
"public boolean isFaceUp(){return faceUp;}",
"public boolean isfaceup(){\n\t\treturn faceup;\n\t}",
"public boolean isFaceUp() {\n\treturn faceUp;\n}",
"public boolean isFaceUp()\n {\n return isFaceUp;\n }",
"public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public void flipCard() {\n this.faceUp = !faceUp;\n }",
"private int howManyFaceUp(){\n cardsFaceUp = 0;\n for(Card c:cards){\n if(c.isFaceUp()){\n cardsFaceUp++;\n }\n }\n return cardsFaceUp;\n }",
"public boolean validCard() {\n\n if (this.calledCard != null) {\n\n if (this.flippedCard.getTag().substring(1).equals(this.calledCard.getTag().substring(1))) {\n return true;\n }\n\n else {\n return false;\n }\n }\n return true;\n }",
"public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }",
"boolean hasAlreadShowCard();",
"boolean hasAlreadFoldCard();",
"protected boolean isFacePresent() {\n \t\tlong currentTime = meta.getTime();\n \t\treturn isFacePresent && currentTime - timeFaceAppeared >= thresholdFaceAppeared\n \t\t\t|| currentTime - timeFaceDisappeared <= thresholdFaceDisappeared;\n \t}",
"public boolean isFace(){\n\t\tboolean rtn = false;\n\n\t\t/*\n\t\t * This 'switch' will compare the 'face' value to every constant; will change 'rtn' to true if\n\t\t * any of the cases are met.\n\t\t */\n\t\tswitch(face){\n\t\tcase ACE:\n\t\t\trtn = true;\n\t\t\tbreak;\n\t\tcase JACK:\n\t\t\trtn = true;\n\t\t\tbreak;\n\t\tcase QUEEN:\n\t\t\trtn = true;\n\t\t\tbreak;\n\t\tcase KING:\n\t\t\trtn = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn rtn;\n\t}",
"private boolean isCardReleased(Input.TouchEvent touchEvent, CharacterCard card) {\n return (checkIsTouched(touchEvent, card) && touchEvent.type == Input.TouchEvent.TOUCH_UP);\n }",
"private boolean isFullHouse()\n {\n boolean early = hand[0].getFace() == hand[1].getFace()\n && hand[1].getFace() == hand[2].getFace()\n && hand[3].getFace() == hand[4].getFace();\n\n boolean late = hand[0].getFace() == hand[1].getFace()\n && hand[2].getFace() == hand[3].getFace()\n && hand[3].getFace() == hand[4].getFace();\n\n if (early || late)\n {\n primaryCard = hand[2].getFace();\n return true;\n }\n else\n {\n return false;\n }\n }",
"boolean hasCreCard();",
"protected abstract boolean isCardActivatable(Card card);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies if the spectrum id values were obtained from the spectrum order numbers. | public boolean isSpectrumIdObtainedFromSpectrumOrderNumber()
{
return true;
} | [
"private void setSpectrumIdsFound(List<String> spectrumIdsFound)\r\n\t{\r\n\t\tthis.spectrumIdsFound = spectrumIdsFound;\r\n\t}",
"private List<String> getSpectrumIdsFound()\r\n\t{\r\n\t\treturn this.spectrumIdsFound;\r\n\t}",
"private void setSpectrumIdsTarget(List<String> spectrumIdsTarget)\r\n\t{\r\n\t\tthis.spectrumIdsTarget = spectrumIdsTarget;\r\n\t}",
"private List<String> getSpectrumIdsTarget()\r\n\t{\r\n\t\treturn this.spectrumIdsTarget;\r\n\t}",
"public List<String> getSpectrumIdList()\r\n\t{\r\n\t\t/*\r\n\t\t * Return list of spectrum id values.\r\n\t\t */\r\n\t\treturn fetchSpectrumIds();\r\n\t}",
"public boolean hasSERIESNO() {\n return fieldSetFlags()[10];\n }",
"private void setTrackDescriptionsAndID() {\n\t\t// Compute new definitions for all tracks\n\t\tllahTrackingOps.clearDocuments();\n\t\ttrackId_to_globalId.clear();\n\t\tglobalId_to_track.forEachEntry(( globalID, track ) -> {\n\t\t\ttrack.trackDoc = llahTrackingOps.createDocument(track.predicted.toList());\n\t\t\t// copy global landmarks into track so that in the next iteration the homography will be correct\n\t\t\ttrack.trackDoc.landmarks.reset();\n\t\t\ttrack.trackDoc.landmarks.copyAll(track.globalDoc.landmarks.toList(), ( src, dst ) -> dst.setTo(src));\n\t\t\ttrackId_to_globalId.put(track.trackDoc.documentID, globalID);\n\t\t\treturn true;\n\t\t});\n\t}",
"public boolean hasSampleId() {\n return fieldSetFlags()[2];\n }",
"public boolean hasInstrumentID() {\n return fieldSetFlags()[7];\n }",
"private List<String> fetchSpectrumIds()\r\n\t\t\tthrows InvalidDataException\r\n\t{\r\n\t\t/*\r\n\t\t * Reset search items.\r\n\t\t */\r\n\t\tresetIdsToFind();\r\n\t\t/*\r\n\t\t * Reset spectrum id list data.\r\n\t\t */\r\n\t\tList<String> spectrumIdsFound = new ArrayList<String>();\r\n\t\tsetSpectrumIdsFound(spectrumIdsFound);\r\n\t\tInputStream iStream = getInputStream();\r\n\t\t/*\r\n\t\t * Process spectra in PKL file\r\n\t\t */\r\n\t\tint numberOfSpectra = 0;\r\n\t\t/*\r\n\t\t * Start of spectra reading\r\n\t\t */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\r\n\t\t\t\tiStream));\r\n\t\t\tString line;\r\n\t\t\twhile ((line = in.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\t// Line with 3 columns (float, float, digit)\r\n\t\t\t\tif (line.matches(\"^\\\\d+\\\\.\\\\d*[ \\\\t]\\\\d+\\\\.?\\\\d*[ \\\\t]\\\\d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t// New spectrum\r\n\t\t\t\t\tnumberOfSpectra++;\r\n\t\t\t\t\t// Use spectra order number as spectrum id value\r\n\t\t\t\t\tString currentSpectrumIdStr = Integer.toString(numberOfSpectra);\r\n\t\t\t\t\tgetSpectrumIdsFound().add(currentSpectrumIdStr);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException exept)\r\n\t\t{\r\n\t\t\tString message = exept.getMessage();\r\n\t\t\tlog.warn(message);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t/*\r\n\t\t * Return null if no items found.\r\n\t\t */\r\n\t\tif (getSpectrumIdsFound().size() == 0)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t/*\r\n\t\t * Return result of search for spectrum id values.\r\n\t\t */\r\n\t\treturn getSpectrumIdsFound();\r\n\t}",
"private void setCurrentSpectrumId(String currentSpectrumId)\r\n\t{\r\n\t\tthis.currentSpectrumId = currentSpectrumId;\r\n\t}",
"public boolean isSetDncSoundId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DNCSOUNDID$12) != 0;\n }\n }",
"boolean hasStoplossOrderid();",
"public boolean isSetSeries() {\n return EncodingUtils.testBit(__isset_bitfield, __SERIES_ISSET_ID);\n }",
"public void setAmphurID(int value) {\r\n this.amphurID = value;\r\n }",
"public boolean isSetIdCursa() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IDCURSA_ISSET_ID);\r\n }",
"boolean isSetExternalId();",
"private String getCurrentSpectrumId()\r\n\t{\r\n\t\treturn this.currentSpectrumId;\r\n\t}",
"public boolean isSetDataId() {\n return EncodingUtils.testBit(__isset_bitfield, __DATAID_ISSET_ID);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Binds a property value to the mock context. | private void bind(final Context mockCtx, final String name, final String value) throws NamingException {
when(mockCtx.lookup(name)).thenReturn(value);
bindError(mockCtx, name + MISSING_PROP);
} | [
"protected void bind(EvaluationContext context) {\n this.context = context;\n }",
"public IProperty recontextualizeProperty(IProperty value);",
"public abstract void setValue(ELContext context,\n Object base,\n Object property,\n Object value);",
"@Given(\"^There is property (.*)=(.*) in scenario context$\")\n public void addProperty(final String name, final String value) {\n this.suit.scenario().context().add(name, value);\n }",
"InjectProperty create(ContextManagerFactory contextManagerFactory, Method property);",
"public void setProperty(String property, String value);",
"@Override\n public void setValue(ELContext context, Object base, Object property, Object value)\n {\n context.setPropertyResolved(false);\n for (ELResolver resolver : resolvers)\n {\n resolver.setValue(context, base, property, value);\n if (context.isPropertyResolved())\n {\n return;\n }\n }\n }",
"public T bind(Properties properties) {\n return evaluate(new SubstitutableProperties(properties));\n }",
"private void setProperty(Builder builder, String propertyName, String value) throws HorizonDBException {\r\n\r\n Method method = this.methods.get(propertyName);\r\n\r\n try {\r\n\r\n method.invoke(builder, toType(propertyName, value.trim(), method.getParameterTypes()[0]));\r\n\r\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NullPointerException e) {\r\n\r\n throw new HorizonDBException(ErrorCodes.INVALID_CONFIGURATION, \"The configuration property: \"\r\n + propertyName + \" does not exists.\");\r\n }\r\n }",
"public abstract void set(T v, String context);",
"public void testValueRefProperty() throws Exception {\n \n TestBean testBean = new TestBean();\n getFacesContext().getExternalContext().getSessionMap().put(\n \"TestRefBean\", testBean);\n \n ValueBindingImpl valueBinding = new\n ValueBindingImpl(new ApplicationImpl());\n \n valueBinding.setRef(\"TestRefBean.one\");\n valueBinding.setValue(getFacesContext(), \"one\");\n \n bean = new ManagedBeanBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"session\");\n \n property = new ManagedPropertyBean();\n property.setPropertyName(\"one\");\n property.setValue(\"#{TestRefBean.one}\");\n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n //testing with a property set\n assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));\n \n //make sure bean instantiated properly. Get property back from bean.\n assertTrue(testBean.getOne().equals(\"one\"));\n \n //make sure scope is stored properly\n assertTrue(mbf.getScope().equals(\"session\"));\n \n }",
"public void setProperty( Object obj )\n {\n currValue = obj;\n }",
"public IPropertyValue recontextualizePropertyValue(IPropertyValue value);",
"public VariableAccessor bind(AbstractVariable variable, EvaluationContext context) {\n super.bind(context.getDecision(variable), context);\n return this;\n }",
"public String getContextProperty() {\n return _contextProperty;\n }",
"public void setPropertyItem(entity.PropertyItem value);",
"@Then(\"^The property (.*) in scenario context has value (.*)$\")\n public void checkPropertyHasCorrectValue(\n final String name,\n final String value\n ) {\n MatcherAssert.assertThat(\n this.suit.scenario().context().value(name),\n CoreMatchers.equalTo(value)\n );\n }",
"@Test public void checkPromptTextPropertyBind() {\n StringProperty strPr = new SimpleStringProperty(\"value\");\n txtField.promptTextProperty().bind(strPr);\n assertTrue(\"PromptText cannot be bound\", txtField.getPromptText().equals(\"value\"));\n strPr.setValue(\"newvalue\");\n assertTrue(\"PromptText cannot be bound\", txtField.getPromptText().equals(\"newvalue\"));\n }",
"public void bind(String var, E value) {\n put(var, value);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to create the TSPSimulatedAnnealing object, receive TSPProblem object and | public TSPSimulatedAnnealing(TSPProblem tspProblem){
super();
this.tspProblem = tspProblem;
this.random = new Random();
this.initialSolution = generateInitialSolution();
calculateInitialAndFinalTemperature();
} | [
"public TSPSolution(){\n\t\tthis.route=(IRoute) new ArrayRoute();\n\t}",
"private void useInstance(){\n int[] tour = Optimisation.linkernTour(ttp);\n TSPSolution = new Individual(tour.length-1);\n\n //matches the city number with the CITY object supplied in the cities array\n for(int i = 0; i < tour.length-1; i++){\n int currentCity = tour[i];\n City current;\n for(int j = 0; j < cities.length; j++){\n current = cities[j];\n\n //sets that city in the TSPSolution with our CITY objects\n if(current.getNodeNum() == currentCity){\n TSPSolution.setCity(i, current);\n break;\n }\n }\n }\n }",
"private void generateTSP(int choice){\n switch(choice){\n case 1:\n useInstance();\n break;\n case 2:\n useBestTSPAlgorithm();\n break;\n }\n }",
"public static TSPSolver createInstance() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new TSPSolver();\n\t\t}\n\t\t\n\t\treturn _instance;\n\t}",
"private void useBestTSPAlgorithm(){\n Control control = new Control();\n int generations = 5000, populationSize = 50;\n int solutionSize = populationSize/2;\n double mutationPercentage = 0.10, operationPercentage = 0.90;\n int removalRate = (int)Math.ceil(populationSize/10);\n TSPSolution = control.runSequence(cities, solutionSize, populationSize, generations, mutationPercentage, operationPercentage, removalRate, 3);\n }",
"public void initTSP(Instance instance){\n instance.completeTSP=instance.createTSPFromNodes(instance.nodesList,instance.indexesCompleteTSP);\n instance.backHaulTSP=instance.createTSPFromNodes(instance.nodesList,instance.indexesBackHaulTSP);\n instance.lineHaulTSP=instance.createTSPFromNodes(instance.nodesList,instance.indexesLineHaulTSP);\n }",
"public TSPMSTSolution(int iterations)\n {\n// System.out.println(\"NODE CREATED\");\n this.included = new int[0];\n this.includedT = new int[0];\n this.excluded = new int[0];\n this.excludedT = new int[0];\n this.iterations = iterations;\n }",
"public Solution constructRandomSolution();",
"public AStarSearch(HeuristicProblem<T> problem) {\t\n\t\tsuper(problem); \n\t}",
"public void generateNeighborhood(TSPSolution s){\r\n\t\tint [] rounte = new int[problem.city_num+1];\r\n\t\tfor(int i=0;i<problem.city_num;i++) rounte[i] = s.route[i];\r\n\t\trounte[problem.city_num] = rounte[0];\r\n\t\tint [] pos = new int[problem.city_num];\r\n\t\tproblem.calculatePosition(rounte, pos);\r\n\t\tint pos1 = 0;\r\n\t\tint pos2 = 0;\r\n\t\tfor(int k=0;k<problem.city_num;k++){\r\n\t\t\tint i = k;\r\n\t\t\tpos1 = i;\r\n\t\t\tint curIndex = rounte[i];\r\n\t\t\tint nextIndex = rounte[i+1];\r\n\t\t\tArrayList<Integer> candidate = problem.candidateList.get(curIndex);\r\n\t\t\tIterator<Integer> iter = candidate.iterator();\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tint next = iter.next();\r\n\t\t\t\tpos2 = pos[next];\r\n\t\t\t\tint curIndex1 = rounte[pos2];\r\n\t\t\t\tint nextIndex1 = rounte[pos2+1];\r\n\t\t\t\tif(curIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex == curIndex1) continue;\r\n\t\t\t\tif(nextIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex1 == nextIndex) continue;\r\n\t\t\t\tint betterTimes = 0;\r\n\t\t\t\tTSPSolution solution = new TSPSolution(problem.city_num, problem.obj_num, -1);\r\n\t\t\t\tfor(int j=0;j<problem.obj_num;j++){\r\n\t\t\t\t\tint gain = problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+curIndex1] +\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+nextIndex*problem.city_num+nextIndex1] - \r\n\t\t\t\t\t\t\t(problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+nextIndex]+\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+curIndex1*problem.city_num+nextIndex1]);\r\n\t\t\t\t\tif(gain<0) betterTimes++;\r\n\t\t\t\t\tsolution.object_val[j] = s.object_val[j] + gain;\r\n\t\t\t\t}\r\n\t\t\t\tif(betterTimes==0) continue;\r\n\t\t\t\tsolution.route = s.route.clone();\r\n\r\n\t\t\t\tif(problem.kdSet.add(solution)){\r\n\t\t\t\t\tproblem.converse(pos1, pos2, solution.route, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public SimulationPresenter<Tour> createNewTspSimulationWindow() {\n Algorithm<Tour> algorithm;\n switch (this.getAlgorithmType()) {\n case GENETIC:\n algorithm = algorithmFactory.createTspGeneticAlgorithm(this.getProblemSeed(), problemSize,\n evoAlgoithmSettings);\n break;\n case MEMETIC:\n algorithm = algorithmFactory.createTspMemeticAlgorithm(this.getProblemSeed(), problemSize,\n evoAlgoithmSettings);\n break;\n case NEAREST_NEIGHBOUR:\n algorithm = algorithmFactory.createTspNnAlgorithm(this.getProblemSeed(), problemSize);\n break;\n default:\n return null;\n }\n final TSPSolutionView tspv = new TSPSolutionView();\n return new SimulationPresenter<Tour>(algorithm, tspv);\n }",
"public TTP(String solutionType, String fileName) throws IOException {\n numberOfVariables_ = 2;\n numberOfObjectives_ = 2;\n numberOfConstraints_= 1;\n problemName_ = \"TTP\";\n\n length_ = new int[numberOfVariables_];\n\n //distanceMatrix_ = readProblem(fileName);\n readProblem(fileName);\n\n //System.out.println(numberOfNodes) ;\n //System.out.println(numberOfItems) ;\n length_[0] = numberOfNodes;\n length_[1] = numberOfItems;\n\n upperLimit_ = new double[numberOfItems];\n lowerLimit_ = new double[numberOfItems];\n\n for (int var = 0; var < numberOfItems; var++){\n lowerLimit_[var] = 0.0;\n upperLimit_[var] = 1.0;\n }\n\n if (solutionType.compareTo(\"PermutationArrayInt\") == 0)\n solutionType_ = new PermutationArrayIntSolutionType(this, 1, 1) ;\n else {\n System.out.println(\"Error: solution type \" + solutionType + \" invalid\") ;\n System.exit(-1) ;\n }\n }",
"public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }",
"public TspEnvironment(int nGenerations)\r\n {\r\n//set the number of generations\r\n numberOfGenerations = nGenerations;\r\n//record approximately one best tour for each generation\r\n bestTourNumber = nGenerations;\r\n//create the array to save the best tours in\r\n bestTours = new TspTour[bestTourNumber];\r\n//set the index of best tours to 0\r\n bestIndex = 0;\r\n//create the gene pool\r\n initializeSimulation();\r\n//allocate space for the two arrays based on the numbe rof generations\r\n averageFitnessArray = new double[nGenerations];\r\n bestFitnessArray = new double[nGenerations];\r\n//start the simulation\r\n pFrame = new progressFrame();\r\n\r\n }",
"public void solve()\n {\n //Create a default one, to be the best so far.\n int[] defaultBestPath = new int[MAX_NODES];\n for(int i =0; i < MAX_NODES; ++i)\n defaultBestPath[i] = i;\n double cost = getPathCost(defaultBestPath);\n m_tspBestPath = new TSPPath(MAX_NODES, defaultBestPath, cost);\n\n //Create an empty path to start with.\n int[] empty = new int[MAX_NODES];\n cost = 0;\n TSPPath emptyPath = new TSPPath(0, empty, cost);\n\n //And do the search (it updates m_tspBestPath)\n _search(emptyPath);\n\n }",
"@Test\n public void testGetBestPathResults() {\n System.out.println(\"getBestPathResults\");\n \n Junction originNode = node0;\n Junction destinyNode = node2;\n Vehicle vehicle = vehicle1;\n FastestPathAlgorithm instance = new FastestPathAlgorithm();\n ResultStaticAnalysis expResult = new ResultStaticAnalysis(node0,node2);\n //ResultStaticAnalysis result = instance.getBestPathResults(roadNetwork1, originNode, destinyNode, vehicle1);\n \n //Origin and destiny nodes verification\n //assertEquals(expResult.getOriginNode(), result.getOriginNode());\n //assertEquals(expResult.getDestinyNode(), result.getDestinyNode());\n \n \n //Path PathParcel\n ArrayList<PathParcel> path = new ArrayList<>();\n StaticPathParcel pp1 = new StaticPathParcel(section1);\n pp1.setDirection(SimDirection.direct);\n pp1.setTheoreticalTravelTime(256);\n pp1.setTollCosts(0);\n //pp1.setTheoreticalEnergyConsumption();\n StaticPathParcel pp2 = new StaticPathParcel(section2);\n pp2.setDirection(SimDirection.direct);\n pp2.setTheoreticalTravelTime(600);\n pp2.setTollCosts(0);\n //pp2.setTheoreticalEnergyConsumption();\n path.add(pp1);\n path.add(pp2);\n expResult.setPath(path);\n //assertEquals(expResult.getPath().size(), result.getPath().size());\n //assertEquals(expResult.getPath(), result.getPath());\n\n }",
"public Individual createSingleSolution(){\n\t\t\n\t\tIndividual individual = new Individual(null);\n\t\t\n\t\tdo {\n\t\t\tHashMap<Installation, Integer> remainingVisits = problemData.getRequiredVisits();\n\t\t\tHashMap<Vessel, Voyage[]> schedule = new HashMap<>();\n\t\t\t\n\t\t\tfor (Installation installation : remainingVisits.keySet()) {\n\t\t\t\tSystem.out.println(installation.getName() + \" requires \" + remainingVisits.get(installation) + \" visits.\");\n\t\t\t}\n\t\t\t\n\t\t\twhile (UtilitiesSVPP.moreVisitsRequired(remainingVisits)) {\n\t\t\t\t\n\t\t\t\tVessel vessel = UtilitiesSVPP.pickRandomElementFromList(problemData.vessels, schedule.keySet());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Chartered \" + vessel.getName());\n\t\t\t\tschedule.put(vessel, new Voyage[GenotypeSVPP.NUMBER_OF_DAYS]);\n\t\t\t\t\n\t\t\t\t// Spreads departures by incrementing starting day for each PSV.\n\t\t\t\tint day = schedule.keySet().size()-1;\n\t\t\t\tint remainingDays = vessel.getNumberOfDaysAvailable();\n\t\t\t\t\n\t\t\t\twhile (remainingDays >= 2){\n\t\t\t\t\t// Check if available depot capacity today\n\t\t\t\t\tint depotCapacity = problemData.depotCapacity.get(day);\n\t\t\t\t\tint nDeparturesOnDay = UtilitiesSVPP.getNumberOfDeparturesOnDay(day, schedule);\n\t\t\t\t\tif (nDeparturesOnDay >= depotCapacity){\n\t\t\t\t\t\tday++;\n\t\t\t\t\t\tday = day % GenotypeSVPP.NUMBER_OF_DAYS; // Start at next week\n\t\t\t\t\t\tremainingDays--;\n\t\t\t\t\t\tcontinue; // Move on to next day\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSet<Installation> installationsToVisit = new HashSet<>();\n\t\t\t\t\tfor (Installation installation : remainingVisits.keySet()) {\n\t\t\t\t\t\tif (remainingVisits.get(installation) > 0) installationsToVisit.add(installation);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tVoyage voyage = problemData.voyageByVesselAndInstallationSet.get(vessel).get(installationsToVisit);\n\t\n\t\t\t\t\twhile(voyage == null || remainingDays < voyage.getDuration()){\n\t\t\t\t\t\tInstallation installationToRemove = UtilitiesSVPP.pickRandomElementFromSet(installationsToVisit);\n\t\t\t\t\t\tSystem.out.println(\"Removing installation \" + installationToRemove);\n\t\t\t\t\t\tinstallationsToVisit.remove(installationToRemove);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvoyage = problemData.voyageByVesselAndInstallationSet.get(vessel).get(installationsToVisit);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tschedule.get(vessel)[day] = voyage; // Assign voyage to vessel on this day\n\t\t\t\t\tSystem.out.println(\"Voyage \" + voyage.getNumber() + \" with duration \" + voyage.getDuration() + \" assigned on day \" + day);\n\t\t\t\t\t\n\t\t\t\t\tfor (Installation installation : voyage.getVisitedInstallations()) {\n\t\t\t\t\t\tint remVisitsToInstallation = remainingVisits.get(installation);\n\t\t\t\t\t\tremainingVisits.put(installation, remVisitsToInstallation-1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!UtilitiesSVPP.moreVisitsRequired(remainingVisits)){\n\t\t\t\t\t\tSystem.out.println(\"No more visits required\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tday += voyage.getDuration();\n\t\t\t\t\tday = day % GenotypeSVPP.NUMBER_OF_DAYS; // Start at next week\n\t\t\t\t\tremainingDays -= voyage.getDuration();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (schedule.keySet().size() >= GenotypeSVPP.NUMBER_OF_PSVS) break;\n\t\t\t}\n\t\t\tGenotypeSVPP genotype = new GenotypeSVPP(schedule);\n\t\t\tindividual = new Individual(genotype);\n\n\t\t} while (!problemData.isFeasibleSchedule(individual));\n\t\t\n\t\treturn individual;\n\t}",
"TrafficTreatment treatment();",
"public Solution(Solution ot) {\n\t\tIterator<Path> it = ot.paths.iterator();\n\t\tpaths = new ArrayList<Path>();\n\t\twhile(it.hasNext()) {\n\t\t\tPath p = new Path(it.next());\n\t\t\tpaths.add(p);\n\t\t}\n\t\ttime = ot.time;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translate Java Swing user interface. | public static void translate() {
UIManager.put("OptionPane.yesButtonText", Messages.getString("Translator.1")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("OptionPane.cancelButtonText", Messages.getString("Translator.3")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("OptionPane.noButtonText", Messages.getString("Translator.5")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("OptionPane.okButtonText", Messages.getString("Translator.7")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.cancelButtonText", Messages.getString("Translator.9")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.cancelButtonToolTipText", Messages.getString("Translator.11")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.detailsViewButtonToolTipText", Messages.getString("Translator.44")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.detailsViewButtonAccessibleName", Messages.getString("Translator.46")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileAttrHeaderText", Messages.getString("Translator.56")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileDateHeaderText", Messages.getString("Translator.54")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileNameHeaderText", Messages.getString("Translator.48")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileNameLabelMnemonic", Integer.valueOf('N')); // N //$NON-NLS-1$
UIManager.put("FileChooser.fileNameLabelText", Messages.getString("Translator.23")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileSizeHeaderText", Messages.getString("Translator.50")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf('T')); // T //$NON-NLS-1$
UIManager.put("FileChooser.filesOfTypeLabelText", Messages.getString("Translator.26")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileTypeHeaderText", Messages.getString("Translator.52")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.homeFolderToolTipText", "Desktop"); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.homeFolderAccessibleName", "Desktop"); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.listViewButtonToolTipText", Messages.getString("Translator.40")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.listViewButtonAccessibleName", Messages.getString("Translator.42")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.lookInLabelMnemonic", Integer.valueOf('E')); //$NON-NLS-1$
UIManager.put("FileChooser.lookInLabelText", Messages.getString("Translator.18")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.newFolderToolTipText", Messages.getString("Translator.36")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.newFolderAccessibleName", Messages.getString("Translator.38")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.openButtonToolTipText", Messages.getString("Translator.0")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.openButtonAccessibleName", Messages.getString("Translator.0")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.openButtonText", Messages.getString("Translator.0")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.saveButtonText", Messages.getString("Translator.13")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.saveButtonToolTipText", Messages.getString("Translator.15")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.saveInLabelText", Messages.getString("Translator.20")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.upFolderToolTipText", Messages.getString("Translator.28")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.upFolderAccessibleName", Messages.getString("Translator.30")); //$NON-NLS-1$ //$NON-NLS-2$
} | [
"public static String _translategui() throws Exception{\nif ((mostCurrent._main._lang /*String*/ ).equals(\"es\")) { \r\n //BA.debugLineNum = 83;BA.debugLine=\"lblTeam.Text = \\\"El equipo GeoVin\\\"\";\r\nmostCurrent._lblteam.setText(BA.ObjectToCharSequence(\"El equipo GeoVin\"));\r\n //BA.debugLineNum = 84;BA.debugLine=\"Label2.Text = \\\"Colaboradores\\\"\";\r\nmostCurrent._label2.setText(BA.ObjectToCharSequence(\"Colaboradores\"));\r\n //BA.debugLineNum = 85;BA.debugLine=\"lblLicencia.Text = \\\"Todos los datos enviados por\";\r\nmostCurrent._lbllicencia.setText(BA.ObjectToCharSequence(\"Todos los datos enviados por los usuarios, a excepciΓ³n de sus datos personales, serΓ‘n compartidos bajo la licencia CC-BY-NC\"));\r\n //BA.debugLineNum = 86;BA.debugLine=\"lblMainText.Text = \\\"GeoVin es una aplicaciΓ³n pΓΊb\";\r\nmostCurrent._lblmaintext.setText(BA.ObjectToCharSequence(\"GeoVin es una aplicaciΓ³n pΓΊblica y gratuita, y su fin es orientar a todo tipo de usuarios en la identificaciΓ³n de posibles vinchucas que encuentren y que puedan implicar un riesgo epidemiolΓ³gico. En base a los datos que se registren de localizaciones de las diferentes especies de vinchucas, la aplicaciΓ³n elabora mapas geogrΓ‘ficos donde el usuario podrΓ‘ visibilizar sus hallazgos junto con los de otros usuarios. Toda la informaciΓ³n utilizada para la elaboraciΓ³n de la App βGeoVinβ fue obtenida a partir de publicaciones cientΓficas, datos cedidos por colegas y datos propios del Laboratorio de Triatominos del Centro de Estudios ParasitolΓ³gicos y de Vectores (CEPAVE).\"));\r\n //BA.debugLineNum = 87;BA.debugLine=\"lblColaboran.Text = \\\"Colaboraron en su elaboraci\";\r\nmostCurrent._lblcolaboran.setText(BA.ObjectToCharSequence(\"Colaboraron en su elaboraciΓ³n\"));\r\n //BA.debugLineNum = 88;BA.debugLine=\"lblCeReVe.Text = \\\"Y el Centro de Referencia de V\";\r\nmostCurrent._lblcereve.setText(BA.ObjectToCharSequence(\"Y el Centro de Referencia de Vectores (CeReVe), CoordinaciΓ³n Nacional de Vectores, Ministerio de Salud de la NaciΓ³n.\"));\r\n //BA.debugLineNum = 89;BA.debugLine=\"lblFinancian.Text = \\\"Con el financiamiento de\\\"\";\r\nmostCurrent._lblfinancian.setText(BA.ObjectToCharSequence(\"Con el financiamiento de\"));\r\n //BA.debugLineNum = 90;BA.debugLine=\"lblOMS.Text = \\\"Con el apoyo de la OrganizaciΓ³n M\";\r\nmostCurrent._lbloms.setText(BA.ObjectToCharSequence(\"Con el apoyo de la OrganizaciΓ³n Mundial de la Salud (OMS)\"));\r\n }else if((mostCurrent._main._lang /*String*/ ).equals(\"en\")) { \r\n //BA.debugLineNum = 92;BA.debugLine=\"lblTeam.Text = \\\"GeoVin Team\\\"\";\r\nmostCurrent._lblteam.setText(BA.ObjectToCharSequence(\"GeoVin Team\"));\r\n //BA.debugLineNum = 93;BA.debugLine=\"Label2.Text = \\\"Collaborators\\\"\";\r\nmostCurrent._label2.setText(BA.ObjectToCharSequence(\"Collaborators\"));\r\n //BA.debugLineNum = 94;BA.debugLine=\"lblLicencia.Text = \\\"All data sent by users, exce\";\r\nmostCurrent._lbllicencia.setText(BA.ObjectToCharSequence(\"All data sent by users, except any personal information, can be shared under a CC-BY-NC license\"));\r\n //BA.debugLineNum = 95;BA.debugLine=\"lblMainText.Text = \\\"GeoVin is a free app, to gui\";\r\nmostCurrent._lblmaintext.setText(BA.ObjectToCharSequence(\"GeoVin is a free app, to guide users in the identification of kissing bugs that might represent an epidemiological issue. With the help of the reports, the project generates open and free geographical maps of the distribution of kissing bugs. All information collected by the βGeoVinβ team, also shown in the maps was collected from museums, articles and data collected by the Laboratorio de Triatominos of the Centro de Estudios ParasitolΓ³gicos y de Vectores (CEPAVE, Argentina).\"));\r\n //BA.debugLineNum = 96;BA.debugLine=\"lblColaboran.Text = \\\"Collaborated in its creatio\";\r\nmostCurrent._lblcolaboran.setText(BA.ObjectToCharSequence(\"Collaborated in its creation\"));\r\n //BA.debugLineNum = 97;BA.debugLine=\"lblCeReVe.Text = \\\"And the Centro de Referencia d\";\r\nmostCurrent._lblcereve.setText(BA.ObjectToCharSequence(\"And the Centro de Referencia de Vectores (CeReVe), CoordinaciΓ³n Nacional de Vectores, Ministerio de Salud de la NaciΓ³n.\"));\r\n //BA.debugLineNum = 98;BA.debugLine=\"lblFinancian.Text = \\\"Financed by\\\"\";\r\nmostCurrent._lblfinancian.setText(BA.ObjectToCharSequence(\"Financed by\"));\r\n //BA.debugLineNum = 99;BA.debugLine=\"lblOMS.Text = \\\"With the support of the World Hea\";\r\nmostCurrent._lbloms.setText(BA.ObjectToCharSequence(\"With the support of the World Healt Organization (WHO)\"));\r\n };\r\n //BA.debugLineNum = 102;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}",
"private void reloadUI() {\n\t\tMessages.reloadUIi18n(uis);\n\t}",
"public void updateUI() {\n if (ui != null) {\n removeKeymap(ui.getClass().getName());\n }\n setUI(UIManager.getUI(this));\n }",
"public void translate(){\n\t}",
"public void updateI18N() {\n\t\t/* Update I18N in the menuStructure */\n\t\tappMenu.updateI18N();\n\t\t/* Pack all */\n\t\tLayoutShop.packAll(shell);\n\t}",
"private void setComponentTexts(){\n\t\tsetTitle(translations.getRegexFileChanger());\n\t\tbuttonCopyToClipboard.setText(translations.getCopyToClipboard());\n\t\tregexTo.setToolTipText(wrapHTML(translations.getRegexToInfo()));\n\t\tregexFrom.setToolTipText(wrapHTML(translations.getRegexFromInfo()));\n\t\tregexFromLabel.setText(translations.getGiveRegexFrom());\n\t\tregexToLabel.setText(translations.getGiveRegexTo());\n\t\tgiveRegexLabel.setText(translations.getBelowGiveRegexRules());\n\t\tbuttonChooseDestinationDirectory.setText(translations.getChooseDestinationDirectory());\n\t\tbuttonSimulateChangeFileNames.setToolTipText(wrapHTML(translations.getSimulateFileChangesInfo()));\n\t\tbuttonSimulateChangeFileNames.setText(translations.getSimulateChangeNames());\n\t\tbuttonChangeFileNames.setToolTipText(wrapHTML(translations.getChangeFileNamesInfo()));\n\t\tbuttonChangeFileNames.setText(translations.getChangeNames());\n\t\tbuttonCopyToClipboard.setToolTipText(wrapHTML(translations.getCopyToClipBoardInfo()));\n\t\tbuttonCopyToClipboard.setText(translations.getCopyToClipboard());\n\t\tbuttonResetToDefaults.setToolTipText(wrapHTML(translations.getResetToDefaultsInfo()));\n\t\tbuttonResetToDefaults.setText(translations.getDeleteSettings());\n\t\tbuttonExample.setText(translations.getShowExample());\n\t\tbuttonExample.setToolTipText(translations.getButtonShowExSettings());\n\t\tcheckboxSaveStateOn.setToolTipText(wrapHTML(translations.getSaveStateCheckBoxInfo()));\n\t\tcheckboxSaveStateOn.setText(translations.getSaveStateOnExit());\n\t\tchooseLanguageLabel.setText(translations.getChooseLanguage());\n\t\tsetDirectoryInfoLabel(translations.getSeeChoosedDirPath());\n\t\tcheckboxRecursiveSearch.setText(translations.getRecursiveSearch());\n\t\tcheckboxRecursiveSearch.setToolTipText(translations.getRecursiveSearchToolTip());\n\t\tcheckboxShowFullPath.setToolTipText(translations.getShowFullPathCheckboxTooltip());\n\t\tcheckboxShowFullPath.setText(translations.getShowFullPathCheckbox());\n\t\tbuttonClear.setText(translations.getButtonClear());\n\t\tbuttonClear.setToolTipText(translations.getButtonClearTooltip());\n\t}",
"public void updateUI() {\n\t\tsuper.updateUI();\n\t\taddClipboardHotkeys();\n\t}",
"private void addComponents() {\r\n\r\n\t\t// Sets the layout\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\t// Adds the components to the window with the layout\r\n\t\tGridBagConstraints constraints = new GridBagConstraints();\r\n\t\tconstraints.insets = new Insets(5, 5, 5, 5);\r\n\t\tconstraints.fill = GridBagConstraints.BOTH;\r\n\t\tconstraints.weightx = 500;\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 0;\r\n\r\n\t\t_infoPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s631\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 1;\r\n\r\n\t\t_infoPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s632\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 2;\r\n\r\n\t\t_infoPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s633\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 3;\r\n\r\n\t\t_infoPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s634\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 4;\r\n\r\n\t\t_infoPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s635\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 0;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s626\")), constraints);\r\n\r\n\t\tconstraints.insets = new Insets(5, 25, 5, 5);\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 1;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s627\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 2;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s628\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 3;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s629\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 4;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s966\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 5;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s967\")), constraints);\r\n\t\t\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 6;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1100\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 7;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1101\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 8;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1102\")), constraints);\r\n\t\t\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 9;\r\n\t\t\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1103\")), constraints);\r\n\t\t\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 10;\r\n\t\t\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1104\")), constraints);\r\n\t\t\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 11;\r\n\t\t\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1105\")), constraints);\r\n\t\t\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 12;\r\n\t\t\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1106\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 13;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1107\")), constraints);\r\n\t\t\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 14;\r\n\t\t\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s1108\")), constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 15;\r\n\r\n\t\t_developersPanel.add(new JLabel(AcideLanguageManager.getInstance()\r\n\t\t\t\t.getLabels().getString(\"s2388\")), constraints);\r\n\t\t\r\n\t\tconstraints.insets = new Insets(5, 5, 5, 5);\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 0;\r\n\r\n\t\t// Adds the info panel to the main panel\r\n\t\t_mainPanel.add(_infoPanel, constraints);\r\n\r\n\t\tconstraints.gridx = 0;\r\n\t\tconstraints.gridy = 1;\r\n\r\n\t\t// Adds the developers panel to the main panel\r\n\t\t_mainPanel.add(_developersPanel, constraints);\r\n\r\n\t\t// Adds the image label to the window\r\n\t\tadd(_image, BorderLayout.NORTH);\r\n\r\n\t\t// Adds the main panel to the window\r\n\t\tadd(_mainPanel, BorderLayout.CENTER);\r\n\r\n\t\t// Adds the accept button to the button panel\r\n\t\t_buttonPanel.add(_acceptButton);\r\n\r\n\t\t// Adds the button panel to the window\r\n\t\tadd(_buttonPanel, BorderLayout.SOUTH);\r\n\t}",
"private void Tr_langMenuItemMouseDragged(java.awt.event.MouseEvent evt) {\n this.language(\"Tr_\");\n currentLanguage = \"Tr_\";\n }",
"private void setLanguageScreen(){\n\t\t\n\t\tscreenUI.clearScreen();\n\t\tscreenUI.drawText(2, 1, \"Choose a language/Wybierz jΔzyk:\");\n\t\tscreenUI.drawText(1, 3, \"[a]: English\");\n\t\tscreenUI.drawText(1, 4, \"[b]: Polski\");\n\t}",
"@Override\r\n public void refreshLanguage() {\r\n for (AbstractButton abs : menuAndItemList) {\r\n abs.setText(messageSource.getMessage(abs.getName(), null, applicationLocale.getLocale()));\r\n }\r\n }",
"public void updateLanguage() {\r\n this.title.setText(LanguageStringMap.get().getMap().get(TITLE_KEY));\r\n this.instr.setText(LanguageStringMap.get().getMap().get(INSTRUCTIONS_KEY));\r\n this.back.setText(LanguageStringMap.get().getMap().get(BACK_KEY));\r\n }",
"public transframe() {\n initComponents();\n }",
"private void addComponents() {\n\t\t\n\t\t// Create TextArea for input.\n\t\tinputTextArea = new JTextArea();\n\t\tinputTextArea.setToolTipText(\"Write you message here.\");\n JScrollPane inputScrollPane = new JScrollPane(inputTextArea);\n\t\tadd(inputScrollPane, BorderLayout.PAGE_START);\n\t\t\n\t\t// Create Button for converting.\n\t\tconvertButton = new JButton(\"Convert to Binary\");\n\t\tconvertButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tconvertButton.addActionListener(this);\n\t\tadd(convertButton, BorderLayout.CENTER);\n\t\t\n\t\t// Create TextArea for output.\n\t\toutputTextArea = new JTextArea();\n\t\toutputTextArea.setEditable(false);\n JScrollPane outputScrollPane = new JScrollPane(outputTextArea);\n\t\tadd(outputScrollPane, BorderLayout.PAGE_END);\n\t}",
"public void updateLanguage() {\n buttonPlay.setText(GameConfiguration.getText(\"playButton\"));\n buttonSettings.setText(GameConfiguration.getText(\"settingsButton\"));\n buttonHighScores.setText(GameConfiguration.getText(\"highScores\"));\n }",
"public void setSwingCode(String v) {this.swingCode = v;}",
"@Override\n public void updateLanguage() {\n if (isEnglish) {\n languageButton.setText(R.string.alien_painter_language_chinese);\n exitButton.setText(R.string.alien_painter_exit);\n retryButton.setText(R.string.alien_painter_retry);\n scoreboardButton.setText(R.string.alien_painter_scoreboard_button);\n painterTextViewInstructions.setText(R.string.alien_painter_instructions);\n replayButton.setText(R.string.alien_painter_replay);\n } else {\n languageButton.setText(R.string.alien_painter_language_english);\n exitButton.setText(R.string.alien_painter_exit_chinese);\n retryButton.setText(R.string.alien_painter_retry_chinese);\n scoreboardButton.setText(R.string.alien_painter_scoreboard_button_chinese);\n painterTextViewInstructions.setText(R.string.alien_painter_instructions_chinese);\n replayButton.setText(R.string.alien_painter_replay_chinese);\n }\n }",
"public void setTextOfMenuComponents() {\r\n\r\n\t\t// Sets the language menu text\r\n\t\t_languageMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s6\"));\r\n\r\n\t\t// Sets the language menu items text\r\n\t\t_languageMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the console menu text\r\n\t\t_consoleMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s332\"));\r\n\r\n\t\t// Sets the console menu items text\r\n\t\t_consoleMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the graph panel menu text\r\n\t\t_graphPanelMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s2231\"));\r\n\r\n\t\t// Sets the graph panel menu items text\r\n\t\t_graphPanelMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the debug panel menu text\r\n\t\t_debugPanelMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s2243\"));\r\n\r\n\t\t// Sets the debug panel menu items text\r\n\t\t_debugPanelMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the database panel menu text\r\n\t\t_databasePanelMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s2159\"));\r\n\r\n\t\t// Sets the console menu items text\r\n\t\t_databasePanelMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the file editor menu text\r\n\t\t_fileEditorMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s1045\"));\r\n\r\n\t\t// Sets the file editor menu items text\r\n\t\t_fileEditorMenu.setTextOfMenuComponets();\r\n\r\n\t\t// Sets the menu menu text\r\n\t\t_menuMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s34\"));\r\n\r\n\t\t// Sets the menu menu items text\r\n\t\t_menuMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the tool bar menu text\r\n\t\t_toolBarMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s169\"));\r\n\r\n\t\t// Sets the tool bar menu items text\r\n\t\t_toolBarMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the theme menu text\r\n\t\t_themeMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s2380\"));\r\n\r\n\t\t// Sets the theme menu items text\r\n\t\t_themeMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the lexicon menu text\r\n\t\t_lexiconMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s224\"));\r\n\r\n\t\t// Sets the lexicon menu items text\r\n\t\t_lexiconMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the grammar menu text\r\n\t\t_grammarMenu.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s225\"));\r\n\r\n\t\t// Sets the grammar menu items text\r\n\t\t_grammarMenu.setTextOfMenuComponents();\r\n\r\n\t\t// Sets the compiler menu item text\r\n\t\t_compilerMenuItem.setText(AcideLanguageManager.getInstance().getLabels().getString(\"s240\"));\r\n\r\n\t\tIterator<AcideMenuObjectConfiguration> it = _insertedObjects.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tAcideMenuObjectConfiguration ob = it.next();\r\n\t\t\tif (ob.isSubmenu()) {\r\n\t\t\t\t_insertedMenus.get(ob.getName()).setText(ob.getName());\r\n\t\t\t\t_insertedMenus.get(ob.getName()).setTextOfMenuComponents();\r\n\t\t\t} else {\r\n\t\t\t\t_insertedItems.get(ob.getName()).setText(ob.getName());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Action(selectedProperty = TRANSLATION_PAINTING)\r\n public void toggleTranslations (ActionEvent e)\r\n {\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws the boad lines and the pieces as per their locations. Drawing of lines is provided, students to implement drawing of pieces and number of goats. | private void drawBoard()
{
sc.drawRectangle(0,0,brdSize,brdSize,Color.BLUE); //wipe the canvas
//draw shadows of Goats and Tigers - not compulsory //////////////////////
// Draw the lines
for(int i=1; i<9; i++)
{
//diagonal and middle line
sc.drawLine(locs[i-1][0]*bkSize, locs[i-1][1]*bkSize,
locs[i+15][0]*bkSize, locs[i+15][1]*bkSize, Color.red);
if(i==4 || i==8) continue; //no more to draw at i=4,8
// vertical line
sc.drawLine(i*bkSize, i*bkSize,
i*bkSize, brdSize-i*bkSize,Color.white);
// horizontal line
sc.drawLine(i*bkSize, i*bkSize,
brdSize-i*bkSize, i*bkSize, Color.white);
}
// TODO 10
// Draw the goats and tigers. (Drawing the shadows is not compulsory)
// Display the number of goats
sc.drawString("Number of Goats: "+rules.getNumGoats(), brdSize/2-60, brdSize-20, Color.GREEN);
for (int i = 0; i < 24; i++) {
if (bd.isGoat(i)) {
sc.drawDisc(locs[i][0]*bkSize,locs[i][1]*bkSize ,bkSize/2, Color.RED);
}
else if (!bd.isVacant(i)) {
sc.drawDisc(locs[i][0]*bkSize,locs[i][1]*bkSize ,bkSize/2, Color.YELLOW);
}
}
} | [
"public void drawLocations()\r\n {\r\n WGraphics wg;\r\n //VisFrame Vz2 = new VisFrame();\r\n wg = new WGraphics(500, 500, minx, miny, maxx, maxy);\r\n\r\n wg.clear();\r\n\r\n for (int i = 1; i <= nClients; i++)\r\n {\r\n wg.drawMark(coordClient[i][0], coordClient[i][1], Color.blue);\r\n// Ellipse2D.Double client2 = new Ellipse2D.Double(coordClient[i][0], coordClient[i][1],2,2);\r\n// Vz2.getPanel().drawShape(client2);\r\n }\r\n\r\n for (int j = 1; j <= nDepots; j++)\r\n {\r\n wg.drawMark(coordDepot[j][0], coordDepot[j][1], Color.red);\r\n// Rectangle2D.Double depot2 = new Rectangle2D.Double(coordDepot[j][0], coordDepot[j][1],5,5);\r\n// Vz2.getPanel().drawShape(depot2);\r\n }\r\n\r\n for (int k = 1; k < numPointsBoundary; k++)\r\n {\r\n wg.drawLine(coordBoundary[k][0], coordBoundary[k][1], coordBoundary[k + 1][0], coordBoundary[k + 1][1],\r\n Color.black);\r\n// Line2D.Double line2= new Line2D.Double(coordBoundary[k][0], coordBoundary[k][1], coordBoundary[k + 1][0], coordBoundary[k + 1][1]);\r\n// Vz2.getPanel().drawLine(line2);\r\n }\r\n\r\n }",
"private void drawLines() {\r\n\t\t\tdouble x = getWidth()/2 ;\r\n\t\t\tdouble y = getHeight()/2 -rectHeight;\r\n\t\t\tdouble x2 = getWidth()/2 - 2*rectWidth -rectSpace;\r\n\t\t\tdouble y2 = getHeight()/2 + rectHeight;\r\n\t\t\tdouble y3 = y2;\r\n\t\t\tdouble x4 = getWidth()/2 + rectSpace + 2*rectWidth;\r\n\t\t\tGLine line1 = new GLine(x,y,x2,y2);;\r\n\t\t\tadd(line1);\r\n\t\t\tGLine line2= new GLine (x,y,x,y3);\r\n\t\t\tadd(line2);\r\n\t\t\tGLine line3 = new GLine(x,y,x4,y3);\r\n\t\t\tadd(line3);\r\n\t\t}",
"private void paintBoard(Board board, Graphics g, int xLocOnBoard) {\n Graphics2D g2 = (Graphics2D) g;\n\n g2.setRenderingHint(\n RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g2.setColor(Color.BLACK);\n\n //The lines and border\n for (int i = 0; i < board.getSize(); i++) {\n for (int j = 0; j < board.getSize(); j++) {\n g2.drawRect(xLocOnBoard + (j * HUNDRED), HUNDRED + (i * HUNDRED), HUNDRED, HUNDRED);\n }\n }\n\n for (int i = 0; i < board.getSize(); i++) {\n for (int j = 0; j < board.getSize(); j++) {\n\n int middleX = (((xLocOnBoard + (j * HUNDRED)) + (xLocOnBoard + HUNDRED + (j * HUNDRED))) / 2);\n int middleY = (HUNDRED + (i * HUNDRED) + TWOHUNDRED + (i * HUNDRED)) / 2;\n\n int firstX = xLocOnBoard + (j * HUNDRED);\n int firstY = HUNDRED + (i * HUNDRED);\n int secondX = xLocOnBoard + HUNDRED + (j * HUNDRED);\n int secondY = HUNDRED + (i * HUNDRED);\n\n int xPoints1[] = {firstX, secondX, middleX};\n int yPoints1[] = {firstY, secondY, middleY};\n\n if (board.getBrick(i, j) != null) {\n\n drawBorder(g, firstX, firstY, secondX, secondY, middleX, middleY);\n\n\n g2.setColor(chooseColor(board.getBrick(i, j).getUp()));\n g2.fillPolygon(xPoints1, yPoints1, 3);\n g2.setColor(new Color(46, 46, 46));\n g2.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n g2.drawString(Integer.toString(board.getBrick(i, j).getUp()), middleX - 7, ((middleY + firstY) / 2) + 5);\n\n firstX = xLocOnBoard + HUNDRED + (j * HUNDRED);\n firstY = HUNDRED + (i * HUNDRED);\n secondX = xLocOnBoard + HUNDRED + (j * HUNDRED);\n secondY = TWOHUNDRED + (i * HUNDRED);\n\n drawBorder(g, firstX, firstY, secondX, secondY, middleX, middleY);\n\n int xPoints2[] = {firstX, secondX, middleX};\n int yPoints2[] = {firstY, secondY, middleY};\n g2.setColor(chooseColor(board.getBrick(i, j).getRight()));\n g2.fillPolygon(xPoints2, yPoints2, 3);\n g2.setColor(new Color(46, 46, 46));\n\n g2.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n g2.drawString(Integer.toString(board.getBrick(i, j).getRight()), (middleX + firstX) / 2, middleY + 5);\n\n firstX = xLocOnBoard + HUNDRED + (j * HUNDRED);\n firstY = TWOHUNDRED + (i * HUNDRED);\n secondX = xLocOnBoard + (j * HUNDRED);\n secondY = TWOHUNDRED + (i * HUNDRED);\n\n drawBorder(g, firstX, firstY, secondX, secondY, middleX, middleY);\n\n int xPoints3[] = {firstX, secondX, middleX};\n int yPoints3[] = {firstY, secondY, middleY};\n g2.setColor(chooseColor(board.getBrick(i, j).getDown()));\n g2.fillPolygon(xPoints3, yPoints3, 3);\n g2.setColor(new Color(46, 46, 46));\n g2.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n g2.drawString(Integer.toString(board.getBrick(i, j).getDown()), middleX - 7, ((middleY + firstY) / 2) + 15);\n\n firstX = xLocOnBoard + (j * HUNDRED);\n firstY = TWOHUNDRED + (i * HUNDRED);\n secondX = xLocOnBoard + (j * HUNDRED);\n secondY = HUNDRED + (i * HUNDRED);\n\n drawBorder(g, firstX, firstY, secondX, secondY, middleX, middleY);\n\n int xPoints4[] = {firstX, secondX, middleX};\n int yPoints4[] = {firstY, secondY, middleY};\n g2.setColor(chooseColor(board.getBrick(i, j).getLeft()));\n g2.fillPolygon(xPoints4, yPoints4, 3);\n g2.setColor(new Color(46, 46, 46));\n\n g2.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n g2.drawString(Integer.toString(board.getBrick(i, j).getLeft()), ((middleX + firstX) / 2) - 12, middleY + 5);\n\n }\n }\n\n }\n\n }",
"private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }",
"public void drawBoard() {\n\n GraphicsContext g = getGraphicsContext2D();\n g.setFill( Color.LIGHTGRAY ); // fill canvas with light gray\n g.fillRect(0,0,314,314);\n\n /* Draw lines separating the square and along the edges of the canvas. */\n\n g.setStroke(Color.BLACK);\n g.setLineWidth(2);\n for (int i = 0; i <= 13; i++) {\n g.strokeLine(1 + 24*i, 0, 1 + 24*i, 314);\n g.strokeLine(0, 1 + 24*i, 314, 1 + 24*i);\n }\n\n /* Draw the pieces that are on the board. */\n\n for (int row = 0; row < 13; row++)\n for (int col = 0; col < 13; col++)\n if (boardData[row][col] != EMPTY)\n drawPiece(g, boardData[row][col], row, col);\n\n }",
"public void drawAssigments(int[] assig)\r\n {\r\n // WGraphics wg;\r\n VisFrame Vz = new VisFrame();\r\n // wg = new WGraphics(400, 400, minx, miny, maxx, maxy);\r\n boolean depotOpen[] = new boolean[nDepots + 1];\r\n\r\n int d;\r\n for (int i = 1; i <= nClients; i++)\r\n {\r\n d = assig[i - 1];\r\n depotOpen[d] = true;\r\n // wg.drawLine(coordClient[i][0],coordClient[i][1],coordDepot[d][0],coordDepot[d][1], Color.lightGray);\r\n Line2D.Double line= new Line2D.Double(coordClient[i][0],coordClient[i][1],coordDepot[d][0],coordDepot[d][1]);\r\n Vz.getPanel().drawLine(line);\r\n \r\n //wg.drawMark(coordDepot[d][0], coordDepot[d][1], Color.red);\r\n Rectangle2D.Double depot = new Rectangle2D.Double(coordDepot[d][0], coordDepot[d][1],4,4);\r\n Vz.getPanel().drawShape(depot);\r\n \r\n //wg.drawMark(coordClient[i][0], coordClient[i][1], Color.blue);\r\n Ellipse2D.Double client = new Ellipse2D.Double(coordClient[i][0], coordClient[i][1],4,4);\r\n Vz.getPanel().drawShape(client);\r\n }\r\n\r\n for (int j = 1; j <= nDepots; j++)\r\n {\r\n if (depotOpen[j])\r\n {\r\n \t//wg.drawMark(coordDepot[j][0], coordDepot[j][1], Color.red);\r\n \tRectangle2D.Double depot2 = new Rectangle2D.Double(coordDepot[j][0], coordDepot[j][1],4,4);\r\n Vz.getPanel().drawShape(depot2);\r\n }\r\n \r\n }\r\n\r\n for (int k = 1; k < numPointsBoundary; k++)\r\n {\r\n// wg.drawLine(coordBoundary[k][0], coordBoundary[k][1], coordBoundary[k + 1][0], coordBoundary[k + 1][1],\r\n// Color.black);\r\n Line2D.Double line2= new Line2D.Double(coordBoundary[k][0], coordBoundary[k][1], coordBoundary[k + 1][0], coordBoundary[k + 1][1]);\r\n Vz.getPanel().drawLine(line2);\r\n }\r\n Vz.getPanel().repaint();\r\n }",
"public void draw()\n {\n StdDraw.setXscale(0, size);\n StdDraw.setYscale(0, size);\n StdDraw.enableDoubleBuffering();\n\n if (start != null)\n {\n StdDraw.setPenColor(StdDraw.GREEN);\n start.draw();\n }\n if (end != null)\n {\n StdDraw.setPenColor(StdDraw.RED);\n end.draw();\n }\n\n StdDraw.setPenColor(StdDraw.BLACK);\n for (int x = 0; x < size; ++x)\n {\n for (int y = 0; y < size; ++y)\n {\n if (left[x][y])\n StdDraw.line(x, y, x, y + 1);\n if (right[x][y])\n StdDraw.line(x + 1, y, x + 1, y + 1);\n if (up[x][y])\n StdDraw.line(x, y + 1, x + 1, y + 1);\n if (down[x][y])\n StdDraw.line(x, y, x + 1, y);\n }\n }\n StdDraw.show();\n\n StdDraw.setPenColor(StdDraw.GRAY);\n if (drawVisited)\n {\n for (Cell cell : visitedPath)\n {\n if (cell.equals(start) || cell.equals(end))\n continue;\n cell.draw();\n StdDraw.show();\n StdDraw.pause(30);\n }\n }\n\n StdDraw.setPenColor(StdDraw.BLUE);\n if (solutionPath != null)\n {\n for (Cell cell : solutionPath)\n {\n if (cell.equals(start) || cell.equals(end))\n continue;\n cell.draw();\n StdDraw.show();\n StdDraw.pause(10);\n }\n }\n }",
"public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void drawLine()\r\n {\r\n double H = markX.getHeight();\r\n double W = markX.getWidth();\r\n double h = H / mapData.length;\r\n double w = W / mapData[0].length;\r\n GraphicsContext gc=markX.getGraphicsContext2D();\r\n \r\n String move=solution[1];\r\n double x= airplaneX.getValue()*w+10*w;\r\n double y=airplaneY.getValue()*-h+6*h;\r\n for(int i=2;i<solution.length;i++)\r\n {\r\n switch (move)\r\n {\r\n case \"Right\":\r\n gc.setStroke(Color.BLACK.darker());\r\n gc.strokeLine(x, y, x + w, y);\r\n x += w;\r\n break;\r\n case \"Left\":\r\n gc.setStroke(Color.BLACK.darker());\r\n gc.strokeLine(x, y, x - w, y);\r\n x -= w;\r\n break;\r\n case \"Up\":\r\n gc.setStroke(Color.BLACK.darker());\r\n gc.strokeLine(x, y, x, y - h);\r\n y -= h;\r\n break;\r\n case \"Down\":\r\n gc.setStroke(Color.BLACK.darker());\r\n gc.strokeLine(x, y, x, y + h);\r\n y += h;\r\n }\r\n move=solution[i];\r\n }\r\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next ShapeοΌ\", d.width*13/20, d.width*3/40);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width/2);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*3/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*7/10);\n }",
"private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}",
"private void drawChallengerPanel() {\n\n int startRow = 4;\n String divider = \"+------------------------------------------------------------------------------------------------------------------------------------------+\";\n String empty = \"| |\";\n\n for(int row = startRow; row <= 56; row++) {\n\n if(row == 4 || row == 8 || row == 56) {\n print( row, 8, divider, BLUE_GREEN_C);\n } else {\n print(row, 8, empty, BLUE_GREEN_C);\n }\n\n\n }\n\n fillChallengerPanel();\n }",
"private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }",
"private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }",
"public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}",
"private void drawLines(DrawPane drawPane) {\r\n\r\n\r\n drawPane.erase();\r\n\r\n int lineWidth = (Integer) lineStyleDynamicForm.getValue(\"lineWidth\");\r\n String lineStyle = (String) lineStyleDynamicForm.getValue(\"lineStyle\");\r\n String arrowheadStyle = (String) lineStyleDynamicForm.getValue(\"arrowheadStyle\");\r\n \r\n LineCap lineCap = null;\r\n \r\n if(LineCap.BUTT.getValue().equals(arrowheadStyle)){\r\n lineCap = LineCap.BUTT;\r\n } else if(LineCap.ROUND.getValue().equals(arrowheadStyle)){\r\n lineCap = LineCap.ROUND;\r\n } else if(LineCap.SQUARE.getValue().equals(arrowheadStyle)){\r\n lineCap = LineCap.SQUARE;\r\n }\r\n \r\n LinePattern linePattern = null;\r\n \r\n if(LinePattern.DASH.getValue().equals(lineStyle)){\r\n linePattern = LinePattern.DASH;\r\n } else if(LinePattern.DOT.getValue().equals(lineStyle)){\r\n linePattern = LinePattern.DOT;\r\n } else if(LinePattern.LONGDASH.getValue().equals(lineStyle)){\r\n linePattern = LinePattern.LONGDASH;\r\n } else if(LinePattern.SHORTDASH.getValue().equals(lineStyle)){\r\n linePattern = LinePattern.SHORTDASH;\r\n } else if(LinePattern.SHORTDOT.getValue().equals(lineStyle)){\r\n linePattern = LinePattern.SHORTDOT;\r\n } else if(LinePattern.SOLID.getValue().equals(lineStyle)){\r\n linePattern = LinePattern.SOLID;\r\n } \r\n \r\n \r\n DrawLine drawLine = new DrawLine();\r\n drawLine.setDrawPane(drawPane);\r\n drawLine.setStartPoint(new Point(20,30));\r\n drawLine.setEndPoint(new Point(180,160));\r\n drawLine.setLineWidth(lineWidth);\r\n drawLine.setLineCap(lineCap);\r\n drawLine.setLinePattern(linePattern);\r\n drawLine.draw();\r\n \r\n DrawLinePath drawLinePath = new DrawLinePath();\r\n drawLinePath.setDrawPane(drawPane);\r\n drawLinePath.setStartTop(40);\r\n drawLinePath.setStartLeft(170);\r\n drawLinePath.setEndLeft(340);\r\n drawLinePath.setEndTop(160);\r\n drawLinePath.setLineWidth(lineWidth);\r\n drawLinePath.setLineCap(lineCap);\r\n drawLinePath.setLinePattern(linePattern);\r\n drawLinePath.draw();\r\n }",
"@Override\n public void drawAll(Graphics2D g2) {\n g2.setColor(color);\n //Paints all the lines\n int i = 0;\n for (int x = 0; x < lineContainer.size(); x++)\n {\n g2.draw(lineContainer.get(x));\n \n }\n }",
"private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }",
"public void drawnextPoints() {\n\t\t\n\t BaseLocation getExpansionLocation = InformationManager.Instance().getExpansionLocation;\n\t BaseLocation secondStartPosition = InformationManager.Instance().getSecondStartPosition();\n\t TilePosition getLastBuildingLocation = InformationManager.Instance().getLastBuildingLocation;\n\t TilePosition getLastBuildingFinalLocation = InformationManager.Instance().getLastBuildingFinalLocation;\n\t \n\t \n\t \n\t\tif(secondStartPosition!= null) {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 120, \"secondStartPosition: \" + secondStartPosition.getTilePosition());\n\t\t\tMyBotModule.Broodwar.drawTextMap(secondStartPosition.getPosition(), \"secondStartPosition\");\n\t\t}else {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 120, \"secondStartPosition: null\");\n\t\t}\n\t\tif(getExpansionLocation!= null) {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 130, \"getExpansionLocation: \" + getExpansionLocation.getTilePosition());\n\t\t\tMyBotModule.Broodwar.drawTextMap(getExpansionLocation.getPosition(), \"nextEX\");\n\t\t}else {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 130, \"getExpansionLocation: null\");\n\t\t}\n\t\tif(getLastBuildingLocation!= null) {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 140, \"getLastBuildingLocation: \" + getLastBuildingLocation);\n\t\t\tMyBotModule.Broodwar.drawTextMap(getLastBuildingLocation.toPosition(), \"nextBuild\");\n\t\t}else {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 140, \"getLastBuildingLocation: null\");\n\t\t}\n\t\tif(getLastBuildingFinalLocation!= null) {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 150, \"getLastBuildingFinalLocation: \" + getLastBuildingFinalLocation);\n\t\t\tMyBotModule.Broodwar.drawTextMap(getLastBuildingFinalLocation.toPosition(), \"LastBuild\");\n\t\t}else {\n\t\t\tMyBotModule.Broodwar.drawTextScreen(10, 150, \"getLastBuildingFinalLocation: null\");\n\t\t}\n\n\t\t\n\t\tMyBotModule.Broodwar.drawTextScreen(10, 160, \"mainBaseLocationFull: \" + BuildManager.Instance().mainBaseLocationFull);\n\t\tMyBotModule.Broodwar.drawTextScreen(10, 170, \"secondChokePointFull: \" + BuildManager.Instance().secondChokePointFull);\n\t\tMyBotModule.Broodwar.drawTextScreen(10, 180, \"secondStartLocationFull: \" + BuildManager.Instance().secondStartLocationFull);\n\t\tMyBotModule.Broodwar.drawTextScreen(10, 190, \"fisrtSupplePointFull: \" + BuildManager.Instance().fisrtSupplePointFull);\n\t\t\n\t\tMyBotModule.Broodwar.drawTextScreen(10, 200, \"myMainbaseLocation : \" + InformationManager.Instance().getMainBaseLocation(MyBotModule.Broodwar.self()).getTilePosition());\n\t\tMyBotModule.Broodwar.drawTextScreen(10, 210, \"enemyMainbaseLocation : \" + InformationManager.Instance().getMainBaseLocation(MyBotModule.Broodwar.enemy()).getTilePosition());\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make all aliases longer than max (256) | @Test
public void testUpdateCreativeVersionsWithLargeAliasShouldFail() {
for(CreativeVersion cv : creative.getVersions()) {
cv.setAlias(EntityFactory.faker.lorem().fixedString(257));
}
Either<Errors, Creative> result = creativeManager.updateCreative(creative.getId(),
creative,
key);
String message = "Invalid alias, it supports characters up to 256.";
assertCreativeVersionError(numberOfVersions, result, message);
} | [
"public int getMaxAliasLength() {\n \t\treturn 10;\n \t}",
"private void adjustMaxPrefixCharacterLenghtAfterRemoval(){\n int prefixFullNameMaxLength = !getAllPrefixFullNames().isEmpty() ? Collections.max(getAllPrefixFullNames(), stringCharacterLengthComparator).length() : 0;\n int prefixAbbreviationMaxLength = !getAllPrefixAbbreviations().isEmpty() ? Collections.max(getAllPrefixAbbreviations(), stringCharacterLengthComparator).length() : 0;\n\n maxPrefixCharacterLength = Math.max(prefixAbbreviationMaxLength, prefixFullNameMaxLength);\n }",
"protected String generateUniqueAlias( String alias, int maxLength, Collection<String> existingAliases ) {\n if ( alias.length() <= maxLength ) {\n if ( !existingAliases.contains( alias ) ) {\n return alias;\n } else {\n if ( alias.length() > maxLength - 2 ) {\n alias = alias.substring( 0, maxLength - 2 );\n }\n }\n } else {\n alias = alias.substring( 0, maxLength - 2 );\n }\n\n int id = 1;\n String aliasWithId = genString( alias, id );\n while ( existingAliases.contains( aliasWithId ) ) {\n aliasWithId = genString( alias, ++id );\n }\n return aliasWithId;\n }",
"private int addExtendedName(int maxlength)\n {\n for (int i = TYPE_NAMES_.length - 1; i >= 0; i --) {\n // for each category, count the length of the category name\n // plus 9 =\n // 2 for <>\n // 1 for -\n // 6 for most hex digits per code point\n int length = 9 + add(m_nameSet_, TYPE_NAMES_[i]);\n if (length > maxlength) {\n maxlength = length;\n }\n }\n return maxlength;\n }",
"void setMaxLength( int maxLength );",
"public int getMaxPhysicalCharisma();",
"long getMaxLength();",
"void setMaxLength(int maxLength);",
"void setMaxStringLiteralSize(int value);",
"private int addAlgorithmName(int maxlength)\n {\n int result = 0;\n for (int i = m_algorithm_.length - 1; i >= 0; i --) {\n result = m_algorithm_[i].add(m_nameSet_, maxlength);\n if (result > maxlength) {\n maxlength = result;\n }\n }\n return maxlength;\n }",
"int getMaxStringLiteralSize();",
"void setNilMaxLength();",
"private String makeEightCharLong(String s) {\n while (s.length() != 8) s = s.concat(\"#\");\n return s;\n }",
"public void max_str_len_rep(int new_length, String tab_name)\n {\n \tmax_str_len.put(tab_name, new_length);\n }",
"public void setMaxLength(int max) {\n GtkEntry.setMaxLength(this, max);\n }",
"public void setMaxPublicDescriptionLength(int val);",
"public int getMaxCharNameLength()\n {\n if (initNameSetsLengths()) {\n return m_maxNameLength_;\n }\n else {\n return 0;\n }\n }",
"private String tooLongMessage(String attr, int max)\n {\n\n return \"Your entry for \" + attr + \" is too long. Limit entry in field \" +\n attr + \" to \" + max + \" characters.\";\n }",
"void unsetMaxLength();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To use the GoogleCalendarClientFactory as factory for creating the client. Will by default use BatchGoogleCalendarClientFactory. The option is a: org.apache.camel.component.google.calendar.GoogleCalendarClientFactory type. Group: advanced | default GoogleCalendarComponentBuilder clientFactory(
org.apache.camel.component.google.calendar.GoogleCalendarClientFactory clientFactory) {
doSetProperty("clientFactory", clientFactory);
return this;
} | [
"static GoogleCalendarComponentBuilder googleCalendar() {\n return new GoogleCalendarComponentBuilderImpl();\n }",
"interface GoogleCalendarComponentBuilder\n extends\n ComponentBuilder<GoogleCalendarComponent> {\n /**\n * Google calendar application name. Example would be\n * camel-google-calendar/1.0.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: common\n * \n * @param applicationName the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder applicationName(\n java.lang.String applicationName) {\n doSetProperty(\"applicationName\", applicationName);\n return this;\n }\n /**\n * Client ID of the calendar application.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: common\n * \n * @param clientId the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder clientId(\n java.lang.String clientId) {\n doSetProperty(\"clientId\", clientId);\n return this;\n }\n /**\n * To use the shared configuration.\n * \n * The option is a:\n * <code>org.apache.camel.component.google.calendar.GoogleCalendarConfiguration</code> type.\n * \n * Group: common\n * \n * @param configuration the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder configuration(\n org.apache.camel.component.google.calendar.GoogleCalendarConfiguration configuration) {\n doSetProperty(\"configuration\", configuration);\n return this;\n }\n /**\n * Delegate for wide-domain service account.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: common\n * \n * @param delegate the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder delegate(\n java.lang.String delegate) {\n doSetProperty(\"delegate\", delegate);\n return this;\n }\n /**\n * Specifies the level of permissions you want a calendar application to\n * have to a user account. You can separate multiple scopes by comma.\n * See https://developers.google.com/google-apps/calendar/auth for more\n * info.\n * \n * The option is a:\n * <code>java.util.List&lt;java.lang.String&gt;</code> type.\n * \n * Default: https://www.googleapis.com/auth/calendar\n * Group: common\n * \n * @param scopes the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder scopes(\n java.util.List<java.lang.String> scopes) {\n doSetProperty(\"scopes\", scopes);\n return this;\n }\n /**\n * Allows for bridging the consumer to the Camel routing Error Handler,\n * which mean any exceptions occurred while the consumer is trying to\n * pickup incoming messages, or the likes, will now be processed as a\n * message and handled by the routing Error Handler. By default the\n * consumer will use the org.apache.camel.spi.ExceptionHandler to deal\n * with exceptions, that will be logged at WARN or ERROR level and\n * ignored.\n * \n * The option is a: <code>boolean</code> type.\n * \n * Default: false\n * Group: consumer\n * \n * @param bridgeErrorHandler the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder bridgeErrorHandler(\n boolean bridgeErrorHandler) {\n doSetProperty(\"bridgeErrorHandler\", bridgeErrorHandler);\n return this;\n }\n /**\n * Whether the producer should be started lazy (on the first message).\n * By starting lazy you can use this to allow CamelContext and routes to\n * startup in situations where a producer may otherwise fail during\n * starting and cause the route to fail being started. By deferring this\n * startup to be lazy then the startup failure can be handled during\n * routing messages via Camel's routing error handlers. Beware that when\n * the first message is processed then creating and starting the\n * producer may take a little time and prolong the total processing time\n * of the processing.\n * \n * The option is a: <code>boolean</code> type.\n * \n * Default: false\n * Group: producer\n * \n * @param lazyStartProducer the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder lazyStartProducer(\n boolean lazyStartProducer) {\n doSetProperty(\"lazyStartProducer\", lazyStartProducer);\n return this;\n }\n /**\n * Whether autowiring is enabled. This is used for automatic autowiring\n * options (the option must be marked as autowired) by looking up in the\n * registry to find if there is a single instance of matching type,\n * which then gets configured on the component. This can be used for\n * automatic configuring JDBC data sources, JMS connection factories,\n * AWS Clients, etc.\n * \n * The option is a: <code>boolean</code> type.\n * \n * Default: true\n * Group: advanced\n * \n * @param autowiredEnabled the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder autowiredEnabled(\n boolean autowiredEnabled) {\n doSetProperty(\"autowiredEnabled\", autowiredEnabled);\n return this;\n }\n /**\n * To use the GoogleCalendarClientFactory as factory for creating the\n * client. Will by default use BatchGoogleCalendarClientFactory.\n * \n * The option is a:\n * <code>org.apache.camel.component.google.calendar.GoogleCalendarClientFactory</code> type.\n * \n * Group: advanced\n * \n * @param clientFactory the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder clientFactory(\n org.apache.camel.component.google.calendar.GoogleCalendarClientFactory clientFactory) {\n doSetProperty(\"clientFactory\", clientFactory);\n return this;\n }\n /**\n * OAuth 2 access token. This typically expires after an hour so\n * refreshToken is recommended for long term usage.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param accessToken the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder accessToken(\n java.lang.String accessToken) {\n doSetProperty(\"accessToken\", accessToken);\n return this;\n }\n /**\n * Client secret of the calendar application.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param clientSecret the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder clientSecret(\n java.lang.String clientSecret) {\n doSetProperty(\"clientSecret\", clientSecret);\n return this;\n }\n /**\n * The emailAddress of the Google Service Account.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param emailAddress the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder emailAddress(\n java.lang.String emailAddress) {\n doSetProperty(\"emailAddress\", emailAddress);\n return this;\n }\n /**\n * The name of the p12 file which has the private key to use with the\n * Google Service Account.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param p12FileName the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder p12FileName(\n java.lang.String p12FileName) {\n doSetProperty(\"p12FileName\", p12FileName);\n return this;\n }\n /**\n * OAuth 2 refresh token. Using this, the Google Calendar component can\n * obtain a new accessToken whenever the current one expires - a\n * necessity if the application is long-lived.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param refreshToken the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder refreshToken(\n java.lang.String refreshToken) {\n doSetProperty(\"refreshToken\", refreshToken);\n return this;\n }\n /**\n * Service account key in json format to authenticate an application as\n * a service account. Accept base64 adding the prefix base64:.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param serviceAccountKey the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder serviceAccountKey(\n java.lang.String serviceAccountKey) {\n doSetProperty(\"serviceAccountKey\", serviceAccountKey);\n return this;\n }\n /**\n * The email address of the user the application is trying to\n * impersonate in the service account flow.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: security\n * \n * @param user the value to set\n * @return the dsl builder\n */\n default GoogleCalendarComponentBuilder user(java.lang.String user) {\n doSetProperty(\"user\", user);\n return this;\n }\n }",
"public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}",
"private GoogleConnectionFactory createGoogleConnection() {\n return new GoogleConnectionFactory(env.getProperty(\"google.client.clientId\"), env.getProperty(\"google.client.clientSecret\"));\n }",
"IClientFactory<TClient> getClientFactory();",
"<T> T getServiceClient(final ServiceClientFactory<T> factory);",
"private Calendar createService() throws IOException, GeneralSecurityException {\n GoogleCredentials credentials = ServiceAccountCredentials.fromStream(fileService.getFileAsStream(\"larp-calendar-config.json\"))\n .createScoped(Collections.singleton(CalendarScopes.CALENDAR_EVENTS));\n HttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(credentials);\n\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n Calendar service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, requestInitializer)\n .setApplicationName(APPLICATION_NAME)\n .build();\n\n return service;\n }",
"private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException {\n Credential credential = authorize();\n return new com.google.api.services.calendar.Calendar.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, credential)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }",
"private ClientRegistration googleClientRegistration() {\n\t\treturn ClientRegistration.withRegistrationId(\"google\")\n .clientId(this.clientId)\n\t\t\t\t.clientSecret(this.clientSecret)\n .clientAuthenticationMethod(ClientAuthenticationMethod.BASIC)\n\t\t\t\t.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)\n\t\t\t\t.redirectUriTemplate(\"{baseUrl}/login/oauth2/code/{registrationId}\")\n\t\t\t\t.scope(\"openid\", \"profile\", \"email\", \"address\", \"phone\")\n\t\t\t\t.authorizationUri(\"https://accounts.google.com/o/oauth2/v2/auth\")\n\t\t\t\t.tokenUri(\"https://www.googleapis.com/oauth2/v4/token\")\n\t\t\t\t.userInfoUri(\"https://www.googleapis.com/oauth2/v3/userinfo\")\n\t\t\t\t.userNameAttributeName(\"email\")\n .jwkSetUri(\"https://www.googleapis.com/oauth2/v3/certs\")\n\t\t\t\t.clientName(\"Google\").build();\n\t}",
"public static com.google.api.services.calendar.Calendar\r\n getCalendarService() throws Throwable {\r\n Credential credential = authorize();\r\n return new com.google.api.services.calendar.Calendar.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, credential)\r\n .setApplicationName(APPLICATION_NAME)\r\n .build();\r\n }",
"public CouchbaseClientFactory() {}",
"DbxClientV2 createClient(DbxAuthInfo auth, StandardHttpRequestor.Config config, String clientUserAgentId);",
"public static GoogleCalendar getInstance() {\n if (instance == null) {\n instance = new GoogleCalendar();\n }\n return instance;\n }",
"private GoogleCalendar() {\n }",
"public static Bigquery createAuthorizedClient() throws IOException {\n // Create the credential\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n GoogleCredential credential = GoogleCredential.getApplicationDefault(transport, jsonFactory);\n //GoogleCredential credential = GoogleCredential.getApplicationDefault();\n // Depending on the environment that provides the default credentials (e.g. Compute Engine, App\n // Engine), the credentials may require us to specify the scopes we need explicitly.\n // Check for this case, and inject the Bigquery scope if required.\n if (credential.createScopedRequired()) {\n credential = credential.createScoped(Arrays.asList(BIGQUERY,BIGQUERY_INSERTDATA));\n }\n\n return new Bigquery.Builder(transport, jsonFactory, credential)\n .setApplicationName(\"GAE-cron\").build();\n}",
"default GoogleCalendarComponentBuilder configuration(\n org.apache.camel.component.google.calendar.GoogleCalendarConfiguration configuration) {\n doSetProperty(\"configuration\", configuration);\n return this;\n }",
"protected abstract ClientType createClient(final ProcessContext context, final AWSCredentialsProvider credentialsProvider, final ClientConfiguration config);",
"public interface CalendarProviderClient extends LoaderManager.LoaderCallbacks<Cursor> {\n\n\n /**\n * Account title used for this specific calendar throughout the system.\n * You are expected to use this value for the Calendars.ACCOUNT_NAME and\n * Calendars.OWNER_ACCOUNT field when creating the calendar\n */\n String ACCOUNT_TITLE = \"MyCountriesAccount\";\n\n\n /**\n * Title used for this specific calendar throughout the system.\n * You are expected to use this value for the Calendars.NAME field when creating / accessing\n * the calendar (you may also use it for the Calendars.DISPLAY_NAME field)\n */\n String CALENDAR_TITLE = \"MyCountries\";\n\n\n /**\n * Content URI used to access the calendar(s)\n */\n Uri CALENDARS_LIST_URI = CalendarContract.Calendars.CONTENT_URI;\n\n\n /**\n * Selection used when querying for MyCountries calendar\n */\n String CALENDARS_LIST_SELECTION = \"(\"\n + \"(\" + CalendarContract.Calendars.NAME + \" = ? )\" + \" AND \"\n + \"(\" + CalendarContract.Calendars.ACCOUNT_TYPE + \" = ? )\" + \")\";\n\n\n /**\n * Selection args used when querying for MyCountries calendar\n */\n String[] CALENDARS_LIST_SELECTION_ARGS = new String[]{\n CALENDAR_TITLE,\n CalendarContract.ACCOUNT_TYPE_LOCAL\n };\n\n\n /**\n * List of columns to include when querying for MyCountries calendar.\n * We really need only the ID field, but you may want to\n * add additional columns for debug purposes.\n */\n String[] CALENDARS_LIST_PROJECTION = new String[]{\n CalendarContract.Calendars._ID,\n CalendarContract.Calendars.NAME\n };\n\n\n /**\n * Column indices for the projection array above\n */\n int PROJ_CALENDARS_LIST_ID_INDEX = 0;\n int PROJ_CALENDARS_LIST_NAME_INDEX = 1;\n\n\n /**\n * Content URI used to access the calendar event(s)\n */\n Uri EVENTS_LIST_URI = CalendarContract.Events.CONTENT_URI;\n\n\n /**\n * List of columns to include when querying for MyCountries calendar events.\n * You should store the country name in TITLE field. The year of the visit should be converted\n * to DTSTART / DTEND values using the helper functions from the CalendarUtils class.\n * When querying for events, call the CalendarUtils.getEventYear() helper function\n * with the DTSTART field value.\n */\n String[] EVENTS_LIST_PROJECTION = new String[]{\n CalendarContract.Events._ID,\n CalendarContract.Events.TITLE,\n CalendarContract.Events.DTSTART\n };\n\n\n /**\n * Column indices for the projection array above\n */\n int PROJ_EVENTS_LIST_ID_INDEX = 0;\n int PROJ_EVENTS_LIST_TITLE_INDEX = 1;\n int PROJ_EVENTS_LIST_DTSTART_INDEX = 2;\n\n\n /**\n * An arbitrary ID to use for the Loader Manager\n */\n int LOADER_MANAGER_ID = 0;\n\n\n /**\n * Returns the ID of MyCountries calendar.\n * If the calendar is missing (e.g., during the first application launch), it must be created.\n * You should call this method already from your activity's onCreate() (it seems\n * that it is not possible for a user to remove the calendar manually, so calling this method\n * from onResume() seems to be an overkill).\n * <p>\n * Remember to use the proper NAME field value and ACCOUNT_TYPE value of ACCOUNT_TYPE_LOCAL!\n * More information here: http://developer.android.com/reference/android/provider/CalendarContract.Calendars.html\n * <p>\n * To create a calendar, you will need to issue a query as a Sync Adapter β you will need\n * to specify ACCOUNT_NAME and ACCOUNT_TYPE not only in provided values, but also in the URI:\n * http://developer.android.com/guide/topics/providers/calendar-provider.html#sync-adapter\n *\n * @return calendar ID\n */\n long getMyCountriesCalendarId();\n\n\n /**\n * Uses a Content Resolver to create a new calendar event.\n * You should call this method when handling a new data entry creation β use your code from\n * Assignment 1 to parse & validate user input, etc.\n * <p>\n * The implementation of this method should call ContentResolver.insert() with\n * EVENTS_LIST_URI and values required by the Calendar Provider (use CalendarUtils methods\n * to get DTSTART, DTEND and EVENT_TIMEZONE values):\n * http://developer.android.com/guide/topics/providers/calendar-provider.html#add-event\n * <p>\n * After you add an event, you should restart the Loader Manager from your activity to\n * get the updated data:\n * loaderManager.restartLoader(LOADER_MANAGER_ID, null, this)\n *\n * @param year country visit year\n * @param country visited country name\n */\n void addNewEvent(int year, String country);\n\n\n /**\n * Uses a Content Resolver to update a calendar event.\n * You should call this method when handling an entry update β use your code from\n * Assignment 1 to parse & validate user input, etc.\n * <p>\n * The implementation of this method should call ContentResolver.update() with\n * an eligible URI and values required by the Calendar Provider (you will need to update only\n * the DTSTART, DTEND and TITLE fields):\n * http://developer.android.com/guide/topics/providers/calendar-provider.html#update-event\n * <p>\n * The URI used for update should be constructed by calling\n * ContentUris.withAppendedId(EVENTS_LIST_URI, eventId)\n * <p>\n * After you update an event, you should restart the Loader Manager from your activity to\n * get the updated data:\n * loaderManager.restartLoader(LOADER_MANAGER_ID, null, this)\n *\n * @param eventId event ID\n * @param year country visit year\n * @param country visited country name\n */\n void updateEvent(int eventId, int year, String country);\n\n\n /**\n * Uses a Content Resolver to delete a calendar event.\n * You should call this method when deleting an entry.\n * <p>\n * The implementation of this method should call ContentResolver.delete() with\n * an eligible URI:\n * http://developer.android.com/guide/topics/providers/calendar-provider.html#delete-event\n * <p>\n * The URI used for deletion should be constructed by calling\n * ContentUris.withAppendedId(EVENTS_LIST_URI, eventId)\n * <p>\n * After you delete an event, you should restart the Loader Manager from your activity to\n * get the updated data:\n * loaderManager.restartLoader(LOADER_MANAGER_ID, null, this)\n *\n * @param eventId event ID\n */\n void deleteEvent(int eventId);\n\n\n /**\n * The Loader Manager callback that returns a CursorLoader object.\n * You must actually create an instance of CursorLoader that would query the Calendar Provider\n * here.\n *\n * @param id ID used to manage several loaders; can be ignored for this assignment\n * @param args additional arguments; can probably be ignored for this assignment\n * @return a CursorLoader that will be used to actually query and update the provider data\n */\n Loader<Cursor> onCreateLoader(int id, Bundle args);\n\n\n /**\n * The Loader Manager callback that signals the end of the load.\n * You must use the cursor available as the second argument here to actually access the data\n * (the simplest way is to call yourSimpleCursorAdapter.swapCursor(data) ).\n *\n * @param loader the actual loader object\n * @param data the data cursor\n */\n void onLoadFinished(Loader<Cursor> loader, Cursor data);\n\n\n /**\n * The Loader Manager callback that signals the reset of the loader.\n * You must remove the reference to the old data here\n * (the simplest way is to call yourSimpleCursorAdapter.swapCursor(null) ).\n *\n * @param loader the actual loader object\n */\n void onLoaderReset(Loader<Cursor> loader);\n}",
"private GoogleSignInClient buildGoogleSignInClient() {\n GoogleSignInOptions signInOptions =\n new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestScopes(Drive.SCOPE_FILE)\n .build();\n return GoogleSignIn.getClient(this, signInOptions);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// getEvaluation // // | @Override
public Evaluation getEvaluation ()
{
return evaluation;
} | [
"public String getEvaluation() {\n return evaluation;\n }",
"public EvaluationStrategy getEvaluationStrategy();",
"public ASEvaluation getEvaluator();",
"public String getEvaluationResult() {\n return evaluationResult;\n }",
"public com.google.cloud.datalabeling.v1beta1.Evaluation getEvaluation(\n com.google.cloud.datalabeling.v1beta1.GetEvaluationRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetEvaluationMethod(), getCallOptions(), request);\n }",
"String evaluate();",
"protected Parser evaluation() {\r\n\t\r\n\tTrack t = new Track(\"evaluation\");\r\n\tt.add(new Symbol('#').discard());\r\n\tt.add(new Symbol('(').discard());\r\n\tt.add(arg());\r\n\tt.add(new Symbol(',').discard());\r\n\tt.add(arg());\r\n\tt.add(new Symbol(')').discard());\r\n\tt.setAssembler(new EvaluationAssembler());\r\n\treturn t;\r\n}",
"public String getEvaluate() {\r\n return evaluate;\r\n }",
"public String getEvaluate() {\n return evaluate;\n }",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.datalabeling.v1beta1.Evaluation>\n getEvaluation(com.google.cloud.datalabeling.v1beta1.GetEvaluationRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetEvaluationMethod(), getCallOptions()), request);\n }",
"public Object evaluate() throws EvaluationException\n {\n return evaluate(OOEEContextFactory.createOOEEContext());\n }",
"public ASEvaluation getEvaluator() {\n\n return m_evaluator;\n }",
"public Evaluation getFinalEvaluation() {\n return calculateAverage();\n }",
"public Integer getEvaluate() {\n return evaluate;\n }",
"public Evaluation getCurrentEvaluation() {\n return currentEvaluation;\n }",
"T evaluate();",
"@NotNull\n public final Promise<XExpression> calculateEvaluationExpression() {\n return myValueContainer.calculateEvaluationExpression();\n }",
"public String getEvaluationCondition()\r\n {\r\n return evaluationCondition;\r\n }",
"public String getSelfEvaluation() {\n return selfEvaluation;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field53' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField53() {
field53 = null;
fieldSetFlags()[53] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField1053() {\n field1053 = null;\n fieldSetFlags()[1053] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField543() {\n field543 = null;\n fieldSetFlags()[543] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField33() {\n field33 = null;\n fieldSetFlags()[33] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField163() {\n field163 = null;\n fieldSetFlags()[163] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField563() {\n field563 = null;\n fieldSetFlags()[563] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField213() {\n field213 = null;\n fieldSetFlags()[213] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField943() {\n field943 = null;\n fieldSetFlags()[943] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField321() {\n field321 = null;\n fieldSetFlags()[321] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField121() {\n field121 = null;\n fieldSetFlags()[121] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField987() {\n field987 = null;\n fieldSetFlags()[987] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField591() {\n field591 = null;\n fieldSetFlags()[591] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField54() {\n field54 = null;\n fieldSetFlags()[54] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField141() {\n field141 = null;\n fieldSetFlags()[141] = false;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar53() {\n var53 = null;\n fieldSetFlags()[54] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField23() {\n field23 = null;\n fieldSetFlags()[23] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField42() {\n field42 = null;\n fieldSetFlags()[42] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField132() {\n field132 = null;\n fieldSetFlags()[132] = false;\n return this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If current capacity enough to add just add. Else extending existing array and adding the value | public void add(E value){
if (maxIndex != array.length-1){
array[++maxIndex] = value;
}else {
Object[] tmpArray = new Object[array.length+ capacity];
for (int i = 0; i < array.length; i++) {
tmpArray[i] = array[i];
}
array = tmpArray;
array[++maxIndex] = value;
}
} | [
"public void add(T x){\n\t\t//check whether capacity has reached\n\t\tif (size == data.length){\n\t\t\t//if yes: expand array \n\t\t\t\n\t\t\t// create a new array, double the size\n\t\t\tT [] data2 = (T []) new Object[size*2];\n\t\t\t\n\t\t\t// copy over from old array\n\t\t\tfor (int i = 0; i<size; i++){\n\t\t\t\tdata2[i] = data[i];\n\t\t\t}\n\n\t\t\t//old data?\n\t\t\tdata = data2;\n\t\t}\n\t\t\n\t\t// now we can add + update size\n\t\tdata[size] = x;\n\t\tsize++;\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\n\t\n public boolean add(T item) {\n \tint i=0;\n\t\t//going through the entire array. if data[i]==null means end of the current array.\n \twhile(i<currentCapacity && data[i]!=null) {\n\t\t\t\n \t\tif(item.equals(data[i])==true) {\n \t\t\treturn false;\n \t\t}\n\t\t\t\n \t\ti++;\n\t\t\t\n \t}\n\t\t// because array never gets filled, we have to check current capacity and nextitem\n if(currentCapacity <= nextItem) {\n\t\t\t\n\t\t\tint j;\n\t\t\t// if array ps filled, crate a new array with currentCapacity+defaultSizeToCreate\n \t\tT[] updatedata = (T[])new Object[currentCapacity+defaultSizeToCreate];\n\t\t\t//copy the old conents into that\n \t\tfor(j=0;j<currentCapacity;j++){\n \t\t\tupdatedata[j]=data[j];\n \t\t}\n\t\t\t//make the new array as the current one\n \t\tdata=updatedata;\n\t\t\t// add the new elemant\n \t\tdata[currentCapacity]=item;\n\t\t\t//renew the capacity, because now the capacity has change\n \t\tcurrentCapacity=currentCapacity+defaultSizeToCreate;\n\t\t\t//increase the next item to get another elemant\n \t\tnextItem++;\n\t\t\t\n \t\treturn true;\n\t\t\t\n \t}else{\n\t\t\t// add the new elemant\n\t\t\tdata[nextItem]=item;\n\t\t\t//increase the next item to get another elemant\n\t\t\tnextItem++;\n\t\t\t//new nextitem should be null\n\t\t\ttry { \t\n \t\t\tdata[nextItem] = null;// DO NOT CHANGE\n \t\t}\n \t\tcatch(ArrayIndexOutOfBoundsException e){};\n\t\t\t\n \t\treturn true;\n \t}\t\n }",
"protected void extendCapacity(int increment) {\n if (increment > 0) {\n @SuppressWarnings(\"unchecked\")\n T[] tmp = (T[]) new Object[array.length + increment];\n System.arraycopy(array, 0, tmp, 0, array.length);\n array = tmp;\n }\n }",
"private void increaseCapacity() {\n capacity = (2 * capacity) + 1;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void add(T value) {\n\t\t// Append an element to the end of the storage.\n\t\t// Double the capacity if no space available.\n\t\t// Amortized O(1)\n\n\t\tif (size == capacity()) {\n\t\t\tT newData[] = (T[]) new Object[2 * capacity()];\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewData[i] = data[i];\n\t\t\t}\n\t\t\tdata = newData;\n\t\t}\n\n\t\tdata[size] = value;\n\t\tsize++;\n\t}",
"public void add(E value) {\n // if new array list capacity is greater than array length, at least double capacity\n ensureCapacity(size + 1);\n // add new value at the end of the array\n elementData[size] = value;\n // update size of array list\n size++;\n }",
"public boolean appendItem ( int newValue )\n {\n if ( !isFull () )\n {\n localArray[ arraySize ] = newValue;\n arraySize++;\n return true;\n }\n return false;\n }",
"private void expandCapacity() {\n capacity *= 2;\n GenericArray<T> newArray = new GenericArray<T>(capacity);\n for (int i = 0; i < count; i++) {\n newArray.set(i, array.get(i));\n }\n array = newArray;\n }",
"public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}",
"void add(Location loc) {\n \n if (length == capacity){\n doubleCapacity(); \n }\n int index = (length + front) % capacity;\n data[index] = loc;\n length++;\n }",
"private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }",
"private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }",
"private void increaseSize() {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tT [] newArr = (T[]) new Object[this.array.length + this.increment];\n\t\tfor(int i = 0; i < this.array.length; i++) {\n\t\t\tnewArr[i] = this.array[i];\n\t\t}\n\t\tthis.array = newArr;\n\t}",
"public boolean add(T item) {\r\n if (size() < maxCapacity) {\r\n super.add(item);\r\n return true;\r\n } else\r\n return false;\r\n }",
"private void increaseSize() {\r\n this.container = Arrays.copyOf(this.container, this.container.length * 2);\r\n }",
"private void grow_array(){\n int newSize = a.length*2;\n T[] new_a = (T[]) new Object[newSize];\n System.arraycopy(a, 0, new_a, 0, a.length);\n a = new_a;\n }",
"private void extendArray() {\n elements = Arrays.copyOf(elements, elements.length * AMOUNT_TO_EXTEND_ARRAY);\n }",
"private void ensureCapacity() {\n if (this.size >= this.inputArray.length) {\n int newCapacity = this.inputArray.length + DEFAULT_CAPACITY;\n this.inputArray = Arrays.copyOf(this.inputArray, newCapacity);\n }\n }",
"public boolean add( T element )\n {\n // THIS IS AN APPEND TO THE LOGICAL END OF THE ARRAY AT INDEX count\n if (size() == theArray.length) upSize(); // DOUBLES PHYSICAL CAPACITY\n theArray[ count++] = element; // ADD IS THE \"setter\"\n return true; // success. it was added\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets how many fields are occupied by a stone | public int getNumberOfOccupiedFields() {
this.numberOfOccupiedFields = numberOfFieldsOccupiedByStoneColor(Color.WHITE) + numberOfFieldsOccupiedByStoneColor(Color.BLACK);
return numberOfOccupiedFields;
} | [
"public int getNumberOfFieldsOccupiedByStone(Color stoneColor) {\n return numberOfFieldsOccupiedByStoneColor(stoneColor);\n }",
"private int numberOfFieldsOccupiedByStoneColor(Color colorOfStonesToCount) {\n int counterOccupiedByStoneColor = 0;\n for (int i = 0; i < fields.length; i++) {\n for (int j = 0; j < fields.length; j++) {\n if (this.fields[i][j].isOccupiedByStone()) {\n if (this.fields[i][j].getStone().getColor() == colorOfStonesToCount)\n counterOccupiedByStoneColor++;\n }\n }\n }\n return counterOccupiedByStoneColor;\n }",
"public int getFieldCount()\r\n {\r\n Iterator it = getFields();\r\n int count = 0;\r\n while(it.hasNext())\r\n {\r\n count ++;\r\n it.next();\r\n }\r\n return count;\r\n }",
"public int getFieldCount()\n {\n return fields.size();\n }",
"@Override\n public int getTotalNumberOfFields() {\n return objClass.getDeclaredFields().length;\n }",
"int getNumberOfStonesLeftToPlace();",
"int getProbeFieldsCount();",
"public int getTotalStones() {\r\n\t\treturn this.largePit.getNumberOfStones();\r\n\t}",
"public int numFields() { \n\t\treturn element.getContentSize(); \n\t}",
"public int getNumFields()\n {\n return (inputFields.size());\n }",
"static int numberOfEnclosingFields(ReferenceBinding type){\n\t\t\n\t\tint count = 0;\n\t\ttype = type.enclosingType();\n\t\twhile(type != null) {\n\t\t\tcount += type.fieldCount();\n\t\t\ttype = type.enclosingType();\n\t\t}\n\t\treturn count;\n\t}",
"public int getStoneCount()\n {\n return stoneCount;\n }",
"public int getFieldCount() {\n return entityMetaData.getFields().size();\n }",
"public int getNumberOfStructures() {\n\t\tSet<String> cs = this.getMainInstance().getConfig().getConfigurationSection(\"Schematics\").getKeys(false);\n\t\treturn cs.size();\n\t}",
"int getNumberOfStonesOnBoard();",
"public int getNumberOfStructures() {\n return getStructureHandler().getStructures().size();\n }",
"@Override\n public int getCountOfConstantFields() {\n int count =0;\n Field[] fields = objClass.getDeclaredFields();\n for (Field field: fields){\n if (Modifier.isFinal(field.getModifiers())){\n count++;\n }\n }\n return count;\n }",
"public int sizeOfMappingFieldsArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(MAPPINGFIELDS$28);\n }\n }",
"@DISPID(18) //= 0x12. The runtime will prefer the VTID if present\n @VTID(40)\n int fieldSize();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The URL to the event page | @ApiModelProperty(value = "The URL to the event page")
public String getUrl() {
return url;
} | [
"public String getURLUpdateEvent(Event event){\n String url = String.format(getPath() + \"users('%s')/events/%s\", location.getDisplayName(), event.getId());\n logger.info(\"Getting URL update event : \"+ url );\n return url;\n }",
"public String getURLDeleteEvent(Event event){\n String url = String.format(getPath() + \"users('%s')/events/%s\", location.getDisplayName(), event.getId());\n logger.info(\"Getting URL delete event : \"+ url );\n return url;\n }",
"public String getEventSubURL() {\n\t\treturn eventSubURL;\n\t}",
"java.lang.String getClickURL();",
"String getDetailPageUrl();",
"public String getURL() {\r\n String url = ConfigContext.getCurrentContextConfig().getProperty(\"oleExposedWebService.url\");\r\n return url;\r\n }",
"java.lang.String getBookingURL();",
"public String getClickUrl() {\n return clickUrl;\n }",
"public String getEventLocation() {\n\t\treturn EventLocation;\n\t}",
"public String getClickDestinationUrl()\n\t{\n\t\treturn clickDestinationUrl;\n\t}",
"public String getEventLocation() {\n\t\treturn eventLocation;\n\t}",
"String getResponseUrl();",
"public void setEventSubURL(String url) {\n\t\teventSubURL = url;\n\t}",
"java.lang.String getAppUrl();",
"String getQueryStateUrl();",
"java.lang.String getEndpointUrl();",
"public String getEvent_Detector_File_URL() {\n return event_Detector_File_URL;\n }",
"java.lang.String getURL();",
"public String getEventPath()\n\t{\n\t\treturn eventPath;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/add two Jumble sequences | public static Seq plus(Jumble j1, Jumble j2){
int new_size = (j1.count < j2.count) ? j1.count : j2.count;
int new_arr[] = new int[new_size];
for(int i = 0; i < new_size; i++) {
new_arr[i] = j1.values[i] + j2.values[i]; //add each corresponding element
}
return new Jumble(new_arr); // the Jumble constructor does copy
} | [
"public static Seq plus (Constant c1, Jumble j1)\t{\n\t\t\n\t\tint size, \t// shorter length of the two sequences\n\t\t walker = 0;\t// index walker for array\n\n\t\t// find short length\n\t\tif(c1.num <= j1.values.length)\n\t\t\tsize = c1.num;\n\t\telse\n\t\t\tsize = j1.values.length;\n\n\t\t// add corresponding elements\n\t\tint [] sum = new int[size];\n\t\twhile(walker < size) {\n\t\t\tsum[walker] = j1.values[walker] + c1.value;\n\t\t\twalker++;\n\t\t} // while \n\t\n\t\t// return Jumble sequence\n\t\treturn new Jumble(sum);\n\n\t}",
"MultiplicationSequence(Sequence seq1, Sequence seq2){\n\t\tthis.seq1 = seq1;\n\t\tthis.seq2 = seq2;\n\t}",
"public static Seq plus(Delta d, Jumble j) {\n int new_size = (d.num < j.count)?d.num:j.count;\n int []new_arr = new int[new_size]; \n for(int i = 0; i < new_size; i++) \n new_arr[i] = j.values[i] + (d.initial + d.delta*i);\n return new Jumble(new_arr);\n }",
"public static Seq plus (Jumble j1, Delta d1) {\n\n\t\t// same code as previous function\n\t\treturn plus(d1, j1);\n\n\t}",
"public static Seq plus(Constant c, Jumble j) {\n int new_size = (c.num < j.count) ? c.num : j.count;\n int new_array[] = new int[new_size];\n for(int i = 0; i< new_size; i++) \n new_array[i] = j.values[i] + c.value; // add each element with a const\n return new Jumble(new_array);\n }",
"public static Seq plus (Jumble j1, Constant c1) {\n\t\t\n\t\t// same code as previous function\n\t\treturn plus(c1, j1);\n\n\t}",
"private static void add(long [] p[], long [] q[])\r\n\t{\r\n\t\tlong [] a = new long[16];\r\n\t\tlong [] b = new long[16];\r\n\t\tlong [] c = new long[16];\r\n\t\tlong [] d = new long[16];\r\n\t\tlong [] t = new long[16];\r\n\t\tlong [] e = new long[16];\r\n\t\tlong [] f = new long[16];\r\n\t\tlong [] g = new long[16];\r\n\t\tlong [] h = new long[16];\r\n\r\n\r\n\t\tlong [] p0 = p[0];\r\n\t\tlong [] p1 = p[1];\r\n\t\tlong [] p2 = p[2];\r\n\t\tlong [] p3 = p[3];\r\n\r\n\t\tlong [] q0 = q[0];\r\n\t\tlong [] q1 = q[1];\r\n\t\tlong [] q2 = q[2];\r\n\t\tlong [] q3 = q[3];\r\n\r\n\t\tZ(a,0,a.length, p1,0,p1.length, p0,0,p0.length);\r\n\t\tZ(t,0,t.length, q1,0,q1.length, q0,0,q0.length);\r\n\t\tM(a,0,a.length, a,0,a.length, t,0,t.length);\r\n\t\tA(b,0,b.length, p0,0,p0.length, p1,0,p1.length);\r\n\t\tA(t,0,t.length, q0,0,q0.length, q1,0,q1.length);\r\n\t\tM(b,0,b.length, b,0,b.length, t,0,t.length);\r\n\t\tM(c,0,c.length, p3,0,p3.length, q3,0,q3.length);\r\n\t\tM(c,0,c.length, c,0,c.length, D2,0,D2.length);\r\n\t\tM(d,0,d.length, p2,0,p2.length, q2,0,q2.length);\r\n\t\t\r\n\t\tA(d,0,d.length, d,0,d.length, d,0,d.length);\r\n\t\tZ(e,0,e.length, b,0,b.length, a,0,a.length);\r\n\t\tZ(f,0,f.length, d,0,d.length, c,0,c.length);\r\n\t\tA(g,0,g.length, d,0,d.length, c,0,c.length);\r\n\t\tA(h,0,h.length, b,0,b.length, a,0,a.length);\r\n\r\n\t\tM(p0,0,p0.length, e,0,e.length, f,0,f.length);\r\n\t\tM(p1,0,p1.length, h,0,h.length, g,0,g.length);\r\n\t\tM(p2,0,p2.length, g,0,g.length, f,0,f.length);\r\n\t\tM(p3,0,p3.length, e,0,e.length, h,0,h.length);\r\n\t}",
"public static Seq plus(Delta d1, Delta d2) {\n\t\n\t\tint v1=0, v2=0;\n\t\tint n = (d1.num < d2.num) ? d1.num : d2.num;\n\t\tint i = d1.initial + d2.initial;\n\t\tint d = d1.delta + d2.delta;\n\n\t\treturn new Delta(n, i, d);\n\t\t\t\n\t}",
"private void mergeFromSeq(PyObject other) {\n // Seasoned copy of PyDictionary.mergeFromSeq\n PyObject pairs = other.__iter__();\n PyObject pair;\n\n for (int i = 0; (pair = pairs.__iternext__()) != null; i++) {\n // FIXME: took out call to fastSequence because it's not accessible\n // from outside the Jython org.python.core package. Dumb!\n int n;\n if ((n = pair.__len__()) != 2) {\n throw Py.ValueError(String.format(\"dictionary update sequence element #%d \"\n + \"has length %d; 2 is required\", i, n));\n }\n // This was the only change (dict___setitem__ -> __setitem__)\n __setitem__(pair.__getitem__(0), pair.__getitem__(1));\n }\n }",
"public static Seq plus(Delta d1, Delta d2) {\n return new Delta((d1.num < d2 .num)?d1.num:d2.num, (d1.initial + d2.initial),\n (d1.delta + d2.delta));\n \n }",
"private void add() {\n // PROGRAM 1: Student must complete this method\n // This method must use the addBit method for bitwise addition.\n adder = addBit(inputA[0],inputB[0], false); //begin adding, no carry in\n output[0] = adder[0]; //place sum of first addBit iteration into output[0]\n //loop thru output beginning at index 1 (since we already computed index 0)\n for (int i = 1; i < output.length; i++) {\n cin = adder[1]; //set carry-out bit of addBit() iteration to cin\n adder = addBit(inputA[i], inputB[i], cin); //call addBit with index i of inputA and inputB and cin and place into adder.\n output[i] = adder[0]; //place sum into output[i]\n }\n }",
"public void combine() {\n\t\t//float[][] data1 = cg1.upSample();\n\t\t//float[][] data2 = cg2.upSample();\n\t\tfloat[][] data3 = cg3.upSample();\n\t\t//float[][] data4 = cg4.upSample();\n\n\t\tfor (int i = 0; i < 256; i++) {\n\t\t\tfor (int j = 0; j < 256; j++) {\n\t\t\t\t/*combined[i][j] = (float) (Math.pow(.5 * data1[i][j],2)\n\t\t\t\t\t\t+ Math.pow(.75 * data2[i][j],2) + Math.pow(.75 * data3[i][j],2)\n\t\t\t\t\t\t+ Math.pow(.25 * data4[i][j],2));*/\n\t\t\t\tcombined[i][j] = .5f - (float)Math.pow(data3[i][j],2);\n\t\t\t}\n\t\t}\n\t\tdata = combined;\n\t}",
"void pushSequence();",
"void combinePieces(U toJoin, boolean simultaneous);",
"public static ArrayList<Float> mathematicalAdd(ArrayList<Float> firstWave, ArrayList<Float> secondWave) {\r\n ArrayList<Float> newWave = new ArrayList<>();\r\n int size = getSize(firstWave,secondWave);\r\n for (int i = 0; i < size; i++) {\r\n newWave.add(i, firstWave.get(i) + secondWave.get(i));\r\n }\r\n return newWave;\r\n }",
"public static Rotation add(Rotation r1, Rotation r2) {\r\n return values()[(r1.ordinal + r2.ordinal) % 8];\r\n }",
"public Integer addStuffTogether(ArrayList<Integer> original1, ArrayList<Integer> original2) {\n Integer sum = 0;\n for (Integer i : original1) {\n sum += i;\n }\n for (Integer i : original2) {\n sum += i;\n }\n return sum;\n }",
"public static void add(int[][] matrix1, int[][] matrix2) {\n\tfor(int x=0;x<matrix1.length; x++) {\r\n\t\tfor(int y=0;y<matrix2.length;y++) {\r\n\t\t\tSystem.out.print(matrix1[x][y] +matrix2[x][y] + \" \");\r\n\t\t\t}\r\n\t\tSystem.out.println();\r\n\t\t}\t\r\n\t}",
"static byte add(byte... bytes) {\n byte result = 0;\n for (byte b : bytes) {\n result ^= b;\n }\n return result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new twistlock with no owner and an empty | public Twistlock ()
{
this.owner = -1;
this.containers = new Container[0];
} | [
"public BookingLockResponse createLock(String bookingNo);",
"BlockActivity createBlockActivity();",
"public void createLockNullResource() throws WebDAVException;",
"public abstract Locker newNonTxnLocker() throws DatabaseException;",
"LockManager() {\n }",
"static Lock createLock() {\n return new /*Prio*/Lock();\n }",
"Block createBlock();",
"private static void mintNewBlock(){\n System.out.println(\"======================================================\");\n System.out.println(\"Minting new block...\");\n PoS_Transaction newTransaction = new PoS_Transaction(\"\", \"\", \"\");\n newTransaction.setHash(\"\");\n if (!transactions.isEmpty()){\n newTransaction = transactions.get(0);\n transactions.remove(0);\n }\n PoSBlock newBlock = new PoSBlock(getHighestBlock().getHash(), newTransaction);\n newBlock.setValidator(publicKey);\n newBlock.generateSignature(privateKey);\n newBlock.calculateHash();\n\n PoS_Block_Message newBlockMessage = new PoS_Block_Message(newBlock);\n broadcastMessage(newBlockMessage, nodeIPList);\n blockchain.add(newBlock);\n\n\n if (newTransaction.newNode() && newTransaction.getSender().equals(newTransaction.getRecipient())){\n try {\n int newNodeStake = Integer.parseInt(newTransaction.getContent());\n candidateList.add(newTransaction.getSender());\n stakeDistribution.add(newNodeStake);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"======================================================\");\n findNewLeader(getHighestBlock());\n }",
"public EditLock()\n\t\t{\n\t\t\tthis(null, null);\n\t\t}",
"@Override\n public StakingBlock createStakingBlockTemplate(Block parent, List<AionTransaction> pendingTransactions, byte[] signingPublicKey, byte[] newSeed, byte[] coinbase) {\n lock.lock();\n try {\n if (pendingTransactions == null) {\n LOG.error(\"createStakingBlockTemplate failed, The pendingTransactions list can not be null\");\n return null;\n }\n\n if (signingPublicKey == null) {\n LOG.error(\"createStakingBlockTemplate failed, The signing public key is null\");\n return null;\n }\n\n if (newSeed == null) {\n LOG.error(\"createStakingBlockTemplate failed, The seed is null\");\n return null;\n }\n\n if (coinbase == null) {\n LOG.error(\"createStakingBlockTemplate failed, The coinbase is null\");\n return null;\n }\n\n // Use a snapshot to the given parent.\n pushState(parent.getHash());\n try {\n return createNewStakingBlock(parent, pendingTransactions, newSeed, signingPublicKey, coinbase);\n } finally {\n // Ensures that the repository is left in a valid state even if an exception occurs.\n popState();\n }\n } finally{\n lock.unlock();\n }\n }",
"private LockInfo() {\n _record = new ZNRecord(ZNODE_ID);\n setLockInfoFields(DEFAULT_OWNER_TEXT, DEFAULT_MESSAGE_TEXT, DEFAULT_TIMEOUT_LONG);\n }",
"public TimeBlock() {\n name = \"To be assigned\";\n startingTime = \"00:00\";\n endingTime = \"00:00\";\n duration = 0;\n }",
"public MutableBlock createMutableBlock(TimeParameter timeValue) {\r\n return createMutableBlock(timeValue.getTextField());\r\n }",
"WithCreate withLevel(LockLevel level);",
"Freeze createFreeze();",
"@Override\n\tpublic Lock makeLock(Directory directory, String lockName) {\n\n\t\treturn new AeroLock(sfy, lockName);\n\t}",
"FreezeStatement createFreezeStatement();",
"void createLocked() {\n\t\t\texpandIcon.setVisibility(View.GONE);\n\t\t\tbackground.setClickable(false);\n\t\t\tbackground.setOnClickListener(null);\n\t\t\tbackground.setBackground(null);\n\t\t\tsetExpanded(true, false);\n\n\t\t\tcardView.setCardElevation(cardView.getResources().getDimension(R.dimen\n\t\t\t\t\t.myboutlibs_author_card_locked_elevation));\n\t\t\t((ViewGroup.MarginLayoutParams) cardView.getLayoutParams()).leftMargin = 0;\n\t\t\t((ViewGroup.MarginLayoutParams) cardView.getLayoutParams()).rightMargin = 0;\n\t\t\t((ViewGroup.MarginLayoutParams) cardView.getLayoutParams()).bottomMargin = cardView\n\t\t\t\t\t.getResources().getDimensionPixelSize(R.dimen\n\t\t\t\t\t\t\t.myboutlibs_author_card_locked_elevation);\n\t\t}",
"public LockLayer() {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a error matrix sampled from the distribution in the lwebgn paper. | public BigInteger[][] generateErrorMatrix(){
return null;
} | [
"public double getError(double[] weights);",
"private static double[][] generateRandomMatrix (int numRows, int numCols) {\r\n double matrix[][] = new double[numRows][numCols];\r\n for (int row = 0 ; row < numRows ; row++ ) {\r\n for (int col = 0 ; col < numCols ; col++ ) {\r\n matrix[row][col] = (double) ((int) (Math.random() * 10.0));\r\n }\r\n }\r\n return matrix;\r\n }",
"@Test\n public void testExp() {\n System.out.println(\"exp\");\n DoubleArrayList relErrs = new DoubleArrayList();\n int trials = 10000;\n for (int i = 0; i < trials; i++) {\n double x = rand.nextDouble() * 50 - 25;\n relErrs.add(relErr(Math.exp(x), FastMath.exp(x)));\n }\n Collections.sort(relErrs);\n assertTrue(relErrs.getDouble((int) (trials * .95)) <= 1e-3);\n }",
"public double[] getCrossEntropyError(double[] actualOutput) {\n int n = actualOutput.length;\n double[] errors = new double[n];\n\n for (int i = 0; i < n; i++) {\n errors[i] = - (mExpectedOutput[i] * Math.log(actualOutput[i]));\n }\n\n return errors;\n }",
"public EDistribution generate()\n\t{\n\t\t\n\t\tGARunner ru = new GARunner(qDist);\n\t\tGenotype best = ru.runGA(100);\n\t\tint[] arr = best.getCodeSet();\n\t\t//Let us calculate the eDist from this x.\n//\t\tMake a double array of x\n\t\tdouble[] x = new double[arr.length];\n\t\tfor(int i=0;i<x.length;i++)\n\t {\n\t\t\t x[i] = arr[i] / 10000.0; //TODO: Get rid of this magic number\n\t }\n\t\t\n\t\tdouble[] q = qDist.getDist();\n\t\t//Use Newman Formula\n\t\tdouble[][] eArr = new double[q.length][q.length];\n\t\tfor (int j = 0; j < eArr.length; j++) {\n\t\t\tfor (int k = 0; k < eArr.length; k++)\n\t\t\t{\n\t\t\t\teArr[j][k] = (q[j] * x[k]) + (q[k] * x[j]) - (x[j] * x[k]);\n\t\t\t\t//eArr[j][k] = (q[q.length-1-j] * x[q.length-1-k]) + (q[q.length-1-k] * x[q.length-1-j]) - (x[q.length-1-j] * x[q.length-1-k]);\t\n\t\t\t}\n\n\t\t}\n\t\tEDistribution ed = new EDistribution(eArr);\n\t\t//Calculate The Assortativeness for this EDist\n\t\tEDistributionGenerator egg = new EDistributionGenerator();\n\t\tdouble r = egg.calculate_r(ed,qDist);\n\t\tSystem.out.println(\"best rmin \"+r);\n\t\treturn ed;\n\t}",
"public void calcularError()\n\t{\n\t\t/* Ahora obtengo el error de calculo, al despejar las incognitas matricialmente tengo que:\n\t\t * \t A * X = Berr (al realizar el calculo obtengo el vector solucion mas o menos un error de redondeo)\n\t\t * \n\t\t * Para calcular ese error de redondeo, utilizo la longitud del vector, calculandola a traves de la norma dos, entonces:\n\t\t * err = Modulo ( longitud de Berr - longitud de B )\n\t\t */\n\t\tVectorMath aux = matrizCoef.producto(vectorSol);\t\t\n\t\terrorDeCalculo = Math.abs(aux.restar(vectorTermInd).normaDos());\n\t}",
"public double[] getErrorArray(int... pos);",
"public double[] getPseudoErrors() {\n return pseudoSd.clone();\n }",
"private double[] camerr(double r, int ibody){\r\n\t\t//% Range from Earth in m\r\n\t\t//double[] erange= {1069177850, 213835570, 71278520, 21383560, 13364720};\r\n\t\tdouble[] erange= {0,0,13364720,21383560,71278520,213835570,1069177850};\r\n\t\t//VectorN erange = new VectorN(erange_tmp);\r\n\t\t\r\n\t\t//% Range from Moon in m\r\n\t\t//double[] mrange = {291342820, 58268560, 19422850, 5826860, 3641790};\r\n\t\tdouble[] mrange = {1788000,1838000, 3641790,5826860,19422850,58268560,291342820};\r\n\t\t//VectorN mrange = new VectorN(mrange_tmp);\r\n\t\t\r\n\t\tdouble[] rv = new double[5];\r\n\t\tif (ibody == BODY_EARTH) //% Earth\r\n\t\t\trv=erange;\r\n\t\telse if (ibody == BODY_MOON) // % Moon\r\n\t\t\trv=mrange;\r\n\t\telse\r\n\t\t\tSystem.err.println(\"Invalid body flag\");\r\n\t\t\r\n\t\t\r\n\t\t//double[] angerr_rnd_deg= {0.0022, 0.011, 0.032, 0.105, 0.169};\r\n\t\tdouble[] angerr_rnd_deg= {0.47,0.44,0.169,0.105,0.032,0.011,0.0022};\r\n\t\t//double[] angerr_bias_deg= {biasflag*0.0046, biasflag*0.023, biasflag*0.070, biasflag*0.235, biasflag*0.375};\r\n\t\tdouble[] angerr_bias_deg= {biasflag*1.055,biasflag*0.98, biasflag*0.375,biasflag*0.235,biasflag*0.070,biasflag*0.023,biasflag*0.0046};\r\n\t\t\r\n\t\t//% Apollo numbers corresponding to 3km horizon sensing error\r\n\t\t//%angerr_rnd_deg= [ 0.0002 0.0008 0.0024 0.0080 0.0129]';\r\n\t\t\r\n\t\t//% Interpolate/extrapolate based on actual range\r\n\t\tInterpolator interp1 = new Interpolator(rv,angerr_rnd_deg);\r\n\t\tdouble arnd=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_rnd_deg,r,'linear','extrap')*pi/180;\r\n\t\tinterp1 = new Interpolator(rv,angerr_bias_deg);\r\n\t\tdouble abias=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_bias_deg,r,'linear','extrap')*pi/180;\r\n\t\t//*TODO watch this\r\n\t\t//arnd = 0;\r\n\t\tabias = 0;\r\n\t\tdouble[] out = {arnd, abias};\r\n\t\treturn out;\r\n\t}",
"@Test\n public void testDigamma() {\n System.out.println(\"digamma\");\n DoubleArrayList relErrs = new DoubleArrayList();\n int trials = 10000;\n for (int i = 0; i < trials; i++) {\n double x = rand.nextDouble() * 50;\n relErrs.add(relErr(SpecialMath.digamma(x), FastMath.digamma(x)));\n }\n Collections.sort(relErrs);\n assertTrue(relErrs.getDouble((int) (trials * .95)) <= 1e-3);\n }",
"WorldUps.UErr getError(int index);",
"void initiateProbabilityMatrix( int numberOfDocs ) {\r\n\t\t\ttm = new double[numberOfDocs][numberOfDocs];\r\n\t\t\tfor (int i = 0; i < numberOfDocs; i++) {\r\n\t\t\t\tint numberOfOutDegrees = out[i];\r\n\t\t\t\tif (numberOfOutDegrees == 0) {\r\n\t\t\t\t\tArrays.fill(tm[i], 1. / numberOfDocs);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfor (int j = 0; j < numberOfDocs; j++) {\r\n\t\t\t\t\tdouble probability = 0;\r\n\t\t\t\t\tif (p[i][j] == LINK) {\r\n\t\t\t\t\t\tprobability = (1 - BORED) * (1. / numberOfOutDegrees);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttm[i][j] = probability + BORED * (1. / numberOfDocs);\r\n\t\t\t\t}\r\n\t\t\t}\r\n }",
"private static float[][] makeRandomMatrix() {\n\t\tint m = 3 + (int) (Math.random() * 97);\n\t\tint n = 3 + (int) (Math.random() * 97);\n\t\t\n\t\tfloat[][] mat = new float[m][n];\n\t\t\n\t\tfor (int i = 0; i < m; i ++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tmat[i][j] = (float) (Math.random() * 100);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mat;\n\t}",
"public double calcR2Error() {\n\n // Need to produce a double[][] matrix of expected and predicted cell values to pass to GOF test\n double[][] calib = new double[1][cells.size()];\n double[][] test = new double[1][cells.size()];\n for (int i = 0; i < cells.size(); i++) {\n calib[0][i] = (double) cells.get(i).expected;\n test[0][i] = (double) cells.get(i).predicted;\n }\n // Normalise the matricies so they both sum to 1\n GOF_TEST.normalise(calib);\n GOF_TEST.normalise(test);\n return GOF_TEST.R2.getTest().test(calib, test);\n }",
"public static double[] getErrors() {\n return errors;\n }",
"double entropy() throws MatrixException;",
"private static void randomlyGeneratedInput() {\n\t\tint pages[] = new int[50];\n\t\tint numOfFrames[] = new int[] {3, 4, 5, 6};\n\t\t\n\t\t//Sum of page faults for each algorithm\n\t\tint totalPageFaultsFIFO = 0;\n\t\tint totalPageFaultsLRU = 0;\n\t\tint totalPageFaultsOptimal = 0;\n\t\t\n\t\tfor(int frameAmount = 0; frameAmount < numOfFrames.length; frameAmount++) {\n\t\t\tfor(int trials = 0; trials < 50; trials++) {\n\t\t\t\tfor(int i = 0; i < pages.length; i++) {\n\t\t\t\t\tRandom rng = new Random();\n\t\t\t\t\tpages[i] = rng.nextInt(8);\t\n\t\t\t\t}\n\t\t\t\tint pageFaultsFIFO = fifoRNG(pages, numOfFrames[frameAmount]);\n\t\t\t\ttotalPageFaultsFIFO = totalPageFaultsFIFO + pageFaultsFIFO;\n\t\t\t\tint pageFaultsLRU = lruRNG(pages, numOfFrames[frameAmount]);\n\t\t\t\ttotalPageFaultsLRU = totalPageFaultsLRU + pageFaultsLRU;\n\t\t\t\tint pageFaultsOptimal = optimalRNG(pages, numOfFrames[frameAmount]);\n\t\t\t\ttotalPageFaultsOptimal = totalPageFaultsOptimal + pageFaultsOptimal;\n\t\t\t\tSystem.out.println(\"Number of page frames: \" + numOfFrames[frameAmount] + \" Trial #: \" + (trials+1));\n\t\t\t\tSystem.out.println(\"FIFO page fault: \" + pageFaultsFIFO);\n\t\t\t\tSystem.out.println(\"LRU page fault: \" + pageFaultsLRU);\n\t\t\t\tSystem.out.println(\"Optimal page fault: \" + pageFaultsOptimal);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of page frames: \" + numOfFrames[frameAmount]);\n\t\t\tSystem.out.println(\"Average FIFO Page Faults after 50 trials: \" + (float) totalPageFaultsFIFO / 50f);\n\t\t\tSystem.out.println(\"Average LRU Page Faults after 50 trials: \" + (float) totalPageFaultsLRU / 50f);\n\t\t\tSystem.out.println(\"Average Optimal Page Faults after 50 trials: \" + (float) totalPageFaultsOptimal / 50f);\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttotalPageFaultsFIFO = 0;\n\t\t\ttotalPageFaultsLRU = 0;\n\t\t\ttotalPageFaultsOptimal = 0;\n\t\t}\n\t}",
"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 RandomTestErrors GetError() {\r\n\r\n return this.error;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "PeriodoDevengo" element | public java.util.Calendar getPeriodoDevengo()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODODEVENGO$2, 0);
if (target == null)
{
return null;
}
return target.getCalendarValue();
}
} | [
"public org.apache.xmlbeans.XmlGYearMonth xgetPeriodoDevengo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlGYearMonth target = null;\r\n target = (org.apache.xmlbeans.XmlGYearMonth)get_store().find_element_user(PERIODODEVENGO$2, 0);\r\n return target;\r\n }\r\n }",
"public java.util.Calendar getPeriodoDevengado()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODODEVENGADO$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }",
"public org.apache.xmlbeans.XmlGYearMonth xgetPeriodoDevengado()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlGYearMonth target = null;\r\n target = (org.apache.xmlbeans.XmlGYearMonth)get_store().find_element_user(PERIODODEVENGADO$2, 0);\r\n return target;\r\n }\r\n }",
"public String getPeriodo() {\n\t\treturn periodo;\n\t}",
"public Periodo getPeriodo() {\n return periodo;\n }",
"public org.apache.xmlbeans.XmlDate xgetPeriodoHasta()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(PERIODOHASTA$14, 0);\r\n return target;\r\n }\r\n }",
"public java.util.Calendar getPeriodoHasta()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODOHASTA$14, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }",
"public org.apache.xmlbeans.XmlDate xgetPeriodoDesde()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(PERIODODESDE$12, 0);\r\n return target;\r\n }\r\n }",
"public java.util.Calendar getPeriodoDesde()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODODESDE$12, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }",
"public void unsetPeriodoDevengo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PERIODODEVENGO$2, 0);\r\n }\r\n }",
"public cl.sii.siiDte.libroboletas.LibroBoletaDocument.LibroBoleta.EnvioLibro.ResumenPeriodo getResumenPeriodo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n cl.sii.siiDte.libroboletas.LibroBoletaDocument.LibroBoleta.EnvioLibro.ResumenPeriodo target = null;\r\n target = (cl.sii.siiDte.libroboletas.LibroBoletaDocument.LibroBoleta.EnvioLibro.ResumenPeriodo)get_store().find_element_user(RESUMENPERIODO$4, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public void setPeriodoDevengo(java.util.Calendar periodoDevengo)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODODEVENGO$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERIODODEVENGO$2);\r\n }\r\n target.setCalendarValue(periodoDevengo);\r\n }\r\n }",
"public java.lang.Integer getPeriodo() {\n return periodo;\n }",
"public cl.sii.siiDte.libroboletas.ValorType xgetMntPeriodo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n cl.sii.siiDte.libroboletas.ValorType target = null;\r\n target = (cl.sii.siiDte.libroboletas.ValorType)get_store().find_element_user(MNTPERIODO$28, 0);\r\n return target;\r\n }\r\n }",
"public Element getElement(Document doc) {\r\n\t\t\r\n\t\tElement helicoptero = doc.createElement(\"Helicoptero\");\r\n\t\t\r\n\t\tElement atributos = doc.createElement(\"Atributos\");\r\n\t\thelicoptero.appendChild(atributos);\r\n\t\t\r\n\t\tsuper.writeElement(atributos, doc);\r\n\t\t\r\n\t\t\t\r\n\t\tElement radioGiro = doc.createElement(\"RadioGiro\");\r\n\t\tatributos.appendChild(radioGiro);\r\n\t\tradioGiro.setTextContent(String.valueOf(this.radioGiro));\r\n\t\t\r\n\t\tElement centroGiroX = doc.createElement(\"CentroGiroX\");\r\n\t\tatributos.appendChild(centroGiroX);\r\n\t\tcentroGiroX.setTextContent(String.valueOf(this.centroGiroX));\r\n\t\t\r\n\t\tElement centroGiroY = doc.createElement(\"CentroGiroY\");\r\n\t\tatributos.appendChild(centroGiroY);\r\n\t\tcentroGiroY.setTextContent(String.valueOf(this.centroGiroY));\r\n\t\t\r\n\t\tElement regresando = doc.createElement(\"Regresando\");\r\n\t\tatributos.appendChild(regresando);\r\n\t\tregresando.setTextContent(String.valueOf(this.regresando));\r\n\t\t\r\n\t\tElement entroAlCirculo = doc.createElement(\"EntroAlCirculo\");\r\n\t\tatributos.appendChild(entroAlCirculo);\r\n\t\tentroAlCirculo.setTextContent(String.valueOf(this.entroAlCirculo));\r\n\r\n\r\n\t\treturn helicoptero;\r\n\t}",
"public HtmlInputText getTxtPeriodo() {\r\n\t\treturn txtPeriodo;\r\n\t}",
"public void unsetPeriodoDevengado()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PERIODODEVENGADO$2, 0);\r\n }\r\n }",
"public boolean isSetPeriodoDevengo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PERIODODEVENGO$2) != 0;\r\n }\r\n }",
"public void setPeriodoDevengado(java.util.Calendar periodoDevengado)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODODEVENGADO$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERIODODEVENGADO$2);\r\n }\r\n target.setCalendarValue(periodoDevengado);\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface that defines requirements for receipts when they need to be displayed | public interface Receipt
{
/**
* The header for the receipt
* @return a string for the very top part of the receipt, with the user's name and other relevant information displayed
*/
String header();
/**
* The list of all the reservations that should be included in the receipt, including a total cost at the bottom
* @return a string representation of all reservations with a total cost
*/
String receiptList();
} | [
"public abstract String getRequirements();",
"public interface ReceiptStrategy {\r\n public abstract void printReceipt();\r\n public abstract void addLineItem(String productID, int quantity);\r\n public abstract void addToLineItemArray(LineItem item);\r\n \r\n}",
"ReceiptCreator createReceiptCreator();",
"public interface ITicketReadOnly {\n /**\n * @return true if an order is in a final state\n */\n default boolean isCompleted() {\n return getStatus() == Status.CANCELED || getStatus() == Status.FILLED || getStatus() == Status.REJECTED;\n }\n\n default boolean isNotCompleted() {\n return !isCompleted();\n }\n\n default boolean isCancelable() {\n return isNotCompleted() && getStatus() != Status.CANCELLING;\n }\n\n Ticket.Status getStatus();\n\n int getPrice();\n\n int getOrderQty();\n\n int getCumQty();\n\n int getLeavesQty();\n\n String getBetId();\n\n String getCorrelationId();\n\n String getMarketId();\n\n long getSellectionId();\n\n Side getSide();\n\n /**\n * @return creation timestamp\n */\n long getTimestamp();\n\n CurrentOrderSummary toSummary();\n\n default boolean isExecutable() {\n return getStatus() == Status.WORKING || getStatus() == Status.CANCELLING;\n }\n\n ;\n\n default boolean isUnconfirmed() {\n return getStatus() == Status.WAITING;\n }\n\n\n public enum Status {\n WAITING, WORKING, CANCELLING, CANCELED, FILLED, REJECTED\n }\n}",
"private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add(\"Job No. is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqStatus()))\n\t\t\tmessages.add(\"PO Status is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqType()))\n\t\t\tmessages.add(\"PO Type is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getCurrentOdo()))\n\t\t\tmessages.add(\"Odo is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate()))\n\t\t\tmessages.add(\"Actual Start Date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getPlannedEndDate()))\n\t\t\tmessages.add(\"End date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getServiceProvider()))\n\t\t\tmessages.add(\"Service Provider is required\");\n\t\t/* TODO Need to determine if this check is necessary. We do not have a hard requirement for this.\n\t\tif(!MALUtilities.isEmpty(po.getServiceProvider()) \n\t\t\t\t&& (!MALUtilities.convertYNToBoolean(po.getServiceProvider().getNetworkVendor()) \n\t\t\t\t\t\t&& this.calculateMarkUp(po).compareTo(new BigDecimal(0.00)) < 1))\n\t\t\tmessages.add(\"Mark Up is required for out of network service providers\");\n\t */\n\t\t\n\t\t//Validate PO Line items (tasks) required data\n\t\tif(!MALUtilities.isEmpty(mrq.getMaintenanceRequestTasks())){\n\t\t\tfor(MaintenanceRequestTask line : mrq.getMaintenanceRequestTasks()){\n\t\t\t\tif(MALUtilities.isEmptyString(line.getMaintCatCode()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Maint Category is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTaskQty()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Qty is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getUnitCost()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Unit Price is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTotalCost())) \n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total Amount is required\");\t\t\t\t\t\t\t\t\n\t\t\t\tif(!(MALUtilities.isEmpty(line.getTaskQty()) && MALUtilities.isEmpty(line.getUnitCost()))){\n\t\t\t\t\tamount = line.getUnitCost().multiply(line.getTaskQty()).setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\t\t\t\tif( amount.compareTo(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP)) != 0)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total amount is incorrect\");\t\t\t\t\t\t\t\n\t\t\t\t}\t\n/** TODO This will not work well with goodwill POs as the user will not have the changes to add cost avoidance data to subsequent lines.\t\t\t\t\n\t\t\t\tif(mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillReason()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillCost()) || line.getGoodwillCost().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Amount is required\");\t\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillPercent()) || line.getGoodwillPercent().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Percent is required\");\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\t\t\t\t\t\n\t\t\t\t}\n*/\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(messages.size() > 0)\n\t\t\tthrow new MalBusinessException(\"service.validation\", messages.toArray(new String[messages.size()]));\t\t\n\t\t\n\t}",
"void displayReceiptOptions(DisplayReceiptOptionsRequest request);",
"public abstract void generateReceipt(Transaction trans);",
"void setValidity(InvoiceValidity validity);",
"protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }",
"@Override\n public Print_Receipt CreatePrintReceipt(){\n return new Print_Receipt1();\n }",
"public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}",
"public RequirementsRecord() {\n super(Requirements.REQUIREMENTS);\n }",
"public interface Offer {\n\n /**\n * Apply this offer to the given DiscountingContext\n * either the same context if we have not applied the offer\n * or a new context which reflects any new discounts applied\n * and required items used up\n * @param context\n * @return\n */\n DiscountingContext apply(DiscountingContext context);\n\n /**\n * Is this offer valid for the given date\n * @param date\n * @return true if it is valid false otherwise\n */\n boolean isValidForDate(LocalDate date);\n\n /**\n * Is this offer potentially valid for the given collection of items\n *\n * This is an opportunity to count ourselves out of the running\n * if the basket is missing a key component of the offer\n *\n * @param items\n * @return true if the offer is valid for the given set of items\n */\n boolean isValidForBasket(Collection<Item> items);\n\n}",
"public interface ReceiptOutputStrategy {\r\n /**\r\n * Generates a record of a transaction to a form of output.\r\n * @param trans the transaction object to be recorded\r\n */\r\n public abstract void generateReceipt(Transaction trans);\r\n}",
"public interface Cashier {\n\t\n\t// Sent from waiter to computer a bill for a customer\n\tpublic abstract void msgComputeBill(String choice, Customer c, Waiter w, int tableNumber, Map<String, Double> menu);\n\t\n\t// Sent from a customer when making a payment\n\tpublic abstract void msgPayment(Customer customer, Cash cash);\n\n\tpublic abstract void msgAskForPayment(String food, int batchSize, Market market, double price);\n\n\tpublic abstract String getCash();\t\n\t\n\tpublic abstract String getTotalDebt(); \n}",
"String getNeedsInventoryIssuance();",
"@Test\n public void testCheckPrerequisitesFalseNoFreeItems() throws NotEnoughItemsException {\n System.out.println(\"checkPrerequisites\");\n \n ForMItemsXGetNItemsYFree offer = new ForMItemsXGetNItemsYFree(\n testItems.get(\"Pizza Margherita\"), 3, \n testItems.get(\"Organic Olives\"), 2);\n\n Receipt receipt = new Receipt();\n receipt.add(testItems.get(\"Pizza Margherita\"));\n receipt.add(testItems.get(\"Pizza Margherita\"));\n receipt.add(testItems.get(\"Pizza Margherita\"));\n \n boolean result = offer.checkPrerequisites(receipt);\n assertFalse(result);\n }",
"public receipt() {\n initComponents();\n \n }",
"public interface Transaction {\n void startPurchase();\n void addTicket(int age, boolean isStudent);\n double finishPurchase();\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field taxCertUrl is set (has been assigned a value) and false otherwise | public boolean isSetTaxCertUrl() {
return this.taxCertUrl != null;
} | [
"public boolean isSetBusLicCertUrl() {\n return this.busLicCertUrl != null;\n }",
"public boolean isSetNatCert() {\n return this.natCert != null;\n }",
"public boolean isSetOrgCodeCertUrl() {\n return this.orgCodeCertUrl != null;\n }",
"public boolean isSetUrlValue()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(URLVALUE$2) != null;\r\n }\r\n }",
"public boolean isSetWebsiteUrl() {\n return this.websiteUrl != null;\n }",
"public boolean isSetUrl() {\n return this.url != null;\n }",
"public boolean isSetTaxId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(TAXID$40) != null;\r\n }\r\n }",
"public boolean hasCert() {\n return this.cert != null;\n }",
"public boolean isSetURL()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(URL$8) != 0;\n }\n }",
"public boolean isSetTaxRegistrationAuthority() {\n return taxRegistrationAuthority != null;\n }",
"public boolean hasCertrequired() {\n return result.hasCertrequired();\n }",
"public boolean isSetLogoUrl() {\n return this.logoUrl != null;\n }",
"public boolean isSetLandCert() {\n return this.landCert != null;\n }",
"public boolean isSetTaxRegistrationId() {\n return taxRegistrationId != null;\n }",
"public boolean isSetMerchantImageUrl() {\n return this.merchantImageUrl != null;\n }",
"public boolean isSetCpyUrl() {\n return this.cpyUrl != null;\n }",
"public boolean isSetFileUrl() {\n return this.fileUrl != null;\n }",
"boolean hasPurchaseDetailsUrl();",
"public boolean isSetTaxClassifications() {\n return taxClassifications != null && !taxClassifications.isEmpty();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the portal pages. | Pages getPages(); | [
"List<PageAgent> getPages();",
"PortalPage getPortalPage();",
"java.lang.String getPages();",
"public List<Page> getPageList() {\n return conf.getPages().getPage();\n }",
"public String getPages() {\n return pages;\n }",
"public List getTargetPages();",
"public ArrayList<DiscoveryPage> getPages() {\n return pages;\n }",
"public List getSourcePages();",
"public List<PageContent> getAllPageContent();",
"java.util.List<com.google.cloud.documentai.v1beta3.Document.Page> getPagesList();",
"java.util.List<com.google.cloud.documentai.v1beta1.Document.Page> getPagesList();",
"int getPages();",
"public List<Page> getPages() {\r\n\t\treturn immutablePageList;\r\n\t}",
"public List<CrawlerWebPage> getPages()\n {\n return pages;\n }",
"public Query getPortalDocuments() {\r\n // TODO: Apply different cases to allow users to filter portals\r\n // Example query for A-Z portal names\r\n return mPortalCollectionReference.orderBy(\"name\", Query.Direction.ASCENDING);\r\n }",
"public Map<String,String> getAllPages() {\n\t\tMap<String, String> pages = new HashMap<>();\n\t\tString sql = \"SELECT * FROM pages\";\n\t\tConnection conn = openConnection();\n\t\t\n\t\ttry {\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(sql);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString pageName = rs.getString(\"page_name\");\n\t\t\t\tString pageHash = rs.getString(\"page_hash\");\n\t\t\t\tpages.put(pageName, pageHash);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tcloseConnection(conn);\n\t\t}\n\t\treturn pages;\n\t}",
"public static SortedSet<Integer> getPageIds ()\r\n {\r\n return parameters.pages;\r\n }",
"public Page[] getPages()\n {\n if (pages == null)\n {\n pages = new Page[pageCount];\n for (int i = 0; i < pageCount; i++)\n {\n pages[i] = Page.of(i + 1);\n }\n }\n return pages;\n }",
"public int getPages()\n {\n return pages;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get transactions list for multiple minter addresses with given page number | public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(List<MinterAddress> addresses, int page, int limit) {
checkArgument(addresses != null, "Address list can't be null");
checkArgument(addresses.size() > 0, "Address list can't be empty");
List<String> out = new ArrayList<>(addresses.size());
for (MinterAddress address : addresses) {
out.add(address.toString());
}
return getInstantService().getTransactions(out, page, limit);
} | [
"public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(List<MinterAddress> addresses, int page) {\n checkArgument(addresses != null, \"Address list can't be null\");\n checkArgument(addresses.size() > 0, \"Address list can't be empty\");\n\n List<String> out = new ArrayList<>(addresses.size());\n for (MinterAddress address : addresses) {\n out.add(address.toString());\n }\n\n return getInstantService().getTransactions(out, page);\n }",
"public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(List<MinterAddress> addresses, int page, TxFilter filter) {\n checkArgument(addresses != null, \"Address list can't be null\");\n checkArgument(addresses.size() > 0, \"Address list can't be empty\");\n\n List<String> out = new ArrayList<>(addresses.size());\n for (MinterAddress address : addresses) {\n out.add(address.toString());\n }\n\n if (filter == null || filter == TxFilter.None) {\n return getInstantService().getTransactions(out, page);\n } else {\n return getInstantService().getTransactions(out, page, filter.value);\n }\n }",
"List<MasterZipcode> getByPage(int pageNo);",
"public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(MinterAddress address, long fromBlock, long toBlock) {\n checkArgument(address != null, \"Address can't be null\");\n checkArgument(fromBlock >= 0 && toBlock >= 0, \"Start and End block must be greater or equals to zero\");\n return getInstantService().getTransactionsByAddress(address.toString(), fromBlock, toBlock);\n }",
"public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(MinterAddress address) {\n checkArgument(address != null, \"Address can't be null\");\n return getInstantService().getTransactionsByAddress(address.toString());\n }",
"List<ApartmentAccountBankTransaction> getApartmentTransactions(int theApartmentId);",
"Page<Transaction> getTransactionsByAccount(String accountId, Pageable pageable);",
"List<MasterZipcode> getByRangeZipcodeDesc(String zipcodeCodePattern, String zipcodeDescPattern, int pageNo);",
"public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(List<MinterAddress> addresses) {\n return getTransactions(addresses, 1);\n }",
"private List<HotelSearchResponse> queryMultiplePages(String cityId, String checkinDate, String checkoutDate, String adults) {\r\n\t\tList<Object> hotelResponsePaginated = null;//queryForHotels(cityId, checkinDate, checkoutDate, adults, \"1\");\r\n\t\tList<HotelSearchResponse> hotelResponseList = new ArrayList<HotelSearchResponse>();\r\n\t\t\r\n\t\tfor (int pageNumber=1; pageNumber<=5; pageNumber++) {\r\n\t\t\thotelResponsePaginated = queryForHotels(cityId, checkinDate, checkoutDate, adults, String.valueOf(pageNumber));\r\n\t\t\tif (hotelResponsePaginated == null) //Probably a condition wherein results have been exhausted\r\n\t\t\t\tbreak;\r\n\t\t\tList<HotelSearchResponse> tempHotelResponseList = hotelResponsePaginated.stream().map(e -> {\r\n\t\t\t\tMap<String, Object> map1 = (LinkedTreeMap) e;\r\n\t\t\t\treturn new ObjectMapper().convertValue(map1, HotelSearchResponse.class);\r\n\t\t\t}).collect(Collectors.toList());\r\n\t\t\thotelResponseList.addAll(tempHotelResponseList);\r\n\t\t}\r\n\t\t\r\n\t\treturn hotelResponseList;\r\n\t}",
"@NotNull\n List<Tx> txs(@NotNull String address, long startBlock, long endBlock) throws EtherScanException;",
"PageInfo<LotteryBusinessDTO> getPageLotteryBusinessList(int offset, int pageSize);",
"@NotNull\n List<Tx> txs(String address, long startBlock, long endBlock) throws ApiException;",
"@RequestMapping(value=\"/accounts/{accountNumber}/transactions\", method = RequestMethod.GET, headers = \"Accept=application/json\")\r\n public TransactionCollectionResponse getTransactions(\r\n \t\t@PathVariable(\"accountNumber\") String accountNumber) {\r\n \treturn transactionService.listTransactions4Account(accountNumber);\r\n }",
"@GetMapping(\"/services/transactions/{accountnum}\")\n\tpublic List<Transaction> listTransactions(@Validated @PathVariable String accountnum){\n\t\tList<Transaction> transactions = transactionRepository.findByAccountNumber(accountnum);\n\t\tif(transactions.size()==0)\n\t\t\tthrow new NoRecordsAvailableException(NO_TRANSACTIONS_FOUND);\n\t\treturn transactions;\n\t}",
"public List<Transaction> getTransactions(Long minTxnId, Long fromCommitTime, int maxResults);",
"private static TransactionList buildTransactionList(Map<String, Object> objectMap, TransactionSearchRequest request) {\n String totalElementsStr = SdkUtils.getValueIfNotNull(objectMap, ApiResults.TOTAL_ELEMENTS);\n long totalElements = 0;\n if (!totalElementsStr.isEmpty()) {\n totalElements = Long.parseLong(totalElementsStr);\n }\n String pageSizeStr = SdkUtils.getValueIfNotNull(objectMap, ApiResults.PAGE_SIZE);\n int pageSize = 0;\n if (!pageSizeStr.isEmpty()) {\n pageSize = Integer.parseInt(pageSizeStr);\n }\n Object companyUsersObj = objectMap.get(ApiResults.ELEMENTS);\n List<Transaction> transactionList = buildTransactionList(companyUsersObj);\n return new TransactionList(request.getPageNumber(), pageSize, totalElements, transactionList, request.getStartDate(), request.getEndDate());\n }",
"Page<Contact> getContacts(int index, int size);",
"cn.chain33.javasdk.model.protobuf.TransactionAllProtobuf.Transaction getTxs(int index);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The list of glue records for this `Registration`. Commonly empty. repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; | java.util.List<? extends com.google.cloud.domains.v1alpha2.DnsSettings.GlueRecordOrBuilder>
getGlueRecordsOrBuilderList(); | [
"java.util.List<com.google.cloud.domains.v1alpha2.DnsSettings.GlueRecord> \n getGlueRecordsList();",
"com.google.cloud.domains.v1alpha2.DnsSettings.GlueRecord getGlueRecords(int index);",
"public List<String> getRecordings(){\n findRecordings();\n return _records;\n }",
"@java.lang.Override\n public java.util.List<? extends osmosis.poolincentives.v1beta1.Incentives.DistrRecordOrBuilder> \n getRecordsOrBuilderList() {\n return records_;\n }",
"java.util.List<osmosis.poolincentives.v1beta1.Incentives.DistrRecord> \n getRecordsList();",
"java.util.List<com.google.cloud.domains.v1alpha2.RegisterParameters> \n getRegisterParametersList();",
"java.util.List<? extends osmosis.poolincentives.v1beta1.Incentives.DistrRecordOrBuilder> \n getRecordsOrBuilderList();",
"public final List<ResourceRecord> getAdditionalRecords() {\r\n return Collections.unmodifiableList(additionalRecords);\r\n }",
"public Record getRecords() {\n return records;\n }",
"public List<AllowedEndpointRecordType> allowedEndpointRecordTypes() {\n return this.innerProperties() == null ? null : this.innerProperties().allowedEndpointRecordTypes();\n }",
"@Output\n public List<String> getNsRecords() {\n if (nsRecords == null) {\n nsRecords = new ArrayList<>();\n }\n\n return nsRecords;\n }",
"public List<T> getRecordList() {\r\n\t\treturn recordList;\r\n\t}",
"public protobuf.clazz.Protocol.Record_RoomResponse.Builder addRecordListBuilder() {\n return getRecordListFieldBuilder().addBuilder(\n protobuf.clazz.Protocol.Record_RoomResponse.getDefaultInstance());\n }",
"java.util.List<? extends com.google.cloud.domains.v1alpha2.RegisterParametersOrBuilder> \n getRegisterParametersOrBuilderList();",
"public java.lang.String[] getDomainWhiteList() {\r\n return domainWhiteList;\r\n }",
"public ASPBuffer getLogonDomainList()\n {\n return configfile.domain_list;\n }",
"public GroupIntegrationListRecord() {\n super(GroupIntegrationList.GROUP_INTEGRATION_LIST);\n }",
"private static Stream<String> filterGlueRecords(\n String domainName, Stream<ResourceRecordSet> records) {\n return records\n .filter(record -> \"NS\".equals(record.getType()))\n .flatMap(record -> record.getRrdatas().stream())\n .filter(hostName -> hostName.endsWith('.' + domainName) && !hostName.equals(domainName));\n }",
"public static ArrayList<KeyedRecord> getRecordTypes() {\n\t\treturn getRecordTypes(0);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the tasks for this job. | protected abstract void createTasks(); | [
"@PostConstruct\n private void instantiateTasks()\n {\n defineSubstitutionsForDeployPackages();\n int position = 1;\n List<Task> tasks = new ArrayList<Task>();\n tasks.add(applicationContext.getBean(FreezeTask.class).assignTransition(position++, liveEnvName));\n tasks.add(applicationContext.getBean(RdsSnapshotRestoreTask.class).assign(position++, liveEnvName, stageEnvName, dbMap));\n tasks.add(applicationContext.getBean(ThawTask.class).assignTransition(position++, liveEnvName));\n tasks.add(applicationContext.getBean(SshVmCreateTask.class).init(position++, stageEnvName));\n tasks.add(applicationContext.getBean(LocalShellTask.class).assign(position++, liveEnvName, stageEnvName, createStageEnvConfig));\n tasks.add(applicationContext.getBean(LocalShellTask.class).assign(position++, liveEnvName, stageEnvName, deployPackagesConfig));\n tasks.add(applicationContext.getBean(RegisterApplicationTask.class).assign(position++, liveEnvName, stageEnvName));\n tasks.add(applicationContext.getBean(SmokeTestTask.class).assign(position++, stageEnvName));\n this.tasks = tasks;\n }",
"@PostConstruct\n public void setUpTasks() {\n final Iterable<Task> findAll = taskService.findAll();\n if (findAll != null) {\n findAll.forEach(task -> {\n\n final RunnableTask runnableTask = new RunnableTask(task.getId(), runTaskService);\n\n if (task.getCronExpression() != null) {\n log.info(\"Adding cron schedule for {} : {}\", task.getId(), task.getCronExpression());\n threadPoolTaskScheduler.schedule(runnableTask, new CronTrigger(task.getCronExpression()));\n }\n else if (task.getDelayPeriod() > 0) {\n log.info(\"Adding periodic schedule for {} : {}\", task.getId(), task.getDelayPeriod());\n threadPoolTaskScheduler.schedule(runnableTask, new PeriodicTrigger(task.getDelayPeriod()));\n }\n else {\n log.error(\"Invalid task {}\", task.getId());\n }\n\n });\n }\n }",
"listOfTasks createlistOfTasks();",
"private void createTaskList() {\n if (storage.loadFile()) {\n taskList = new TaskList(storage.dataFile);\n } else {\n taskList = new TaskList();\n }\n }",
"public void createTask(Task task) {\n listOfTasks.add(task);\n }",
"public void createJobs(){\n \t\n \tjobSimulator.simulateJobs(this.list, this.timeToPlay);\n\n }",
"private void populateTasks(){\n\t\tList<Task> aux = null;\n\t\t\n\t\tif(taskListMode.equals(TASK_MODE_USR)){\n\t\t\tCommand cmd = getCommand(FindTasksByUser.class);\n\t\t\tcmd = runCommand(cmd);\n\t\t\taux = ((FindTasksByUser)cmd).getResult();\n\t\t\t\n\t\t}else if(taskListMode.equals(TASK_MODE_IMG)){\n\t\t\tCommand cmd = getCommand(FindTasksByImage.class);\n\t\t\t((FindTasksByImage)cmd).setImage(getSession().getImage());\n\t\t\tcmd = runCommand(cmd);\n\t\t\taux = ((FindTasksByImage)cmd).getResult();\n\t\t}\n\t\t\n\t\tif(aux != null)\n\t\t\ttasks = createTaskItems(aux);\n\t}",
"public TaskGenerator() {\n if (taskNames == null) {\n setUpNameList();\n }\n }",
"private List<MyRecursiveAction> createSubTasks(){\n List<MyRecursiveAction> subTasks = new ArrayList<>();\n\n MyRecursiveAction subTask1 = new MyRecursiveAction(this.workLoad / 2);\n MyRecursiveAction subTask2 = new MyRecursiveAction(this.workLoad / 2);\n subTasks.add(subTask1);\n subTasks.add(subTask2);\n\n return subTasks;\n }",
"public void createTask(Folder folder, Task task);",
"Task createTask();",
"private TaskManager generateTaskManager(List<Task> tasks) throws Exception {\n TaskManager taskManager = new TaskManager();\n addToTaskManager(taskManager, tasks);\n return taskManager;\n }",
"private static void createTasks(Context c, WorkflowItem wi, EPerson[] epa)\n throws SQLException\n {\n // create a tasklist entry for each eperson\n for (int i = 0; i < epa.length; i++)\n {\n // can we get away without creating a tasklistitem class?\n // do we want to?\n TableRow tr = DatabaseManager.row(\"tasklistitem\");\n tr.setColumn(\"eperson_id\", epa[i].getID());\n tr.setColumn(\"workflow_id\", wi.getID());\n DatabaseManager.insert(c, tr);\n }\n }",
"@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }",
"protected abstract Collection<? extends SchedulerTask> createTasks(Language language, Snapshot snapshot);",
"public Tasks() {\n }",
"public Task makeTask() {\n Task genTask = new Task(this, state, generateLocationInNeighborhood());\n\n\n //state.printlnSynchronized(\"base bounty in neighborhood \" + id + \" is = \" + (totalTime / count));\n genTask.setBaseBounty(getBaseBounty(genTask.getJob().jobType, genTask));\n double br = getBountyRate(genTask.getLocation(),genTask.getJob().jobType);\n totalBr += br;\n genTask.setBountyRate(br);\n\n\n totalBaseBounty += genTask.getBounty();\n tasks.add(genTask);\n\n totalNumTasksGenerated++;\n return genTask;\n }",
"boolean createJobDefinitions(String experimentName, List<IScaleTask> tasks);",
"private Task createTask(String[] taskTokens) throws DukeException {\n switch (taskTokens[0]) {\n case \"[T]\":\n return new ToDo(taskTokens[2]);\n case \"[D]\":\n return new Deadline(taskTokens[2], taskTokens[3]);\n case \"[E]\":\n return new Event(taskTokens[2], taskTokens[3]);\n default :\n throw new DukeException(\"\");\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new world factory. | public WorldFactory() {
} | [
"private void createWorld() {\n\t\tworld = new World();\n\t}",
"public World createNewWorld() {\n\t\tSpecieInfo[] speciesInfo = new SpecieInfo[defaultSpeciesCount];\n\t\tfor (int i = 0; i < speciesInfo.length; i++) {\n\t\t\tlong specieId = (long) i;\n\t\t\tboolean isPrey = i % 2 == 0;\n\t\t\tspeciesInfo[i] = new SpecieInfo(isPrey, specieId,\n\t\t\t\t\tdefaultNeuronLayout, defaultInitBlobCount);\n\t\t}\n\n\t\tWorldInfo worldInfo = new WorldInfo(speciesInfo,\n\t\t\t\tdefaultWidth, defaultHeight);\n\t\treturn createNewWorld(worldInfo);\n\t}",
"public GameWorld createWorld() {\n\t\tGameWorld world = universe.createWorld();\n\t\tworlds.add(world);\n\t\treturn world;\n\t}",
"World createWorld();",
"public World createNewWorld(WorldInfo worldInfo) {\n\t\treturn new World(worldInfo);\n\t}",
"private static WorldDescription createWorld() {\r\n \t\tWorldDescription world = new WorldDescription();\t \r\n \t\tworld.setPlaneSize(100);\t\t\r\n \t \tObstacleGenerator generator = new ObstacleGenerator();\r\n \t generator.obstacalize(obstacleType, world); // activate to add obstacles\r\n \t // world.setPlaneTexture(WorldDescription.WHITE_GRID_TEXTURE);\r\n \t\treturn world;\r\n \t}",
"public World createWorld(){\r\n\t\tint n = getNbOfCubes();\r\n\t\tArrayList<Vector> allPositions = allPositionsGenerator();\r\n\t\t\r\n\t\t//uncomment the line below for cubes with different colors\r\n\t\t//ArrayList<Vector> allColors = colorGenerator();\r\n\t\t\r\n\t\t//uncomment the line below for red cubes only\r\n\t\tArrayList<Vector> allColors = redGenerator();\r\n\r\n\t\t//the current objective is visit all\r\n\t\tWorld world = new World(World.VISIT_ALL_OBJECTIVE);\r\n\t\tRandom r = new Random();\t\r\n\t\t\r\n\t\tfor (int i = 0; i < n; i++){\r\n\t\t\tint range = n-i;\r\n\t\t\tint index = r.nextInt(range);\r\n\t\t\t\r\n\t\t\tVector pos = allPositions.get(i);\r\n\t\t\tVector clr = allColors.get(index);\r\n\t\t\tallColors.remove(index);\r\n\t\t\t\r\n\t\t\tBlock block = new Block(pos);\r\n\t\t\tCube cube = new Cube(pos.convertToVector3f(), clr.convertToVector3f());\r\n\t\t\tblock.setAssocatedCube(cube);\r\n\t\t\t\r\n\t\t\tworld.addWorldObject(block);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn world;\r\n\t}",
"public World createNewWorld(MarkupMsg worldMsg) {\n\t\treturn WorldSerializer.createWorldFromMsg(worldMsg);\n\t}",
"public void create() {\n\t\tworldAABB = new AABB();\r\n\t\tworldAABB.lowerBound.set(new Vec2(Constants.lowerBoundx - Constants.boundhxy, Constants.lowerBoundy - Constants.boundhxy));\r\n\t\tworldAABB.upperBound.set(new Vec2(Constants.upperBoundx + Constants.boundhxy, Constants.upperBoundy + Constants.boundhxy));\r\n\r\n\t\t// Step 2: Create Physics World with Gravity\r\n\t\tVec2 gravity = new Vec2(Constants.gravityx, Constants.gravityy);\r\n\t\tboolean doSleep = true;\r\n\t\tworld = new World(worldAABB, gravity, doSleep);\r\n\t}",
"public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }",
"private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }",
"World() {\n\t\tlogger.info(\"new empty world instance\");\n\t\ttiles = new WorldTiles();\n\t}",
"@Override\n\tprotected void setWorldCreate(World world){\n this.setWorld(world);\n }",
"@Override\r\n public void generateWorld(World world) {\r\n // create the static non-moving bodies\r\n this.creator.createWorld(world, this, COLLISIONLAYERS);\r\n // create the transition areas\r\n this.creator.createTransition(world, this, NORTHTRANSITION, NORTH);\r\n this.creator.createTransition(world, this, SOUTHTRANSITION, SOUTH);\r\n \r\n }",
"public AquaWorld createRoom ( ) {\r\n\t\taqua_count++;\r\n\t\treturn AquaWorld.getInstance ( );\r\n\t}",
"private World createMenuWorld() {\n\t\tArrayList<Sprite> sprites = createTiles();\n\t\tGoal[] goals = new Goal[] {normalGoal, endlessGoal};\n\t\ttry {\n\t\t\treturn new World(this.player, sprites, goals);\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public World()\n\t{\n\t\tinitWorld();\t\n\t}",
"WorldGenerator getForWorld(World world);",
"protected WorldWindow createWorldWindow() {\n\t\treturn new WorldWindowGLJPanel();\r\n\t\t//return new WorldWindow();\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a clone of productiveRules | public List<Alteration> getProductiveRulesClone() {
return new ArrayList<Alteration>(productiveRules);
} | [
"public Algorithm makeCopy()\n {\n PrecedenceAlgorithm algorithm = new PrecedenceAlgorithm();\n algorithm.pluginName = pluginName;\n algorithm.mode = mode;\n algorithm.thesaurus = thesaurus;\n algorithm.termPreprocessor = termPreprocessor;\n algorithm.threshold = threshold;\n algorithm.effectiveness = effectiveness;\n algorithm.combine = combine;\n algorithm.enhance = enhance;\n algorithm.precedeWeight = precedeWeight;\n algorithm.succeedWeight = succeedWeight;\n algorithm.precedenceWeight = precedenceWeight;\n return algorithm;\n }",
"public IRule getCopy()\r\n\t{\r\n\t\tList<ICondition> theConditions = new ArrayList<ICondition>();\r\n\t\ttheConditions.addAll(this.conditions);\r\n\t\tIRule rule = new Rule(theConditions);\r\n\t\treturn rule;\r\n\t}",
"public Object clone() {\r\n\t\tPlanner ret = new Planner();\r\n\t\tfor(int i = 0;i < size();i++) {\r\n\t\t\ttry {\r\n\t\t\t\tret.addCourse((Course)courseList[i].clone());\r\n\t\t\t}catch(FullPlannerException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"@Override\n\tpublic ConditionConnective clone() {\n\t\tfinal ConditionConnective clone = new ConditionConnective(type);\n\t\tfor (final Condition c : conditions) {\n\t\t\tclone.conditions.add(c.clone());\n\t\t}\n\t\treturn clone;\n\t}",
"public Object clone() {\n\t\tSimpleLemma res = new SimpleLemma();\n\t\tEnumeration e = goals.elements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tGoal g = (Goal) e.nextElement();\n\t\t\tres.goals.add((Goal) g.clone());\n\t\t}\n\t\treturn res;\n\t}",
"@Override\r\n public CMP3Policy clone() {\r\n CMP3Policy policy = new CMP3Policy();\r\n policy.setPrimaryKeyClassName(getPKClassName());\r\n policy.setPKClass(getPKClass());\r\n return policy;\r\n }",
"protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }",
"@Override\r\n\tpublic Polynom_able copy() {\r\n\t\tPolynom_able polynom_able = new Polynom();\r\n\t\tIterator<Monom> iterator = this.iteretor();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tMonom m = iterator.next();\r\n\t\t\tpolynom_able.add(m);\r\n\t\t}\r\n\t\treturn polynom_able;\r\n\t}",
"private LinkgrabberFilterRule getCurrentCopy() {\r\n LinkgrabberFilterRule ret = this.rule.duplicate();\r\n save(ret);\r\n return ret;\r\n }",
"@Override\n public Game cloneGame(){\n GridGame clone = new pegsolitaire();\n clone.pieces = new LinkedList<Piece>();\n for(Piece pc : pieces){\n clone.pieces.add(pc.clonePiece());\n }\n clone.current_player = current_player;\n clone.size_x = size_x;\n clone.size_y = size_y;\n return clone;\n }",
"public abstract Vector<PuzzleRule> getRules();",
"@Override\n\tpublic Polynom_able copy() {\n\t\tPolynom newpolynom = new Polynom();\n\t\tIterator<Monom> iterator = this.iteretor();\n\t\tMonom temp;\n\t\twhile(iterator.hasNext()) {\n\t\t\ttemp = iterator.next();\n\t\t\tMonom newMonom = new Monom(temp);\n\t\t\tnewpolynom.add(newMonom);\n\t\t}\n\t\treturn newpolynom;\n\t}",
"Solution clone();",
"public Object clone() {\n return (Object) new F6Problem(this);\n }",
"public entity.Policy clonePolicy() {\n return ((com.guidewire.pc.domain.policy.PolicyPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pc.domain.policy.PolicyPublicMethods\")).clonePolicy();\n }",
"public entity.Policy clonePolicy() {\n return ((com.guidewire.pc.domain.policy.PolicyPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pc.domain.policy.PolicyPublicMethods\")).clonePolicy();\n }",
"public MVELCompositeRule() {\n super();\n rules = new TreeSet<>();\n proxyRules = new HashMap<>();\n }",
"public QPenaltyFunction clone() {\n\t\ttry {\n\t\t\treturn (QPenaltyFunction) super.clone();\n\t\t} catch (CloneNotSupportedException 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}",
"@Override\n\tpublic Polynom_able copy() {\n\t\t// TODO Auto-generated method stub\n\t\tIterator<Monom> here = iteretor();\n\t\tPolynom b = new Polynom();\n\t\t// to store the results\n\t\twhile (here.hasNext()) {\n\t\t\tMonom z = new Monom(here.next());\n\t\t\tb.add(z);\n\t\t\t// add Monoms one by one\n\t\t}\n\t\treturn b;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches for ScheduleRequests based on the criteria and returns a list of ScheduleRequest identifiers which match the search criteria. | public List<String> searchForScheduleRequestIds(@WebParam(name = "criteria") QueryByCriteria criteria,
@WebParam(name = "contextInfo") ContextInfo contextInfo)
throws InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException; | [
"public List<ScheduleRequestInfo> searchForScheduleRequests(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> searchForScheduleRequestSetIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> searchForScheduleRequestGroupConstraintIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> searchForScheduleIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> searchForScheduleTransactionIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleRequestSetInfo> searchForScheduleRequestSets(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> searchForScheduleBatchIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleInfo> searchForSchedules(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> searchForScheduleTransactionGroupIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleBatchInfo> searchForScheduleBatches(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleRequestGroupConstraintInfo> searchForScheduleRequestGroupConstraints(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleTransactionInfo> searchForScheduleTransactions(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<String> getScheduleRequestIdsByType(@WebParam(name = \"scheduleRequestTypeKey\") String scheduleRequestTypeKey,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleRequestDisplayInfo> searchForScheduleRequestDisplays(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleRequestInfo> getScheduleRequestsByIds(@WebParam(name = \"scheduleRequestIds\") List<String> scheduleRequestIds,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ScheduleTransactionGroupInfo> searchForScheduleTransactionGroups(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"public List<ReadOnlyTimeSeries> getSelectedSchedules(OgemaHttpRequest req) {\n\t\tfinal HashSet<ReadOnlyTimeSeries> set = new HashSet<>(scheduleSelector(req).getSelectedItems(req));\n\t\treturn new ArrayList<ReadOnlyTimeSeries>(set);\n\t}",
"List<Schedule> findSchedulesToRun ();",
"public List<String> searchForTimeSlotIds(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of dateFromString method, of class TimeUtils. | @Test
public void testDateFromString() throws Exception
{
System.out.println("TimeUtilsTest:testDateFromString");
Calendar c = Calendar.getInstance(Locale.ENGLISH);
c.clear();
c.set(2018, 1, 2, 12, 45, 0);
assertEquals(c.getTime(), tu.dateFromString("2018-02-02 12:45"));
c.clear();
c.set(2010, 11, 24, 23, 59, 0);
assertEquals(c.getTime(), tu.dateFromString("2010-12-24 23:59"));
c.set(0, 0, 0, 0, 0, 0);
assertEquals(c.getTime(), tu.dateFromString("0000-01-00 00:00"));
} | [
"@Test\n public void testInputDateString() {\n\n // use this as the expected calendar instance\n Calendar expCalDate = Calendar.getInstance(TZ);\n\n expCalDate.clear();\n expCalDate.set(1999, 9 - 1, 11);\n assertValidDate(\"1999-09-11\", expCalDate, false);\n }",
"@Test\r\n public void testStringDateLowerThan() throws ParseException\r\n {\r\n Stack<Object> parameters = CollectionsUtils.newParametersStack(STR_DATE_1, STR_DATE_2);\r\n le.run(parameters);\r\n assertEquals(TRUE, parameters.pop());\r\n }",
"@Test\n\t@DisplayName(\"string to date\")\n\tpublic void testStringToDate() throws ParseException\n\t{\n\t\tDateConverter d = new DateConverter(string1);\n\t\t\n\t\tString dateInString = \"1997-03-19\";\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t date1 = formatter.parse(dateInString);\n\t\t} catch (ParseException e) {\n\t\t //handle exception if date is not in \"dd-MMM-yyyy\" format\n\t\t}\n\t\tassertEquals(date1, d.getDate());\n\t}",
"@Test\n public void testDateTimeParser() {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"uuuu-MM-dd HH:mm\");\n\n // Converting datetime strings to LocalDateTime objects\n String dateTimeString = \"2021-02-06 23:30\";\n LocalDateTime dateTime = Parser.convertToDateTime(dateTimeString);\n assertNotNull(dateTime);\n assertEquals(dateTimeString, dateTime.format(formatter));\n\n // Converting date strings to LocalDateTime objects, with time set to 00:00\n String dateString = \"2021-02-06\";\n LocalDateTime date = Parser.convertToDateTime(dateString);\n assertNotNull(date);\n assertEquals(dateString + \" 00:00\", date.format(formatter));\n\n // Handling invalid date or datetime strings\n String nonDateTimeString = \"not a valid datetime string\";\n LocalDateTime nonDateTime = Parser.convertToDateTime(nonDateTimeString);\n assertNull(nonDateTime);\n }",
"Date getDateFromStringDate(String date);",
"@Test\n public void testDeserialize_String() throws Exception {\n System.out.println(\"deserialize\");\n String date = \"\";\n Date expResult = null;\n Date result = DateUtil.parseDate(date);\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 testIsValidateDate() {\n System.out.println(\"isValidateDate\");\n String dateString = \"2016-03-23T10:25:01Z\";\n boolean expResult = true;\n boolean result = DateUtil.isValidateDate(dateString);\n assertEquals(expResult, result);\n }",
"@Test(expected = ParseException.class)\n\tpublic void testParseIncorrectString() throws Exception\n\t{\n\t\tdateUtil.parseString(INCORRECT_DATE_STRING);\n\t}",
"@Test(expected = ParsingException.class)\n public void testConvertNoTimeStringToDate() throws ParsingException {\n parser.convertFromString(\"notADate\");\n }",
"@Override\n protected String assertValidTime( String value)\n {\n return assertDate( value);\n }",
"@Test\r\n public void testStringEqualsDate() throws ParseException\r\n {\r\n Stack<Object> parameters = CollectionsUtils.newParametersStack(STR_DATE_1, DATE_1);\r\n eq.run(parameters);\r\n assertEquals(TRUE, parameters.pop());\r\n }",
"public void testDateFormat() {\n //no need of testing.\n }",
"@Test\r\n public void testStringDateEquals() throws ParseException\r\n {\r\n Stack<Object> parameters = CollectionsUtils.newParametersStack(STR_DATE_1, STR_DATE_2);\r\n eq.run(parameters);\r\n assertEquals(FALSE, parameters.pop());\r\n }",
"@Test\n public void testInputStringWithoutTimeZoneInformation() {\n\n Calendar expCalDate = Calendar.getInstance(TZ);\n\n expCalDate.clear();\n expCalDate.set(1984, 04 - 1, 12, 6, 34, 22);\n assertValidDate(\"1984-04-12T06:34:22\", expCalDate, false);\n }",
"@Test\r\n public void testGetDatetimeFormat() {\r\n\r\n assertEquals(new SimpleDateFormat(datetimeFormat), instance.getDatetimeFormat());\r\n }",
"@Test\n public void testConvertIncorrectTimeStringToTime() {\n if (timestamp) {\n try {\n parser.convertFromString(DATE);\n fail(\"A parsing exception should have been thrown.\");\n } catch (ParsingException e) {\n // That's OK\n }\n }\n }",
"@Test\r\n public void testStringDateLowerThanOrEqual() throws ParseException\r\n {\r\n Stack<Object> parameters = CollectionsUtils.newParametersStack(STR_DATE_1, STR_DATE_2);\r\n le.run(parameters);\r\n assertEquals(TRUE, parameters.pop());\r\n }",
"@Test\r\n public void testDateToString_LocalDate() {\r\n String test = \"11/13/2017\";\r\n String form = dateToString(date);\r\n assertEquals(test,form);\r\n }",
"@Test\r\n public void testDateToString_LocalDate_String() {\r\n String test = \"11!13!2017\";\r\n String s = \"!\";\r\n String form = dateToString(date,s);\r\n assertEquals(test, form);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Distributes points when the game type is TP_NORMAL. | public abstract void distributeTeamsPointsNormalGame(Announce normalAnnounce); | [
"public void distributeTeamsPointsNormalGame(Announce normalAnnounce) {\n distributeTeamsPointsRedoubleGame(normalAnnounce, 1);\n }",
"public void distributeTeamsPointsRedoubleGame(Announce normalAnnounce) {\n distributeTeamsPointsRedoubleGame(normalAnnounce, 4);\n }",
"public void distributeTeamsPointsDoubleGame(Announce normalAnnounce) {\n distributeTeamsPointsRedoubleGame(normalAnnounce, 2);\n }",
"public final void distributeTeamsPoints() {\n final Announce normalAnnounce = game.getAnnounceList().getOpenContractAnnounce();\n final Announce lastAnnounce = game.getAnnounceList().getContractAnnounce();\n\n if (normalAnnounce != null && lastAnnounce != null) {\n if (lastAnnounce.getType().equals(AnnounceType.Normal)) {\n distributeTeamsPointsNormalGame(normalAnnounce);\n } else if (lastAnnounce.getType().equals(AnnounceType.Double)) {\n distributeTeamsPointsDoubleGame(normalAnnounce);\n } else if (lastAnnounce.getType().equals(AnnounceType.Redouble)) {\n distributeTeamsPointsRedoubleGame(normalAnnounce);\n }\n }\n }",
"private void initTypeDist()\n\t{\n\t\tRandom ran = new Random();\n\t\t// single-unit demand for agent_1\n\t\tint v_one = 3 + ran.nextInt(VALUE_UPPER_BOUND - 3);\n\t\tint v_i_upper_bound = ((NUM_GOODS * (v_one-1)) < VALUE_UPPER_BOUND) ? (NUM_GOODS * (v_one-1)) : VALUE_UPPER_BOUND;\n\t\t//System.out.println(v_one + \" \" + v_i_upper_bound);\n\t\tIterator<Strategy> iter = strategies.iterator();\n\t\t\n\t\t//double[] price = {3.5,0.4,0.4,0.4,0.4};\n\t\t\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tStrategy s = iter.next();\n\t\t\t\n\t\t\t//s.setPricePrediction(price);\n\t\t\t\n\t\t\tMap<BitSet, Integer> typeDist = new HashMap<BitSet, Integer>();\n\t\t\tif (s.getIndex() == 1)\n\t\t\t{\n\t\t\t\t// Give type distribution for every possible set of goods\n\t\t\t\tfor (BitSet bs : bitVector)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(bs);\n\t\t\t\t\tif (bs.cardinality() >= 1)\n\t\t\t\t\t{\n\t\t\t\t\t\ttypeDist.put(bs, new Integer(v_one));\n\t\t\t\t\t}\n\t\t\t\t\telse typeDist.put(bs, new Integer(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint v_i = v_one + 1 + ran.nextInt(v_i_upper_bound - v_one);\n\t\t\t\t// Give type distribution for every possible set of goods\n\t\t\t\tfor (BitSet bs : bitVector)\n\t\t\t\t{\n\t\t\t\t\tif (bs.cardinality() == NUM_GOODS)\n\t\t\t\t\t{\n\t\t\t\t\t\ttypeDist.put(bs, new Integer(v_i));\n\t\t\t\t\t}\n\t\t\t\t\telse typeDist.put(bs, new Integer(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\ts.setTypeDist(typeDist);\n\t\t}\n\t\t\n\t\tif (PRINT_DEBUG)\n\t\t{\n\t\t\titer = strategies.iterator();\n\t\t\twhile (iter.hasNext())\n\t\t\t{\n\t\t\t\tStrategy s = iter.next();\n\t\t\t\tSystem.out.println(\"Agent \" + s.getIndex() + \"'s type dist:\");\n\t\t\t\tif (s.isSingleUnitDemand()) System.out.println(\"Single-unit demand.\");\n\t\t\t\telse System.out.println(\"Non single-unit demand.\");\n\t\t\t\tMap<BitSet, Integer> m = s.getTypeDist();\n\t\t\t\t\n\t\t\t\tfor (BitSet bs : bitVector)\n\t\t\t\t{\n\t\t\t\t\tint value = m.get(bs).intValue();\n\t\t\t\t\tSystem.out.println(bs + \" \" + value + \" \" + bs.cardinality() + \" \" + bs.length());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void givePoints(int amount) {\n givePoints(amount, PointSource.SPECIAL);\n }",
"public static boolean pointDistribute(String str, MC hero) \n {\n Scanner scan = new Scanner (System.in); \n if (str.equalsIgnoreCase(\"N\") || str.equalsIgnoreCase(\"None\") || str.equalsIgnoreCase(\"Done\"))\n {\n return false; //if hero doesn't want to use points, he can just say none and method returns false to end\n }\n else if (str.equalsIgnoreCase(\"H\") || str.equalsIgnoreCase(\"Health\"))\n {\n System.out.print(\"Points to add on to health: \");\n int i = scan.nextInt();\n if (i <= hero.getPoints()) //if their points is greater or equal to how much they want to use\n {\n hero.setMaxHP(10*i + hero.getMaxHP()); //if so then the computer performs the action\n hero.setCurrentHP(hero.getMaxHP());\n hero.setPoints(hero.getPoints()-i);\n }\n else\n {System.out.println(\"Error. Limit to points.\" + \"\\n\");} //if not return that they have too little points\n }\n else if (str.equalsIgnoreCase(\"HL\") || str.equalsIgnoreCase(\"Heal\"))\n {\n System.out.print(\"Points to add on to raise heal: \");\n int i = scan.nextInt();\n if (i <= hero.getPoints()) //if their points is greater or equal to how much they want to use\n {\n hero.setMaxHeal(i + hero.getMaxHeal()); //if so then the computer performs the action\n hero.setMinHeal(i + hero.getMinHeal());\n hero.setPoints(hero.getPoints()-i);\n }\n else\n {System.out.println(\"Error. Limit to points.\" + \"\\n\");} //if not return that they have too little points\n }\n else if (str.equalsIgnoreCase(\"s\") || str.equalsIgnoreCase(\"strength\")) //same as health but with strength\n {\n System.out.print(\"Points to add on to strength: \");\n int i = scan.nextInt();\n if (i <= hero.getPoints())\n {\n hero.setStrength(hero.getStrength() + i);\n hero.setPoints(hero.getPoints()-i);\n }\n else\n {System.out.println(\"Error. Limit to points.\" + \"\\n\");} \n }\n else if (str.equalsIgnoreCase(\"a\") || str.equalsIgnoreCase(\"agility\"))\n {\n System.out.print(\"Points to add on to agility: \");\n int i = scan.nextInt();\n if (i <= hero.getPoints())\n {\n hero.setAgility(hero.getAgility() + i);\n hero.setPoints(hero.getPoints()-i);\n }\n else\n {System.out.println(\"Error. Limit to points.\" + \"\\n\");} \n }\n else if (str.equalsIgnoreCase(\"d\") || str.equalsIgnoreCase(\"defence\"))\n {\n System.out.print(\"Points to add on to defence: \");\n int i = scan.nextInt();\n if (i <= hero.getPoints())\n {\n hero.setDefence(hero.getDefence() + i);\n hero.setPoints(hero.getPoints()-i);\n }\n else\n {System.out.println(\"Error. Limit to points.\" + \"\\n\");}\n }\n else {return false;}\n if (hero.getPoints() == 0) //checks if they have 0 points, no more to use.\n {\n return false; //returns false if true\n }\n else\n {return true;} //else returns that they can use points again.\n }",
"public void applyParticleAtAttacker(int type, Entity target, Dist4d distVec)\r\n \t{\r\n \t\tTargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 64D);\r\n \r\n \t\tswitch (type)\r\n \t\t{\r\n \t\tcase 1: //light cannon\r\n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 6, this.posX, this.posY, this.posZ, distVec.x, distVec.y, distVec.z, true), point);\r\n \t\t\tbreak;\r\n \t\tcase 2: //heavy cannon\r\n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\r\n \t\t\tbreak;\r\n \t\tcase 3: //light aircraft\r\n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\r\n \t\t\tbreak;\r\n \t\tcase 4: //heavy aircraft\r\n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\r\n \t\t\tbreak;\r\n\t\tdefault: //melee\r\n\t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\r\n\t\t\tbreak;\r\n \t\t}\r\n \t}",
"public void scatter() {\n\t\t\t\n\t\t\t// if the scatter mode did not run out of time\n\t\t\tif (_scatterCount > 0) {\n\t\t\t\t\n\t\t\t\t// each ghost move according to bfs with their separate set targets\n\t\t\t\t_rGhost.move(_rGhost.bfs(new BoardCoordinate(Constants.R_SCATTER_ROW, Constants.R_SCATTER_COLUMN, true)));\n\t\t\t\t_oGhost.move(_oGhost.bfs(new BoardCoordinate(Constants.O_SCATTER_ROW, Constants.O_SCATTER_COLUMN, true)));\n\t\t\t\t_bGhost.move(_bGhost.bfs(new BoardCoordinate(Constants.B_SCATTER_ROW, Constants.B_SCATTER_COLUMN, true)));\n\t\t\t\t_pGhost.move(_pGhost.bfs(new BoardCoordinate(Constants.P_SCATTER_ROW, Constants.P_SCATTER_COLUMN, true)));\n\t\t\t\t_scatterCount -=1;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// if no time left, mode switch to chase\n\t\t\telse if (_scatterCount == 0){\n\t\t\t\t_mode = Mode.Chase;\n\t\t\t\t_chaseCount = (int)(Constants.CHASE_TIME/Constants.DURATION);\n\t\t\t}\n\t\t}",
"public void applyParticleAtTarget(int type, Entity target, Dist4d distVec)\r\n \t{\r\n \t\tTargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 64D);\r\n \t\t\r\n \t\tswitch(type)\r\n \t\t{\r\n \t\tcase 1: //light cannon\r\n\t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(target, 9, false), point);\r\n \t\t\tbreak;\r\n \t\tcase 2: //heavy cannon\r\n \t\t\tbreak;\r\n \t\tcase 3: //light aircraft\r\n \t\t\tbreak;\r\n \t\tcase 4: //heavy aircraft\r\n \t\t\tbreak;\r\n\t\tdefault: //melee\r\n \t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(target, 1, false), point);\r\n\t\t\tbreak;\r\n \t\t}\r\n \t}",
"private void distributePowerUp(Player pickedUpBy, PowerUpEntity powerUp, PowerUpType type) {\n\t\tPowerUpEffect effect = powerUp.getPowerUpEffect();\n\n\t\t// Abstraction issue that I don't know how to solve.\n\t\tif (effect instanceof LinePowerUpEffect) {\n\t\t\tdistributePlayerPowerUp(pickedUpBy, type, (LinePowerUpEffect) effect);\n\t\t} else if (effect instanceof RoundPowerUpEffect) {\n\t\t\tdistributeRoundPowerUp((RoundPowerUpEffect) effect);\n\t\t}\n\t}",
"public Field.Fieldelements placeShotComputer() {\r\n int sizeX = this.fieldUser.getSizeX();\r\n int sizeY = this.fieldUser.getSizeY();\r\n \r\n // probability that a field contains a ship (not in percent, 1000 is best)\r\n double[][] probability = new double[sizeX][sizeY];\r\n double sumProbability = 0;\r\n \r\n for (int posX = 0; posX < sizeX; posX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n // set probability for each field to 1\r\n probability[sizeX][sizeY] = 1.;\r\n \r\n // check neighbouring fields for hits and set probability to 1000\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY)) {\r\n probability[posX][posY] = 1000;\r\n }\r\n \r\n // 0 points if all fields above and below are SUNK or SHOT\r\n if ((Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY - 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY + 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX - 1, posY)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX + 1, posY))\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a neighbouring field is SUNK\r\n if (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if top right, top left, bottom right or bottom left is HIT\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a shot has already been placed\r\n if (Field.Fieldelements.WATER != fieldUser.getFieldStatus(posX, posY) &&\r\n Field.Fieldelements.SHIP != fieldUser.getFieldStatus(posX, posY)) {\r\n probability[posX][posY] = 0;\r\n }\r\n }\r\n }\r\n \r\n // calculate sum of all points\r\n // TODO check if probability must be smaller numbers\r\n for (int posX = 0; posX < sizeX; sizeX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n sumProbability += probability[posX][posY];\r\n }\r\n }\r\n \r\n // random element\r\n Random random = new Random();\r\n sumProbability = random.nextInt((int) --sumProbability);\r\n sumProbability++; // must at least be 1\r\n int posY = -1;\r\n int posX = -1;\r\n while (posY < sizeY - 1 && sumProbability >= 0) {\r\n posY++;\r\n posX = -1;\r\n while (posX < sizeX && sumProbability >= 0) {\r\n posX++;\r\n sumProbability = sumProbability - probability[posX][posY];\r\n }\r\n }\r\n return fieldUser.shoot(posX, posY);\r\n }",
"public void setSpawnProbabilities(int score,ArrayList<Tower> towers){\n quota=(int)(Math.sqrt((double)score)/6)+2;\n scaleFactor=1+score/1000;\n int factories=0;\n int parks=0;\n int houses=0;\n int monuments=0;\n int policefire=0;\n int recycling=0;\n int schools=0;\n int stores=0;\n int water=0;\n \n int total=0;\n for(Tower t: towers){\n if(t instanceof Factory){\n factories++;\n }\n if(t instanceof GreenBelt){\n parks++;\n }\n if(t instanceof House){\n houses++;\n }\n if(t instanceof Monument){\n monuments++;\n }\n if(t instanceof PoliceFire){\n policefire++;\n }\n if(t instanceof RecyclingCenter){\n recycling++;\n }\n if(t instanceof School){\n schools++;\n }\n if(t instanceof Store){\n stores++;\n }\n if(t instanceof WaterPurification){\n water++;\n }\n }\n total=factories+parks+houses+monuments+policefire+recycling+schools+stores+water;\n if (total!=0){\n \n \n EnemyProbabilityTable.setProbability(AbstractEnemy.EARTHQUACKE, total);\n EnemyProbabilityTable.setProbability(AbstractEnemy.EDUCATION, total*8/(schools*2+1));\n EnemyProbabilityTable.setProbability(AbstractEnemy.FIRE, total*6+parks+factories);\n EnemyProbabilityTable.setProbability(AbstractEnemy.FLOOD, 5+total*5);\n EnemyProbabilityTable.setProbability(AbstractEnemy.GRAFITTI, total*10/(schools+1));\n EnemyProbabilityTable.setProbability(AbstractEnemy.SMOG, total*5+factories*15);\n EnemyProbabilityTable.setProbability(AbstractEnemy.TRASH, (total*5+factories*15)/(recycling*2+1));\n EnemyProbabilityTable.setProbability(AbstractEnemy.WATER_POLUTION, (total*3+factories*20)/(water*3+1));\n if (score>500){\n EnemyProbabilityTable.setProbability(AbstractEnemy.GANGS, stores*15/(schools+1));\n }\n if (score>1000){\n EnemyProbabilityTable.setProbability(AbstractEnemy.CRIMINAL, (total*3+stores*5)/(policefire+factories+1));\n }\n if (score>2500){\n EnemyProbabilityTable.setProbability(AbstractEnemy.ARSONIST, total*3/(policefire+1));\n }\n \n }\n else{\n EnemyProbabilityTable.setProbability(AbstractEnemy.ARSONIST, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.CRIMINAL, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.EARTHQUACKE, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.EDUCATION, 100);\n EnemyProbabilityTable.setProbability(AbstractEnemy.FIRE, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.FLOOD, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.GANGS, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.GRAFITTI, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.SMOG, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.TRASH, 0);\n EnemyProbabilityTable.setProbability(AbstractEnemy.WATER_POLUTION, 0);\n }\n }",
"protected abstract void generatePoints();",
"THashMap<String, Double> getPermutations(int permType) {\n\t\tTHashMap<String, Double> ret = new THashMap();\n\t\tTIntArrayList candModSites = new TIntArrayList();\n\t\tArrayList<TIntArrayList> x = new ArrayList();\n\t\tint i = 0;\n\t\t\n\t\tif(permType == 0) { // generate forward (positive) permutations\n\t\t\t\n\t\t\t// Get candidate \"true\" sites to modify\n\t\t\tfor(i = 0; i < pepLen; i++) {\n\t\t\t\tString aa = Character.toString( peptide.charAt(i) );\n\t\t\t\tif( globals.targetModMap.containsKey(aa) ) candModSites.add(i);\n\t\t\t}\n\t\t\t\n\t\t\t// For the given candidate sites that can undergo modifications,\n\t\t\t// generate all possible permutations involving them.\n\t\t\tx = globals.SF.getAllCombinations(candModSites, numRPS);\n\t\t\t\n\t\t\tfor(TIntList a : x) {\n\t\t\t\tString modPep = \"\";\n\t\t\t\tif(modPosMap.containsKey(constants.NTERM_MOD)) modPep = \"[\";\n\t\t\t\t\n\t\t\t\tfor(i = 0; i < pepLen; i++) {\n\t\t\t\t\tString aa = Character.toString( peptide.charAt(i) ).toLowerCase();\n\t\t\t\t\t\n\t\t\t\t\tif(a.contains(i)) { // site to be modified\n\t\t\t\t\t\tmodPep += aa; //Character.toString( Character.toLowerCase(peptide.charAt(i)) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( nonTargetMods.containsKey(i) ) {\n\t\t\t\t\t\tmodPep += aa;\n\t\t\t\t\t}\n\t\t\t\t\telse modPep += aa.toUpperCase();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(modPosMap.containsKey(constants.CTERM_MOD)) modPep = \"]\";\n\t\t\t\t\n\t\t\t\tret.put(modPep, 0d);\n\t\t\t}\n\t\t}\n\t\telse { // generate decoy (negative) permutations\n\t\t\t\n\t\t\tfor(i = 0; i < pepLen; i++) {\n\t\t\t\tString AA = Character.toString( peptide.charAt(i) );\n\t\t\t\tString aa = AA.toLowerCase();\n int score = 0;\n if( !globals.targetModMap.containsKey(AA) ) score++;\n\n if( !this.nonTargetMods.containsKey(aa) ) score++;\n\n if(score == 2) candModSites.add(i);\n\t\t\t}\n\t\t\t\n\t\t\t// For the given candidate sites that can undergo modifications,\n\t\t\t// generate all possible permutations involving them.\n\t\t\tx = globals.SF.getAllCombinations(candModSites, numRPS);\n\t\t\t\n\t\t\tfor(TIntList a : x) {\n\t\t\t\tString modPep = \"\";\n\t\t\t\tif(modPosMap.containsKey(constants.NTERM_MOD)) modPep = \"[\";\n\t\t\t\t\n\t\t\t\tfor(i = 0; i < pepLen; i++) {\n\t\t\t\t\tString aa = Character.toString( peptide.charAt(i) ).toLowerCase();\n\t\t\t\t\t\n\t\t\t\t\tif(a.contains(i)) { // site to be modified\n\t\t\t\t\t\tString decoyChar = globals.getDecoySymbol( peptide.charAt(i) );\n\t\t\t\t\t\tmodPep += decoyChar;\n\t\t\t\t\t}\n\t\t\t\t\telse if( nonTargetMods.containsKey(i) ) {\n\t\t\t\t\t\tmodPep += aa;\n\t\t\t\t\t}\n\t\t\t\t\telse modPep += aa.toUpperCase();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(modPosMap.containsKey(constants.CTERM_MOD)) modPep = \"]\";\n\t\t\t\tret.put(modPep, 0d);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}",
"public void setTpDist(long value) {\n this.tpDist = value;\n }",
"private void computePValues(){\r\n\t\t\r\n\t\tNormalDistribution normal=new NormalDistribution();\r\n\t\t\r\n\t\tasymptoticRightTail=1.0-normal.getTipifiedProbability(Zright, false);\r\n\t\tasymptoticLeftTail=normal.getTipifiedProbability(Zleft, false);\r\n\r\n\t\tasymptoticDoubleTail=Math.min(Math.min(asymptoticLeftTail,asymptoticRightTail)*2.0,1.0);\r\n\t\t\r\n\t}",
"public abstract void deductHitPoints(int amount);",
"public void sauvegarderPointPartie (){\n\t\t\n\t\tint menage = (Integer) pointPartieEnCours.get(THEMES.MENAGE);\n\t\tint maths = (Integer) pointPartieEnCours.get(THEMES.MATHS);\n\t\tint francais = (Integer) pointPartieEnCours.get(THEMES.FRANCAIS);\n\t\t\n\t\tmenage += (Integer) level.get(THEMES.MENAGE);\n\t\tmaths += (Integer) level.get(THEMES.MATHS);\n\t\tfrancais += (Integer) level.get(THEMES.FRANCAIS);\n\t\t\n\t\tlevel.remove(THEMES.MENAGE); \n\t\tlevel.remove(THEMES.MATHS); \n\t\tlevel.remove(THEMES.FRANCAIS); \n\t\t\n\t\t\n\t\tlevel.put(THEMES.MENAGE ,menage); \n\t\tlevel.put(THEMES.MATHS ,maths); \n\t\tlevel.put(THEMES.FRANCAIS ,francais); \n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to validate the request coming for search airport API. Method will perform below validations: 1. It will validate sortOrder's value if present in request. If invalid, then method will throw BadRequestException. 2. It will validate the value for sortBy field. If the value is not one of the allowed values, then method will throw BadRequestException | public static void validateSearchAirport(String sortBy, String sortOrder) throws BadRequestException {
validateValuesForParameter(sortOrder, Constants.SORT_ORDER, Constants.ASC, Constants.DESC);
if(!StringUtils.equalsAnyIgnoreCase(sortBy, Constants.COUNTRY_COUNTRY_CODE,
Constants.COUNTRY_NAME)) {
throw new BadRequestException(StatusCodes.INVALID_VALUE_FOR_PARAM.getCode(), StatusCodes
.INVALID_VALUE_FOR_PARAM.getReason(), Constants.SORT_BY);
}
} | [
"private void validate(RequestDto request) throws Exception {\r\n\t\tString error = null;\r\n\t\t\r\n\t\tif(null == request.getRoomSize() \r\n\t\t\t\t|| request.getRoomSize().size() != 2\r\n\t\t\t\t|| null == request.getCoords()\r\n\t\t\t\t|| request.getCoords().size() != 2){\r\n\t\t\terror = \"Invalid room size and/or coordinates\";\r\n\t\t}else if(StringUtils.isEmpty(request.getInstructions())\r\n\t\t\t\t|| !request.getInstructions().matches(\"^[NEWS]+$\")){\r\n\t\t\terror = \"Invalid Instructions\";\r\n\t\t}\r\n\t\t\r\n\t\tif(null != error){\r\n\t\t\tthrow new InvalidRequestException(error);\r\n\t\t}\r\n\t}",
"private void validateSearchParams(FSMSearchCriteria criteria, List<String> allowedParams) {\n\n\t\tif (criteria.getMobileNumber() != null && !allowedParams.contains(\"mobileNumber\"))\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on mobileNumber is not allowed\");\n\n\t\tif (criteria.getOffset() != null && !allowedParams.contains(\"offset\"))\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on offset is not allowed\");\n\n\t\tif (criteria.getLimit() != null && !allowedParams.contains(\"limit\"))\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on limit is not allowed\");\n\n\t\tif (criteria.getApplicationNos() != null && !allowedParams.contains(\"applicationNos\")) {\n\t\t\tSystem.out.println(\"app..... \" + criteria.getApplicationNos());\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on applicationNo is not allowed\");\n\t\t}\n\t\tif (criteria.getFromDate() != null && !allowedParams.contains(\"fromDate\") && criteria.getToDate() != null\n\t\t\t\t&& !allowedParams.contains(\"toDate\")) {\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on fromDate and toDate is not allowed\");\n\t\t} else if( criteria.getFromDate() != null && criteria.getToDate() != null ){\n\n\t\t\tif ((criteria.getFromDate() != null && criteria.getToDate() == null)\n\t\t\t\t\t|| criteria.getFromDate() == null && criteria.getToDate() != null) {\n\t\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search only \"\n\t\t\t\t\t\t+ ((criteria.getFromDate() == null) ? \"fromDate\" : \"toDate\") + \" is not allowed\");\n\t\t\t}\n\n\t\t\tCalendar fromDate = Calendar.getInstance(TimeZone.getDefault());\n\t\t\tfromDate.setTimeInMillis(criteria.getFromDate());\n\t\t\tfromDate.set(Calendar.HOUR_OF_DAY, 0);\n\t\t\tfromDate.set(Calendar.MINUTE, 0);\n\t\t\tfromDate.set(Calendar.SECOND, 0);\n\n\t\t\tCalendar toDate = Calendar.getInstance(TimeZone.getDefault());\n\t\t\ttoDate.setTimeInMillis(criteria.getToDate());\n\t\t\ttoDate.set(Calendar.HOUR_OF_DAY, 23);\n\t\t\ttoDate.set(Calendar.MINUTE, 59);\n\t\t\ttoDate.set(Calendar.SECOND, 59);\n\t\t\ttoDate.set(Calendar.MILLISECOND, 0);\n\n\n\t\t\tif (fromDate.getTimeInMillis() > toDate.getTimeInMillis() ) {\n\t\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"fromdate cannot be greater than todate.\");\n\n\t\t\t}\n\t\t}\n\n\t\tif (CollectionUtils.isEmpty(criteria.getApplicationStatus()) && !allowedParams.contains(\"applicationStatus\")) {\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on applicationStatus is not allowed\");\n\t\t}\n\n\t\tif (CollectionUtils.isEmpty(criteria.getLocality()) && !allowedParams.contains(\"locality\")) {\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on applicationStatus is not allowed\");\n\t\t}\n\n\t\tif (CollectionUtils.isEmpty(criteria.getOwnerIds()) && !allowedParams.contains(\"ownerIds\")) {\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search on applicationStatus is not allowed\");\n\t\t}\n\n\t}",
"private void validateRequest() throws UnknownCurrencyProvidedException {\n if (Objects.isNull(CurrencyEnum.getCurrencyEnumFromValue(exchangeFrom)) || Objects.isNull(CurrencyEnum.getCurrencyEnumFromValue(exchangeTo))) {\n throw new UnknownCurrencyProvidedException();\n }\n }",
"public void validateRequestIntent() {\n\n if (mRequest == null) {\n Logger.v(TAG, \"Request item is null, so it returns to caller\");\n throw new IllegalArgumentException(\"Request is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getAuthority())) {\n throw new IllegalArgumentException(\"Authority is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getResource())) {\n throw new IllegalArgumentException(\"Resource is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getClientId())) {\n throw new IllegalArgumentException(\"ClientId is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getRedirectUri())) {\n throw new IllegalArgumentException(\"RedirectUri is null\");\n }\n }",
"private void validateInitialParams() throws IllegalArgumentException {\n if (StringUtils.isBlank(this.apiKey)) {\n throw new IllegalArgumentException(\"API key is not specified!\");\n }\n if (StringUtils.isBlank(this.baseUrl)) {\n throw new IllegalArgumentException(\"The Comet base URL is not specified!\");\n }\n }",
"private void validApiParams() throws VctcException {\n VctcApiCredentialParam credentialParam = apiParam.getCredentialParam();\n if (credentialParam == null) {\n throw new VctcClientException(ErrorCode.APIPARAMS_ISNULL);\n }\n if (credentialParam.getAppId() == null || \"\".equals(credentialParam.getAppId())) {\n throw new VctcClientException(ErrorCode.APP_ID_ISNULL);\n }\n if (credentialParam.getAppSecret() == null || \"\".equals(credentialParam.getAppSecret())) {\n throw new VctcClientException(ErrorCode.APP_SECRET_ISNULL);\n }\n if (credentialParam.getHostUrl() == null || \"\".equals(credentialParam.getHostUrl())) {\n throw new VctcClientException(ErrorCode.HOSTURL_ISNULL);\n }\n specialValidate();\n }",
"private String handleParamValidation() {\n String ret = \"\";\n String responseType = (String)this.fieldMap.get(\"responseType\");\n \n //PREP Map to check required detail attributes.\n Map requiredFieldMap = this.fieldMap;\n \n requiredFieldMap.put(\"userId\", this.fieldMap.get(\"userId\"));\n requiredFieldMap.put(\"responseType\", this.fieldMap.get(\"responseType\"));\n \n //INCLUDE required attributes as needed too.\n if (//responseType.equalsIgnoreCase(\"detail\")||\n responseType.equalsIgnoreCase(\"ecs\")) \n {\n requiredFieldMap.put(\"code\", (String)this.fieldMap.get(\"code\"));\n requiredFieldMap.put(\"codeSystemCode\", (String)this.fieldMap.get(\"codeSystemCode\")); \n\n } else {\n requiredFieldMap.put(\"domain\", this.fieldMap.get(\"domain\"));\n }\n\n ParameterValidator validator = new ParameterValidator(requiredFieldMap);\n String failures = validator.validateMissingOrEmpty();\n \n if (failures.length() > 1) {\n String errorMessage = \"GetPatientData: \" + failures + \"is a missing required field\";\n\n ErrorResponse err = new ErrorResponse(errorMessage, \"GetPatientData\");\n ret = err.generateError();\n return ret;\n }\n \n return ret;\n }",
"public static void validateInventoryRequest(final InvInventoryRequest request) {\r\n//\t\ttry {\r\n\t\t\tvalidateBaseRequest(request);\r\n//\t\t} \r\n//\t\tcatch (IllegalArgumentException e) {\r\n//\t\t\tthrow e;\r\n//\t\t}\r\n\t}",
"private void validateInputParameters(){\n\n }",
"public void validateSearch(RequestInfo requestInfo, FSMSearchCriteria criteria) {\n\t\t\n\t\tif (requestInfo.getUserInfo().getType().equalsIgnoreCase(FSMConstants.EMPLOYEE) && criteria.getTenantId().split(\"\\\\.\").length == 1) {\n\t\t\tthrow new CustomException(FSMErrorConstants.EMPLOYEE_INVALID_SEARCH, \"Employee cannot search at state level\");\n\t\t}\n\t\tif (!requestInfo.getUserInfo().getType().equalsIgnoreCase(FSMConstants.CITIZEN) && criteria.isEmpty())\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"Search without any paramters is not allowed\");\n\n\t\tif (!requestInfo.getUserInfo().getType().equalsIgnoreCase(FSMConstants.CITIZEN) && !criteria.tenantIdOnly()\n\t\t\t\t&& criteria.getTenantId() == null)\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"TenantId is mandatory in search\");\n\n\t\tif (requestInfo.getUserInfo().getType().equalsIgnoreCase(FSMConstants.CITIZEN) && !criteria.isEmpty()\n\t\t\t\t&& !criteria.tenantIdOnly() && criteria.getTenantId() == null) \n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"TenantId is mandatory in search\");\n\t\tif(criteria.getTenantId() == null)\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"TenantId is mandatory in search\");\n\t\t\t\n\t\tString allowedParamStr = null;\n\n\t\tif (requestInfo.getUserInfo().getType().equalsIgnoreCase(FSMConstants.CITIZEN))\n\t\t\tallowedParamStr = config.getAllowedCitizenSearchParameters();\n\t\telse if (requestInfo.getUserInfo().getType().equalsIgnoreCase(FSMConstants.EMPLOYEE))\n\t\t\tallowedParamStr = config.getAllowedEmployeeSearchParameters();\n\t\telse\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH,\n\t\t\t\t\t\"The userType: \" + requestInfo.getUserInfo().getType() + \" does not have any search config\");\n\n\t\tif (StringUtils.isEmpty(allowedParamStr) && !criteria.isEmpty())\n\t\t\tthrow new CustomException(FSMErrorConstants.INVALID_SEARCH, \"No search parameters are expected\");\n\t\telse {\n\t\t\tList<String> allowedParams = Arrays.asList(allowedParamStr.split(\",\"));\n\t\t\tvalidateSearchParams(criteria, allowedParams);\n\t\t}\n\t}",
"public interface FilterRequestValidator {\r\n\r\n /**\r\n * From the selected availabilities, get only those that are valid.\r\n *\r\n * @param selectedAvailabilities the availabilities selected in the filter\r\n * @return valid availabilities\r\n */\r\n public String[] getValidAvailabilitySelections(String[] selectedAvailabilities);\r\n\r\n /**\r\n * From the selected batches, get only those that have the expected format for the filter.\r\n *\r\n * @param selectedBatches batches selected in the filter\r\n * @return valid batch selections\r\n */\r\n public String[] getValidBatchSelections(String[] selectedBatches);\r\n\r\n /**\r\n * From selected centers, get those that are valid.\r\n *\r\n * @param selectedCenters centers selected in the filter\r\n * @return valid center ids\r\n */\r\n public String[] getValidCenterSelections(String[] selectedCenters);\r\n\r\n /**\r\n * From selected levels, get those that are valid.\r\n *\r\n * @param selectedLevels the levels selected in the filter\r\n * @return valid levels\r\n */\r\n public String[] getValidLevelSelections(String[] selectedLevels);\r\n\r\n /**\r\n * From selected platform types, get those that are valid (data type ids).\r\n *\r\n * @param selectedPlatformTypes platform types selected in the filter\r\n * @return valid platform types\r\n */\r\n public String[] getValidPlatformTypeSelections(String[] selectedPlatformTypes);\r\n\r\n /**\r\n * From selected protected statuses, get those that are valid.\r\n *\r\n * @param selectedProtectedStatuses protected statuses selected in the filter\r\n * @return valid protected statuses\r\n */\r\n public String[] getValidProtectedStatusSelections(String[] selectedProtectedStatuses);\r\n\r\n /**\r\n * From selected samples, get those that are valid.\r\n *\r\n * @param selectedSamples comma-separated list of selected samples in the filter\r\n * @return valid sample barcodes or wildcard searches\r\n */\r\n public String[] getValidSampleSelections(String selectedSamples);\r\n\r\n /**\r\n * From selected tumor/normal selections, get a list of valid tumor-normal selections.\r\n *\r\n * @param selectedTumorNormal tumor/normal selections from the filter\r\n * @return valid tumor/normal selections\r\n */\r\n public String[] getValidTumorNormalSelections(String[] selectedTumorNormal);\r\n\r\n /**\r\n * From selected platforms, get a list of valid platforms.\r\n *\r\n * @param selectedPlatforms platforms selected in the filter\r\n * @return valid platforms\r\n */\r\n public String[] getValidPlatformSelections(String[] selectedPlatforms);\r\n}",
"@Override\n public void validateSearchParameters(Map fieldValues) {\n List<String> lookupFieldAttributeList = null;\n if (getBusinessObjectMetaDataService().isLookupable(getBusinessObjectClass())) {\n lookupFieldAttributeList = getBusinessObjectMetaDataService().getLookupableFieldNames(getBusinessObjectClass());\n }\n if (ObjectUtils.isNull(lookupFieldAttributeList)) {\n throw new RuntimeException(\"Lookup not defined for business object \" + getBusinessObjectClass());\n }\n\n String agencyNumber = (String) fieldValues.get(KFSPropertyConstants.AGENCY_NUMBER);\n String proposalNumber = (String) fieldValues.get(KFSPropertyConstants.PROPOSAL_NUMBER);\n String invoiceDocumentNumber = (String) fieldValues.get(ArPropertyConstants.INVOICE_DOCUMENT_NUMBER);\n String customerNumber = (String) fieldValues.get(ArPropertyConstants.CustomerInvoiceWriteoffLookupResultFields.CUSTOMER_NUMBER);\n String customerName = (String) fieldValues.get(ArPropertyConstants.CustomerInvoiceWriteoffLookupResultFields.CUSTOMER_NAME);\n\n if ((ObjectUtils.isNull(customerNumber) || StringUtils.isBlank(customerNumber)) && (ObjectUtils.isNull(agencyNumber) || StringUtils.isBlank(agencyNumber)) && (ObjectUtils.isNull(customerName) || StringUtils.isBlank(customerName)) && (ObjectUtils.isNull(proposalNumber) || StringUtils.isBlank(proposalNumber)) && (ObjectUtils.isNull(invoiceDocumentNumber) || StringUtils.isBlank(invoiceDocumentNumber))) {\n GlobalVariables.getMessageMap().putError(KFSPropertyConstants.AGENCY_NUMBER, ArKeyConstants.ReferralToCollectionsDocumentErrors.ERROR_EMPTY_REQUIRED_FIELDS);\n }\n\n if (GlobalVariables.getMessageMap().hasErrors()) {\n throw new ValidationException(\"errors in search criteria\");\n }\n\n }",
"private void validate(final CartDto cartDto) throws BadRequestException {\n if (cartDto.getSkuCode() == null || \"\".equals(cartDto.getSkuCode())) {\n LOG.info(\"Sku code is mandatory.\");\n throw new BadRequestException(\"Sku code is mandatory\");\n }\n if (cartDto.getQuantity() <= 0) {\n LOG.info(\"Quantity must be 1 or greater.\");\n throw new BadRequestException(\"Quantity must be 1 or greater\");\n }\n }",
"public void validate() {\n if (types.isEmpty()) {\n throw new ModelingException(\"No request types defined!\");\n\n }\n if (services.isEmpty()) {\n throw new ModelingException(\"No services defined!\");\n }\n }",
"private boolean validate(Map<String,String> requestMap){\r\n\t\tboolean result = false;\r\n\t\tString zip = requestMap.get(PublicAPIConstant.ZIP);\r\n\t\tString soStatus = requestMap.get(PublicAPIConstant.SO_STATUS);\r\n\t\tList<String> soStatusList = new ArrayList<String>();\r\n\r\n\t\tif (null != soStatus) {\r\n\t\t\tStringTokenizer strTok = new StringTokenizer(\r\n\t\t\t\t\tsoStatus,\r\n\t\t\t\t\tPublicAPIConstant.SEPARATOR, false);\r\n\t\t\tint noOfStatuses = strTok.countTokens();\r\n\t\t\tfor (int i = 1; i <= noOfStatuses; i++) {\r\n\t\t\t\tsoStatusList.add(new String(strTok\r\n\t\t\t\t\t\t.nextToken()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tInteger pageSize = Integer.parseInt(requestMap.get(\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET));\r\n\t\t\r\n\t\tif(null!=zip&&zip.length() != 5){\r\n\t\t\trequestMap.put(PublicAPIConstant.ERROR_FIELD, \r\n\t\t\t\t\tPublicAPIConstant.ZIP);\r\n\t\t\treturn result;\t\r\n\t\t}\r\n\t\tList<Integer> pageSizeSetValues = Arrays.asList(\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET_10,\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET_20,\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET_50,\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET_100,\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET_200,\r\n\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET_500);\t\t\r\n\t\tif(!pageSizeSetValues.contains(pageSize)){\r\n\t\t\trequestMap.put(PublicAPIConstant.ERROR_FIELD, \r\n\t\t\t\t\tPublicAPIConstant.PAGE_SIZE_SET);\r\n\t\t\treturn result;\t\r\n\t\t}\t\r\n\t\t\r\n\t\tList<String> soStatusValues = Arrays.asList(\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_POSTED,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_ACCEPTED,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_ACTIVE,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_CLOSED,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_COMPLETED,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_DRAFTED,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_PROBLEM,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_EXPIRED,\r\n\t\t\t\tPublicAPIConstant.SOSTATUS_SET_PENDINGCANCEL\r\n\t\t);\t\t\r\n\t\tif(!soStatusValues.containsAll(soStatusList)){\r\n\t\t\trequestMap.put(PublicAPIConstant.ERROR_FIELD, \r\n\t\t\t\t\tPublicAPIConstant.SO_STATUS_SET);\r\n\t\t\treturn result;\t\r\n\t\t}\t\r\n\t\tresult = true;\r\n\t\treturn result;\r\n\t}",
"protected void validateRequestOption(java.lang.String[] param){\n \n }",
"private void validateFilters() {\r\n\t\t// There should be a column matching each filter\r\n\t\tList<FilterEnumeration> list = this.filterConfig.getFilters();\r\n\t\tif(list != null){\r\n\t\t\tfor(FilterEnumeration filter: list){\r\n\t\t\t\t// Do we have a column matching this filter?\r\n\t\t\t\tHeaderData header = map.get(filter.getColumnId());\r\n\t\t\t\tif(header == null) throw new IllegalArgumentException(\"Cannot find a column matching FilterEnumeration colum id: \"+filter.getColumnId());\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}",
"private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void throwValidationExcecptionForOrderByFieldNotInEntity() {\n\t\t\n\t\tassertThat(true).isEqualTo(false);\n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implemented method that takes no parameters and returns a short. | public short ShortVoidMethod()
{
return Short.MAX_VALUE;
} | [
"public native short __shortMethod( long __swiftObject, short arg );",
"short getShortNext();",
"public short getShort() throws MdsException\n\t{\n\t\tfinal Data data = executeWithContext(\"WORD(DATA($1))\", this);\n\t\tif (!(data instanceof Scalar))\n\t\t\tthrow new MdsException(\"Cannot convert Data to byte\");\n\t\treturn data.getShort();\n\t}",
"short getShort( int index );",
"public short toShort()\n {\n return (Short) toClass(Short.class);\n }",
"@SuppressWarnings(\"unused\")\n public static short randomShort()\n {\n byte[] result = randomBytes(2);\n ByteBuffer bb = ByteBuffer.wrap(result);\n return bb.getShort();\n }",
"abstract int readShort(int start);",
"public short shortValue() {\n\t\treturn (short) re;\n\t}",
"byte getSbyte(short value) {\n byte temp = (byte) value;\n return temp;\n}",
"short decodeShort();",
"public short getShort(int index);",
"protected final short getShort(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getShort(tableData, cursor+offset);\n }",
"public final void mSHORT() throws RecognitionException {\n try {\n int _type = SHORT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:109:7: ( 'short' )\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:109:9: 'short'\n {\n match(\"short\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void mSHORT() throws RecognitionException {\r\n try {\r\n int _type = SHORT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // D:\\\\Work and Projects\\\\Speciale\\\\ThesisDeobfuscator\\\\Deobfuscation\\\\src\\\\bytecodeDeobfuscation\\\\JVM.g:847:11: ( 'short' )\r\n // D:\\\\Work and Projects\\\\Speciale\\\\ThesisDeobfuscator\\\\Deobfuscation\\\\src\\\\bytecodeDeobfuscation\\\\JVM.g:847:14: 'short'\r\n {\r\n match(\"short\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public Buffer putShort(short value);",
"private short convertToShort() throws IOException {\n checkBuffer(2);\n short s = (short) (this.buffer[this.bufferOffset] << 8 | this.buffer[this.bufferOffset + 1] & 0xFF);\n this.bufferOffset += 2;\n return s;\n }",
"public final void mSHORT() throws RecognitionException {\n try {\n int _type = SHORT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:125:7: ( 'short' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:125:9: 'short'\n {\n match(\"short\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public short getShort(int columnIndex) throws SQLException {\n notOnARow();\n columnIndexOutOfRange(columnIndex);\n if (isNull(columnIndex)) {\n return 0;\n }\n _currentRow.get(columnIndex - 1);\n Number n = getNumber(columnIndex);\n return n.shortValue();\n }",
"private static final short m373toShortimpl(short s) {\n return s;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Since time window end timestamp is exclusive, we set the inclusive lower bound plus 1; Set lower bound to 0L for the first time emit so that when we fetchAll, we fetch from 0L | @Override
protected long emitRangeLowerBound(final long windowCloseTime) {
return lastEmitWindowCloseTime == ConsumerRecord.NO_TIMESTAMP ?
0L : Math.max(0L, lastEmitWindowCloseTime - windows.size()) + 1;
} | [
"@Override\n protected boolean shouldRangeFetch(final long emitRangeLowerBound, final long emitRangeUpperBound) {\n if (lastEmitWindowCloseTime != ConsumerRecord.NO_TIMESTAMP) {\n final Map<Long, W> matchedCloseWindows = windows.windowsFor(emitRangeUpperBound);\n final Map<Long, W> matchedEmitWindows = windows.windowsFor(emitRangeLowerBound - 1);\n\n if (matchedCloseWindows.equals(matchedEmitWindows)) {\n log.trace(\"No new windows to emit. LastEmitCloseTime={}, emitRangeLowerBound={}, emitRangeUpperBound={}\",\n lastEmitWindowCloseTime, emitRangeLowerBound, emitRangeUpperBound);\n return false;\n }\n }\n\n return true;\n }",
"public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val);",
"public static native int GossipTimestampFilter_get_timestamp_range(long this_ptr);",
"@Test\n public void testFilterRangeOneTable() throws Exception {\n TestState state = register();\n long ts = FineoTestUtil.get1980();\n\n Map<String, Object> wrote = prepareItem();\n wrote.put(Schema.SORT_KEY_NAME, ts);\n wrote.put(\"field1\", true);\n Table table = state.writeToDynamo(wrote);\n bootstrap(table);\n\n Map<String, Object> expected = new HashMap<>();\n expected.put(AvroSchemaProperties.ORG_ID_KEY, org);\n expected.put(AvroSchemaProperties.ORG_METRIC_TYPE_KEY, metrictype);\n expected.put(AvroSchemaProperties.TIMESTAMP_KEY, ts);\n expected.put(\"field1\", true);\n verifySelectStarWhereTimestamp(\"<\", ts + 1, expected);\n verifySelectStarWhereTimestamp(\"<=\", ts + 1, expected);\n verifySelectStarWhereTimestamp(\"=\", ts, expected);\n\n verifySelectStarWhereTimestamp(\"<>\", ts + 1, expected);\n verifySelectStarWhereTimestamp(\"<>\", ts - 1, expected);\n verifySelectStarWhereTimestamp(\"<>\", ts);\n\n verifySelectStarWhereTimestamp(\">=\", ts - 1, expected);\n verifySelectStarWhereTimestamp(\">\", ts - 1, expected);\n }",
"WindowingClauseBetween createWindowingClauseBetween();",
"public LogEntrySet createTimeStampCondition(long lower, long upper)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (lower <= obj.getTimeStamp() && obj.getTimeStamp() <= upper)\n {\n result.add(obj);\n }\n }\n \n return result;\n }",
"public void setLowerBound(long lowerBound)\n {\n m_lowerBound = lowerBound;\n }",
"@Test\n public void testTimestampExtractorWithAutoInterval() throws Exception {\n final int numElements = 10;\n\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n env.getConfig().setAutoWatermarkInterval(10);\n env.setParallelism(1);\n\n DataStream<Integer> source1 =\n env.addSource(\n new SourceFunction<Integer>() {\n @Override\n public void run(SourceContext<Integer> ctx) throws Exception {\n int index = 1;\n while (index <= numElements) {\n ctx.collect(index);\n latch.await();\n index++;\n }\n }\n\n @Override\n public void cancel() {}\n });\n\n DataStream<Integer> extractOp =\n source1.assignTimestampsAndWatermarks(\n new AscendingTimestampExtractor<Integer>() {\n @Override\n public long extractAscendingTimestamp(Integer element) {\n return element;\n }\n });\n\n extractOp\n .transform(\"Watermark Check\", BasicTypeInfo.INT_TYPE_INFO, new CustomOperator(true))\n .transform(\n \"Timestamp Check\",\n BasicTypeInfo.INT_TYPE_INFO,\n new TimestampCheckingOperator());\n\n // verify that extractor picks up source parallelism\n Assert.assertEquals(\n extractOp.getTransformation().getParallelism(),\n source1.getTransformation().getParallelism());\n\n env.execute();\n\n // verify that we get NUM_ELEMENTS watermarks\n for (int j = 0; j < numElements; j++) {\n if (!CustomOperator.finalWatermarks[0].get(j).equals(new Watermark(j))) {\n long wm = CustomOperator.finalWatermarks[0].get(j).getTimestamp();\n Assert.fail(\n \"Wrong watermark. Expected: \"\n + j\n + \" Found: \"\n + wm\n + \" All: \"\n + CustomOperator.finalWatermarks[0]);\n }\n }\n\n // the input is finite, so it should have a MAX Watermark\n assertEquals(\n Watermark.MAX_WATERMARK,\n CustomOperator.finalWatermarks[0].get(\n CustomOperator.finalWatermarks[0].size() - 1));\n }",
"private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }",
"WindowedStream<T> timeWindow(long millis);",
"public LogEntrySet filterTimeStamp(long lower, long upper)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (lower <= obj.getTimeStamp() && obj.getTimeStamp() <= upper)\n {\n result.add(obj);\n }\n }\n \n return result;\n }",
"private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }",
"private void updateTimeRange() {\n \t\tTmfTimestamp startTime = fTimeRange != null ? fTimeRange.getStartTime() : TmfTimestamp.BigCrunch;\n \t\tTmfTimestamp endTime = fTimeRange != null ? fTimeRange.getEndTime() : TmfTimestamp.BigBang;\n \n \t\tfor (ITmfTrace trace : fTraces) {\n \t\tTmfTimestamp traceStartTime = trace.getTimeRange().getStartTime();\n \t\tif (traceStartTime.compareTo(startTime, true) < 0)\n \t\t\tstartTime = traceStartTime;\n \n \t\tTmfTimestamp traceEndTime = trace.getTimeRange().getEndTime();\n \t\tif (traceEndTime.compareTo(endTime, true) > 0)\n \t\t\tendTime = traceEndTime;\n \t}\n \t\tfTimeRange = new TmfTimeRange(startTime, endTime);\n }",
"WindowingClause createWindowingClause();",
"public NonceRange(long lowerBound, long higherBound)\n {\n m_lowerBound = lowerBound;\n m_higherBound = higherBound;\n }",
"@Test\n public void testNavigationPastFrameBounds()\n {\n String query = \"SELECT measure OVER w \" +\n \" FROM (VALUES \" +\n \" (1, 10), \" +\n \" (2, 20), \" +\n \" (3, 30), \" +\n \" (4, 30), \" +\n \" (5, 40)\" +\n \" ) t(id, value) \" +\n \" WINDOW w AS ( \" +\n \" ORDER BY id \" +\n \" MEASURES %s AS measure \" +\n \" ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING \" +\n \" PATTERN (A B) \" +\n \" DEFINE A AS A.value = NEXT(A.value) \" +\n \" )\";\n\n // row 0 - out of frame bounds and partition bounds (before partition start)\n assertThat(assertions.query(format(query, \"PREV(B.value, 4)\")))\n .matches(\"VALUES \" +\n \" (CAST(null AS integer)), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null) \");\n // row 1 - out of frame bounds\n assertThat(assertions.query(format(query, \"PREV(B.value, 3)\")))\n .matches(\"VALUES \" +\n \" (CAST(null AS integer)), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null) \");\n\n // row 2 - out of frame bounds\n assertThat(assertions.query(format(query, \"PREV(B.value, 2)\")))\n .matches(\"VALUES \" +\n \" (CAST(null AS integer)), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null) \");\n\n // row 5 (out of match, but within frame - value can be accessed)\n assertThat(assertions.query(format(query, \"NEXT(B.value, 1)\")))\n .matches(\"VALUES \" +\n \" (null), \" +\n \" (null), \" +\n \" (40), \" +\n \" (null), \" +\n \" (null) \");\n\n // row 6 - out frame bounds and partition bounds (after partition end)\n assertThat(assertions.query(format(query, \"NEXT(B.value, 2)\")))\n .matches(\"VALUES \" +\n \" (CAST(null AS integer)), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null) \");\n\n // reduce the base frame so that for the only match it only contains rows 3 and 4\n query = \"SELECT measure OVER w \" +\n \" FROM (VALUES \" +\n \" (1, 10), \" +\n \" (2, 20), \" +\n \" (3, 30), \" +\n \" (4, 30), \" +\n \" (5, 40)\" +\n \" ) t(id, value) \" +\n \" WINDOW w AS ( \" +\n \" ORDER BY id \" +\n \" MEASURES %s AS measure \" +\n \" ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING \" +\n \" PATTERN (A B) \" +\n \" DEFINE A AS A.value = NEXT(A.value) \" +\n \" )\";\n\n // row 5 - out of frame bounds\n assertThat(assertions.query(format(query, \"NEXT(B.value, 1)\")))\n .matches(\"VALUES \" +\n \" (CAST(null AS integer)), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null), \" +\n \" (null) \");\n }",
"private <T extends Number> T minInWindow(List<TimestampedValue<T>> vals, Duration timeWindow) {\n long now = System.currentTimeMillis();\n long epoch = now - timeWindow.toMilliseconds();\n T result = null;\n double resultAsDouble = Integer.MIN_VALUE;\n for (TimestampedValue<T> val : vals) {\n T valAsNum = val.getValue();\n double valAsDouble = (valAsNum != null) ? valAsNum.doubleValue() : 0;\n if (result == null && val.getTimestamp() > epoch) {\n result = withDefault(null, Integer.MIN_VALUE);\n resultAsDouble = result.doubleValue();\n }\n if (result == null || (val.getValue() != null && valAsDouble < resultAsDouble)) {\n result = valAsNum;\n resultAsDouble = valAsDouble;\n }\n }\n return withDefault(result, Integer.MIN_VALUE);\n }",
"@Override\n\t\tprotected Datum next2() throws Exception {\n\t\t\tif (this.current_datum_index == this.buffer.size()) {\n\t\t\t\t// If base iterator is exhausted, and we're past the end of the\n\t\t\t\t// buffer, we're done\n\t\t\t\ttry {\n\t\t\t\t\tbuffer.addLast(this.base_iterator.next());\n\t\t\t\t} catch (NoSuchElementException e) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tDatum current_datum = this.buffer.get(this.current_datum_index);\n\n\t\t\tTime window_start = null;\n\t\t\tTime window_end = null;\n\t\t\tif (trailing) {\n\t\t\t\twindow_start = current_datum.time.minus(this.radius.multiply(2.0));\n\t\t\t\twindow_end = current_datum.time.plus(new Dt(1,TUnit.MILLISECOND)); // make sure current is included ....\n\t\t\t} else {\n\t\t\t\twindow_start = current_datum.time.minus(this.radius);\n\t\t\t\twindow_end = current_datum.time.plus(this.radius);\n\t\t\t}\n\n\t\t\t// Now knock anything before window_start off the beginning of the\n\t\t\t// buffer\n\t\t\twhile (buffer.getFirst().time.isBefore(window_start)) {\n\t\t\t\tbuffer.removeFirst();\n\t\t\t\tcurrent_datum_index--;\n\t\t\t}\n\n\t\t\t// Add data, until the next Datum would be after window_end\n\t\t\twhile (this.base_iterator.peekNext() != null\n\t\t\t\t\t&& this.base_iterator.peekNext().time.isBefore(window_end)) {\n\t\t\t\ttry {\n\t\t\t\t\tbuffer.addLast(this.base_iterator.next());\n\t\t\t\t} catch (NoSuchElementException e) {\n\t\t\t\t\t; // intentional! this method should only return null when\n\t\t\t\t\t\t// we are at the end of the base iterator *and* the\n\t\t\t\t\t\t// buffer (see above)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Now return the mean -- using MeanVar as backend, but may want to\n\t\t\t// change this for speed\n\t\t\tMeanVar mean = new MeanVar(buffer.get(0).getDim());\n\t\t\tfor (Datum datum : buffer) {\n\t\t\t\tmean.train1(DataUtils.newVector(datum.getData()));\n\t\t\t}\n\t\t\tthis.current_datum_index++;\n\t\t\treturn new Datum(current_datum.time, mean.getMean(), null);\n\t\t}",
"@Test\n public void aggregateWindowFillTest(){\n\n String query = String.format(\"from(bucket: \\\"%s\\\")\\n\" +\n \" |> range(start: -3h)\\n\" +\n \" |> filter(fn: (r) => r._measurement == \\\"air_quality\\\")\\n\" +\n \" |> filter(fn: (r) => r._field == \\\"temp\\\")\\n\" +\n \" |> window(every: 30m, period: 1h, offset: 3h)\\n\" +\n \" |> aggregateWindow(every: 30m, fn: mean)\\n\" +\n \" |> fill(column: \\\"_value\\\", value: 10.0)\",\n SetupTestSuite.getTestConf().getOrg().getBucket());\n\n List<FluxTable> tables = queryClient.query(query, SetupTestSuite.getInflux2conf().getOrgId());\n\n assertThat(tables.size()).isEqualTo(2); //one for each monitor tag set\n\n //for fun and inspection\n SetupTestSuite.printTables(query, tables);\n\n tables.forEach(table -> {\n int size = table.getRecords().size();\n assertThat(size).isEqualTo(7);\n // assertThat(((Double)(table.getRecords().get(0).getValue()) == 10.0) || // fill is not deterministic - so commented\n // (Double)(table.getRecords().get(size - 1).getValue()) == 10.0).isTrue(); // check the fill value is applied either to first or last record\n\n table.getRecords().forEach(record -> {\n assertThat(record.getField()).isEqualTo(\"temp\");\n assertThat(record.getValue() instanceof Double).isTrue();\n assertThat((Double)record.getValue() >= 9.15 && (Double)record.getValue() <= 10.75).isTrue();\n });\n });\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form Scientific_cal | public Scientific_cal()
{
initComponents();
} | [
"public Scientific() {\n initComponents();\n }",
"Calcul createCalcul();",
"public VentanaCrearCalificacion() {\n controlador = new ControladorVentanaCrearCalificacion();\n curso = null;\n evaluaciones = null;\n initComponents();\n setVisible(true);\n setMaximizable(false);\n setIconifiable(true);\n setResizable(false);\n setClosable(true);\n\n }",
"public frm_adm_coloca_fecha_evaluaciones() {\n }",
"@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }",
"Gradian createGradian();",
"@Test\n public void createFormSceduleEntry(){\n ScheduleEntry entry = new ScheduleEntry(\"9;00AM\", new SystemCalendar(2018,4,25));\n }",
"public VentanaCrearCalificacion() {\n \t\n \tinitComponents();\n \tcontrolador = new ControladorCrearCalificacion();\n setVisible(true);\n setMaximizable(false);\n setIconifiable(true);\n setResizable(false); \n setClosable(true); \n }",
"public MyCal() {\n initComponents();\n }",
"public DisciplinaForm() {\n initComponents();\n }",
"private emcJPanel createCostingTab() {\n EMCDatePickerFormComponent financialDate = new EMCDatePickerFormComponent(dataRelation, \"financialDate\");\n emcJTextField txtValue = new emcJTextField(new EMCDoubleFormDocument(dataRelation, \"cost\"));\n\n financialDate.setEnabled(false);\n txtValue.setEditable(false);\n\n Component[][] components = {\n {new emcJLabel(dataRelation.getColumnName(\"financialDate\")), financialDate},\n {new emcJLabel(dataRelation.getColumnName(\"cost\")), txtValue}};\n\n return emcSetGridBagConstraints.createSimplePanel(components, GridBagConstraints.NONE, false, \"Costing\");\n }",
"NFP_Energy createNFP_Energy();",
"public calcular() {\n initComponents();\n }",
"int createCalendar(int course_id, Calendar cal, String prof_uni);",
"NFP_Price createNFP_Price();",
"public calc() {\n initComponents();\n }",
"public valentinesday() {\n initComponents();\n }",
"private void createCalendar() {\n myCALENDAR = Calendar.getInstance();\r\n DAY = myCALENDAR.get(Calendar.DAY_OF_MONTH);\r\n MONTH = myCALENDAR.get(Calendar.MONTH) + 1;\r\n YEAR = myCALENDAR.get(Calendar.YEAR);\r\n HOUR = myCALENDAR.get(Calendar.HOUR_OF_DAY);\r\n MINUTE = myCALENDAR.get(Calendar.MINUTE);\r\n SECOND = myCALENDAR.get(Calendar.SECOND);\r\n }",
"public CalculatorSalariuNet2018() {\n initComponents();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the workflow if the step returns a specific code. Equivalent to custom(step.getClass(), resultCode); | public WorkflowGraphBuilder closeOnCustom(WorkflowStep step, String resultCode) {
return customTransition(step.getClass(), resultCode, CloseWorkflow.class);
} | [
"public WorkflowGraphBuilder closeOnFailure(WorkflowStep step) {\n return customTransition(step.getClass(), StepResult.FAIL_RESULT_CODE, CloseWorkflow.class);\n }",
"public WorkflowGraphBuilder closeOnSuccess(WorkflowStep step) {\n return customTransition(step.getClass(), StepResult.SUCCEED_RESULT_CODE, CloseWorkflow.class);\n }",
"public WorkflowGraphBuilder customTransition(Class<? extends WorkflowStep> step, String resultCode,\n Class<? extends WorkflowStep> nextStep) {\n if (!stepImpls.containsKey(step)) {\n throw new WorkflowGraphBuildException(\"Please add a step with addStep before defining transitions away from it.\");\n }\n\n if (nextStep == null) {\n throw new WorkflowGraphBuildException(\"Cannot transition to a null step.\"\n + \" (Did you mean to transition to CloseWorkflow.class?)\");\n } else if (nextStep == step) {\n throw new WorkflowGraphBuildException(\"Cannot transition a step to itself (the step should retry instead).\");\n }\n\n if (resultCode == null || resultCode.equals(\"\")) {\n throw new WorkflowGraphBuildException(\"Result codes must not be blank.\");\n }\n\n if (PartitionedWorkflowStep.class.isAssignableFrom(step)\n && !StepResult.VALID_PARTITIONED_STEP_RESULT_CODES.contains(resultCode)) {\n throw new WorkflowGraphBuildException(\"Partitioned steps may not define custom result codes.\");\n }\n\n if (!steps.containsKey(step)) {\n steps.put(step, new HashMap<>());\n } else if (steps.get(step).containsKey(resultCode)) {\n throw new WorkflowGraphBuildException(\"Multiple transitions cannot be defined for a single result code (\"\n + resultCode + \").\");\n } else if (!steps.get(step).isEmpty() && (StepResult.ALWAYS_RESULT_CODE.equals(resultCode)\n || steps.get(step).containsKey(StepResult.ALWAYS_RESULT_CODE))) {\n throw new WorkflowGraphBuildException(\"Cannot define 'always' and another transition for the same step.\");\n }\n\n steps.get(step).put(resultCode, nextStep);\n\n return this;\n }",
"void finishStepContext();",
"void finish(String result, int resultCode);",
"public void testClose() {\n System.out.println(\"close\");\n int code = 0;\n Wizard instance = new Wizard();\n instance.close(code);\n }",
"public Context fail() {\n return finish(\"failed\");\n }",
"@Override\n \tpublic void exit(int code)\n \t{\n \t\tSystem.exit(code);\n \t}",
"protected boolean finishExecution(PlugInContext context, boolean retVal) {\r\n this.postMessagesToGui(context);\r\n return retVal;\r\n }",
"public T caseOutcome(Outcome object)\n {\n return null;\n }",
"protected void exit(int code) {\n\t\t//System.exit(code); we need to implement something else here\n\t}",
"void handleStep(T context) throws Exception;",
"void closeEnrollment(Protocol protocol, ProtocolGenericActionBean actionBean) throws Exception;",
"public WorkflowGraphBuilder failTransition(Class<? extends WorkflowStep> step, Class<? extends WorkflowStep> nextStep) {\n return customTransition(step, StepResult.FAIL_RESULT_CODE, nextStep);\n }",
"public void testExitStatusReturned() throws JobExecutionException {\n \n \t\tfinal ExitStatus customStatus = new ExitStatus(true, \"test\");\n \n \t\tStep testStep = new Step() {\n \n \t\t\tpublic void execute(StepExecution stepExecution) throws JobInterruptedException {\n \t\t\t\tstepExecution.setExitStatus(customStatus);\n \t\t\t}\n \n \t\t\tpublic String getName() {\n \t\t\t\treturn \"test\";\n \t\t\t}\n \n \t\t\tpublic int getStartLimit() {\n \t\t\t\treturn 1;\n \t\t\t}\n \n \t\t\tpublic boolean isAllowStartIfComplete() {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t};\n \t\tList steps = new ArrayList();\n \t\tsteps.add(testStep);\n \t\tjob.setSteps(steps);\n \t\tjob.execute(jobExecution);\n \t\tassertEquals(customStatus, jobExecution.getExitStatus());\n \t}",
"void completeStep(T context) throws Exception;",
"public void exit(int code)\n \t{\n \t\tSystem.exit(code);\n \t}",
"public void finish() {\n\t\tIntent result = new Intent();\n\t\t\n\t\tif (this.response != null) {\n\t\t\tresult.putExtras(this.getIntent());\n\t\t\tresult.putExtra(ACTIVITY_RESULT_STATUS, true);\n\t\t\tresult.putExtra(ACTIVITY_RESULT_DATA, this.response);\n\t\t} else {\n\t\t\tresult.putExtras(this.getIntent());\n\t\t\tresult.putExtra(ACTIVITY_RESULT_STATUS, false);\n\t\t}\n\n\t\n\t\tthis.setResult(RESULT_OK, result);\n\t\tsuper.finish();\n\t}",
"public void onCancel(Result<R> result) {}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the cardNumber of this card; | public int getCardNumber() {
return cardNumber;
} | [
"public Integer getCardNo() {\n\t\treturn cardNo;\n\t}",
"java.lang.String getCardNumber();",
"public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }",
"public String getCardNo() {\r\n return cardNo;\r\n }",
"public java.lang.Integer getCard() {\n return card;\n }",
"public java.lang.Integer getCard() {\n return card;\n }",
"public Integer getCard_code() {\n return card_code;\n }",
"public String getCardNo() {\n return cardNo;\n }",
"public int getCardIndex() {\n return cardIndex_;\n }",
"public String getCardNum() {\n\t\t\treturn accountNum;\n\t\t}",
"public int getCardIndex() {\n return this.cardIndex;\n }",
"public String getCardNumber() {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT CARD_NUMBER FROM \" + TABLE_CARDHOLDER, null);\n String cardNumber = \"\";\n while (c.moveToNext()) {\n cardNumber = c.getString(0);\n }\n c.close();\n return cardNumber;\n }",
"public String getIdCardNo() {\n\t\treturn idCardNo;\n\t}",
"public String getIdCardNo() {\n return idCardNo;\n }",
"public String getCardNumber() {\n return this.account;\n }",
"public String getCARD_NO() {\r\n return CARD_NO;\r\n }",
"String getCardIssueNumber();",
"int getCardId();",
"public java.lang.String getCardId() {\n\t\treturn _person.getCardId();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDEAL_PROMISSORY_FX.MAT_REC_INS_NBR | public void setMAT_REC_INS_NBR(BigDecimal MAT_REC_INS_NBR)
{
this.MAT_REC_INS_NBR = MAT_REC_INS_NBR;
} | [
"public BigDecimal getMAT_REC_INS_NBR()\r\n {\r\n\treturn MAT_REC_INS_NBR;\r\n }",
"public void setMAT_PAYMENT_INS_NBR(BigDecimal MAT_PAYMENT_INS_NBR)\r\n {\r\n\tthis.MAT_PAYMENT_INS_NBR = MAT_PAYMENT_INS_NBR;\r\n }",
"public void setREC_ID(Integer REC_ID) {\n this.REC_ID = REC_ID;\n }",
"public BigDecimal getMAT_PAYMENT_INS_NBR()\r\n {\r\n\treturn MAT_PAYMENT_INS_NBR;\r\n }",
"public void setREF_NO(BigDecimal REF_NO) {\r\n this.REF_NO = REF_NO;\r\n }",
"void setRecordNumber(int recNo) {\n this.recordNumber = recNo;\n }",
"public void setSOL_DATE_REC(Date SOL_DATE_REC) {\r\n this.SOL_DATE_REC = SOL_DATE_REC;\r\n }",
"public void setPremSeqNo(Integer premSeqNo) {\n\t\tthis.premSeqNo = premSeqNo;\n\t}",
"public void setDepRecMnth(String depRecMnth) {\r\n\t\tthis.depRecMnth = depRecMnth;\r\n\t}",
"public void setRecDocNo(String value) {\n setAttributeInternal(RECDOCNO, value);\n }",
"public void setREFNO(webservice.hospindex.InsuranceINSREFNO[] REFNO) {\n this.REFNO = REFNO;\n }",
"public Integer getREC_ID() {\n return REC_ID;\n }",
"public void setREQ_NO(BigDecimal REQ_NO) {\r\n this.REQ_NO = REQ_NO;\r\n }",
"public void setMATNR(java.lang.String MATNR) {\n this.MATNR = MATNR;\n }",
"public void setLINE_NO(BigDecimal LINE_NO) {\r\n this.LINE_NO = LINE_NO;\r\n }",
"public void setAccSeqNo(int accSeqNo) {\r\n\t\tthis.accSeqNo = accSeqNo;\r\n\t}",
"public void setADD_REF_LINE_NO(BigDecimal ADD_REF_LINE_NO) {\r\n this.ADD_REF_LINE_NO = ADD_REF_LINE_NO;\r\n }",
"public void setREFERENCE_NO(BigDecimal REFERENCE_NO)\r\n {\r\n\tthis.REFERENCE_NO = REFERENCE_NO;\r\n }",
"private long getReserveRecNo() {\n\t\tfinal int selectedRow = this.clientUI.getSelectedRowNo();\n\t\treturn this.model.getRecNo(selectedRow);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the up level ID of this code dto. | @Override
public java.lang.Long getUpLevelId() {
return _codeDto.getUpLevelId();
} | [
"public int getLevelUpItemId() {\n return levelUpItemId_;\n }",
"public String getUpDownId() {\n return upDownId;\n }",
"public long getUpguid() {\n return upguid_;\n }",
"@Override\n\tpublic void setUpLevelId(java.lang.Long upLevelId) {\n\t\t_codeDto.setUpLevelId(upLevelId);\n\t}",
"int getLevelUpItemId();",
"public String getUpRoadId() {\n return upRoadId;\n }",
"public String getUpdrId() {\r\n return updrId;\r\n }",
"public Long getUpDepartmentId() {\n return upDepartmentId;\n }",
"public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }",
"public ULong getTopLevelAsbiepId() {\n return (ULong) get(2);\n }",
"public Integer getUpJl() {\n return upJl;\n }",
"public int getCurrentLevelId()\n {\n return currentLevelId;\n }",
"long getUpguid();",
"public Long getParentCodeId() {\r\n return parentCodeId;\r\n }",
"public byte getLevelId()\r\n\t{\r\n\t\treturn mLevelId;\r\n\t}",
"public ULong getTopLevelAsbiepId() {\n return (ULong) get(0);\n }",
"public int getup(){\n\t\treturn this.up;\n\t}",
"public long getBusinessLevelDtoId() {\n\t\treturn businessLevelDtoId;\n\t}",
"public Integer getU_ID()\n {\n return this.U_ID;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setEbXmlEventListener method, of class ConnectionManager. | @Test
public void testSetEbXmlEventListener() {
System.out.println("setEbXmlEventListener");
instance.setEbXmlEventListener(ebXmlEventListener);
} | [
"@Test\n public void TestConnectionEvent() {\n ConnectionEvent connectionEvent = new ConnectionEvent(ConnectionEvent.ConnectionEventType.Close, new byte[0][0]); // Initialize connection event\n\n assertTrue(\"connection event must not be null\", connectionEvent != null); // Ensure event is not null\n }",
"public void testCustomEventListener() throws Exception\n {\n checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, \"\");\n }",
"@Override\n\tprotected void setUp() throws Exception {\n\t\tResource input = new ByteArrayResource(xml.getBytes());\n\t\teventReader = StaxUtils.createXmlInputFactory().createXMLEventReader(\n\t\t\t\tinput.getInputStream());\n\t\tfragmentReader = new DefaultFragmentEventReader(eventReader);\n\t}",
"@Test\n public void testGetEbXmlHandler() {\n System.out.println(\"getEbXmlHandler\");\n String sa = \"testhandler\";\n SpineEbXmlHandler expResult = (EbXmlMessage m) -> {\n };\n instance.addHandler(sa, expResult);\n SpineEbXmlHandler result = instance.getEbXmlHandler(sa);\n assertEquals(expResult, result);\n }",
"@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\r\n\t\t// cue listener\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}",
"protected abstract boolean setupEventService();",
"@Test\r\n\tpublic void testAddCueListener() {\r\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addCueListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}",
"public void testChangeListener() throws Exception\n {\n checkFormEventListener(CHANGE_BUILDER, \"CHANGE\");\n }",
"@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }",
"@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }",
"public void addConnectionEventListener(ConnectionListener listener);",
"public void test_addNotificationListenerOnNewServerConnection()\r\n \t\t\tthrows Exception {\r\n \t\t// create mock for mbean server connection\r\n \t\tMBeanServerConnection serverConnectionMock = EasyMock\r\n \t\t\t\t.createMock(MBeanServerConnection.class);\r\n \t\tObjectName objectName = new ObjectName(OBJECTNAME_TESTMBEAN);\r\n \t\tNotificationListener notificationListener = EasyMock\r\n \t\t\t\t.createMock(NotificationListener.class);\r\n \t\tNotificationFilter notificationFilter = EasyMock\r\n \t\t\t\t.createMock(NotificationFilter.class);\r\n \t\tObject handback = \"handbackObject\";\r\n \t\tserverConnectionMock.addNotificationListener(objectName,\r\n \t\t\t\tnotificationListener, notificationFilter, handback);\r\n \t\tserverConnectionMock.removeNotificationListener(objectName,\r\n \t\t\t\tnotificationListener, notificationFilter, handback);\r\n \r\n \t\t// do test\r\n \t\tEasyMock.replay(serverConnectionMock);\r\n \t\t// register notification listener\r\n \t\tDictionary<String, Object> properties = new Hashtable<String, Object>();\r\n \t\tproperties.put(ObjectName.class.getName(), objectName);\r\n \t\tproperties.put(NotificationFilter.class.getName(), notificationFilter);\r\n \t\tproperties.put(\"handback\", handback);\r\n \t\tServiceRegistration notificationListenerServiceRegistration = this.bundleContext\r\n \t\t\t\t.registerService(NotificationListener.class.getName(),\r\n \t\t\t\t\t\tnotificationListener, properties);\r\n \t\t// register/unregister mbean server connection\r\n \t\tServiceRegistration serverServiceRegistration = super.bundleContext\r\n \t\t\t\t.registerService(MBeanServerConnection.class.getName(),\r\n \t\t\t\t\t\tserverConnectionMock, null);\r\n \t\tserverServiceRegistration.unregister();\r\n \t\t// verify mbean server connection\r\n \t\tEasyMock.verify(serverConnectionMock);\r\n \t\t// unregister notification listener\r\n \t\tnotificationListenerServiceRegistration.unregister();\r\n \t}",
"private void testRemoveEventListener002() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testRemoveEventListener002\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(TestExecPluginActivator.ROOT,\n\t\t\t\t\tDmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\t\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tDmtEventListenerImpl event = new DmtEventListenerImpl();\n\t\t\t// Does not compile anymore\n\t\t\t\n//\t\t\ttbc.getDmtAdmin().addEventListener(DmtConstants.ALL_DMT_EVENTS,\n//\t\t\t\t\tTestExecPluginActivator.ROOT,event);\n//\t\t\t\n//\t\t\ttbc.getDmtAdmin().removeEventListener(event);\n//\t\t\t\n//\t\t\tsession.createInteriorNode(TestExecPluginActivator.INEXISTENT_NODE);\n//\t\t\t\n//\t\t\tsynchronized (tbc) {\n//\t\t\t\ttbc.wait(DmtConstants.WAITING_TIME);\n//\t\t\t}\n//\t\t\t\n//\t\t\ttbc.assertEquals(\"Asserts that the listener does not receive change notifications after DmtAdmin.removeEventListener() is called\",0,event.getCount());\n\n\t\t\tTestCase.fail(\"API changed - pkriens\");\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}",
"public void testNodeNameChanged() {\n\n\t}",
"@Test\n public void testLogErrorListener() throws ConfigurationException {\n final DatabaseConfiguration config = helper.setUpConfig();\n assertEquals(1, config.getEventListeners(ConfigurationErrorEvent.ANY).size());\n }",
"public Result testGetEventSetDescriptors() {\n EventSetDescriptor[] eventSetDescriptors = beanInfo\n .getEventSetDescriptors();\n assertEquals(beanInfo.getEventSetDescriptors()[0]\n .getAddListenerMethod().getName(), \"addFredListener\");\n assertEquals(eventSetDescriptors.length, 1);\n return passed();\n }",
"@Test\n public void testOnResume() throws Exception {\n ErrorManager errManager = Mockito.mock(ErrorManager.class);\n TCPClient tcpClient = Mockito.mock(TCPClient.class);\n ExternalDbLoader.setTcpClient(tcpClient);\n\n manager.onResume(errManager);\n\n verify(tcpClient).setMessageListener(any(TCPClient.OnMessageReceived.class));\n verify(scannerView).resumeScanning();\n }",
"public void ensureNotifyKeySpaceEventsEx() {\n\n RedisConnection connection = AppCtx.getStringRedisTemplate().getConnectionFactory().getConnection();\n\n Properties properties = connection.getConfig(\"notify-keyspace-events\");\n\n String config = \"\";\n\n for (String key: properties.stringPropertyNames()) {\n String value = properties.getProperty(key);\n if (value.equals(\"notify-keyspace-events\")) {\n config = value;\n break;\n }\n }\n\n if (config.contains(\"E\") && (config.contains(\"A\") || config.contains(\"x\"))) {\n return;\n }\n\n if (!config.contains(\"E\")) {\n config += \"E\";\n }\n if (!config.contains(\"A\") && !config.contains(\"x\")) {\n config += \"x\";\n }\n connection.setConfig(\"notify-keyspace-events\", config);\n\n LOGGER.trace(\"setConfig notify-keyspace-events \" + config);\n }",
"public void testGetExpandContractListeners() throws Exception {\n assertNotNull(\"The listeners should not be null.\", section.getExpandContractListeners());\n assertEquals(\"The listeners' size should be 0.\", 0, section.getExpandContractListeners().size());\n section.addExpandContractListener(expandContractListener);\n assertEquals(\"The listeners' size should be 1.\", 1, section.getExpandContractListeners().size());\n section.removeExpandContractListener(expandContractListener);\n assertEquals(\"The listeners' size should be 0.\", 0, section.getExpandContractListeners().size());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convierte jsonMenu, proveniente del server socket, de json a un objeto Menu | private Menu jsonToMenu(String jsonMenu) {
Gson gson = new Gson();
Menu varMenu = gson.fromJson(jsonMenu, Menu.class);
return varMenu;
} | [
"public static Menu creerMenuDepuisJson(final String nom, final Menu menuParent) {\n\t\tfinal JSONObject jsonObject;\n\t\ttry {\n\t\t\tjsonObject = InterpreteurDeJson.ouvrirJson(nom, \"./ressources/Data/Menus/\");\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Impossible d'ouvrir ke fichier JSON du menu \"+nom, e);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Identifiant de l'ElementDeMenu deja selectionne par defaut\n\t\tfinal int idSelectionInitiale;\n\t\tif (jsonObject.has(\"selectionInitiale\")) {\n\t\t\tif (jsonObject.get(\"selectionInitiale\") instanceof String) {\n\t\t\t\tString nomSelectionInitiale = jsonObject.getString(\"selectionInitiale\");\n\t\t\t\tswitch (nomSelectionInitiale) {\n\t\t\t\tcase \"numeroPartie\":\n\t\t\t\t\tidSelectionInitiale = Main.getPartieActuelle().id;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tLOG.error(\"La selection initiale du menu \\\"\"+nom+\"\\\" est inconnue : \"+nomSelectionInitiale);\n\t\t\t\t\tidSelectionInitiale = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tidSelectionInitiale = jsonObject.getInt(\"selectionInitiale\");\n\t\t\t}\n\t\t} else {\n\t\t\tidSelectionInitiale = 0;\n\t\t}\n\t\t\n\t\t// Identifiant de l'ElementDeMenu contenant les descriptions d'Objects\n\t\tfinal int idDescription = jsonObject.has(\"idDescription\") ? (int) jsonObject.get(\"idDescription\") : -1;\n\t\t\n\t\t// Image de fond du Menu\n\t\tBufferedImage fond = null;\n\t\tif (jsonObject.has(\"fond\")) {\n\t\t\tfinal String nomFond = (String) jsonObject.get(\"fond\");\n\t\t\ttry {\n\t\t\t\tfond = Graphismes.ouvrirImage(\"Pictures\", nomFond);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Comportement du Menu en cas d'annulation\n\t\tfinal ArrayList<Commande> comportementAnnulation = new ArrayList<Commande>();\n\t\ttry {\n\t\t\tfinal JSONArray jsonComportementAnnulation = jsonObject.getJSONArray(\"comportementAnnulation\");\n\t\t\tCommande.recupererLesCommandes(comportementAnnulation, jsonComportementAnnulation);\n\t\t} catch (JSONException e) {\n\t\t\tLOG.warn(\"Pas de comportement en cas d'annulation specifie pour le menu \"+nom+\".\\n\"\n\t\t\t\t\t+ \"Comportement par defaut : revenir au menu parent ou revenir a la map.\");\n\t\t\tcomportementAnnulation.add(new FermerMenu());\n\t\t}\n\n\t\t// Elements du Menu\n\t\tfinal JSONArray jsonElements = jsonObject.getJSONArray(\"elements\");\n\t\tfinal ArrayList<Texte> textes = new ArrayList<Texte>();\n\t\tfinal ArrayList<ImageMenu> images = new ArrayList<ImageMenu>();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tfinal ArrayList<Liste> listes = new ArrayList<Liste>();\n\t\tfinal ArrayList<Carte> cartes = new ArrayList<Carte>();\n\t\tfinal ElementDeMenu selectionInitiale = ElementDeMenu.recupererLesElementsDeMenu(idSelectionInitiale, jsonElements, images, textes, listes, cartes, nom);\n\t\t\n\t\t//instanciation\n\t\tfinal Menu menu = new Menu(fond, textes, images, listes, cartes, selectionInitiale, idDescription, menuParent, comportementAnnulation);\t\n\t\t\n\t\t//associer un ElementDeMenu arbitraire aux Commandes en cas d'annulation pour qu'elles trouvent leur Menu\n\t\tfor (Commande commande : menu.comportementAnnulation) {\n\t\t\tcommande.element = menu.elements.get(0);\n\t\t}\n\t\t\n\t\treturn menu;\n\t}",
"public JSONObject menuToJson(FoodModel model){\n JSONObject single_menu = new JSONObject();\n try{\n single_menu.put(\"totalCarbohydrate\",String.valueOf(model.getTotalCarbon()));\n single_menu.put(\"protein\",String.valueOf(model.getProtein()));\n single_menu.put(\"calory\",String.valueOf(model.getCalorie()));\n single_menu.put(\"sugar\",String.valueOf(model.getSugar()));\n single_menu.put(\"sodium\",String.valueOf(model.getSodium()));\n single_menu.put(\"servingSize\",String.valueOf(model.getServingSize()));\n single_menu.put(\"name\",String.valueOf(model.getName()));\n single_menu.put(\"totalFat\",String.valueOf(model.getFats()));\n single_menu.put(\"type\",String.valueOf(model.getType()));\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return single_menu;\n }",
"public String buildMenuResponse(){\n ObjectMapper objectMapper=new ObjectMapper();\n String response=\"\";\n\n Button scheduleButton=new Button(\"postback\",\"View Match Schedules\",\"match-schedules-postback\");\n Button highlightButton=new Button(\"postback\",\"View Highlights\",\"match-highlight-postback\");\n Button tableButton=new Button(\"postback\",\"View League Table\",\"league-table-postback\");\n\n List<Button> responseButtons=new ArrayList<Button>();\n responseButtons.add(scheduleButton);\n responseButtons.add(highlightButton);\n responseButtons.add(tableButton);\n\n ButtonPayload responsePayload=new ButtonPayload();\n responsePayload.setText(\"Hi, What do you want to do?\");\n responsePayload.setTemplate_type(\"button\");\n responsePayload.setButtons(responseButtons);\n\n Attachment responseAttachment=new Attachment();\n responseAttachment.setType(\"template\");\n responseAttachment.setPayload(responsePayload);\n\n ResponseMessage responseMessage=new ResponseMessage();\n responseMessage.setAttachment(responseAttachment);\n\n Recipient recipient=new Recipient(sender.getId());\n JSONResponse jsonResponse=new JSONResponse();\n jsonResponse.setRecipient(recipient);\n jsonResponse.setMessage(responseMessage);\n\n try{\n response=objectMapper.writeValueAsString(jsonResponse);\n }\n catch(Exception ex){\n ex.printStackTrace();\n }\n\n return response;\n }",
"public List<MenuItemDTO> constructMenuItemDTOsForMenu(Menu menu);",
"@CrossOrigin(origins = \"http://localhost:3000\")\n @RequestMapping(\n value = \"/restaurant/menu\", \n method = RequestMethod.GET, \n produces = MediaType.APPLICATION_JSON_VALUE\n )\n public Object getRestaurantMenu() {\n // Get the menu that read in @ start of application\n // Resource resource = this.getClass().getResource(\"/static/MenuItems.json\");\n Resource resource = new ClassPathResource(\"/static/MenuItems.json\");\n\n try {\n ObjectMapper mapper = new ObjectMapper();\n return mapper.readValue(resource.getInputStream(), Object.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"private Menu toMenu(SbiMenu hibMenu, Integer roleId) throws EMFUserError{\n\n\t\tMenu menu = new Menu();\n\t\tmenu.setMenuId(hibMenu.getMenuId());\n\t\tmenu.setName(hibMenu.getName());\n\t\tmenu.setDescr(hibMenu.getDescr());\n\t\tmenu.setParentId(hibMenu.getParentId());\n\t\tmenu.setObjId(hibMenu.getObjId());\n\t\tmenu.setObjParameters(hibMenu.getObjParameters());\n\t\tmenu.setSubObjName(hibMenu.getSubObjName());\n\t\tmenu.setSnapshotName(hibMenu.getSnapshotName());\n\t\tmenu.setSnapshotHistory(hibMenu.getSnapshotHistory());\n\t\tmenu.setFunctionality(hibMenu.getFunctionality());\n\t\tmenu.setInitialPath(hibMenu.getInitialPath());\n\t\tmenu.setLevel(getLevel(menu.getParentId(), menu.getObjId()));\n\t\tmenu.setProg(hibMenu.getProg());\n\n\t\tif(hibMenu.getViewIcons()!=null){\n\t\t\tmenu.setViewIcons(hibMenu.getViewIcons().booleanValue());\n\t\t}\n\t\telse menu.setViewIcons(false);\n\n\t\tif(hibMenu.getHideToolbar()!=null){\n\t\t\tmenu.setHideToolbar(hibMenu.getHideToolbar().booleanValue());\n\t\t}\n\t\telse menu.setHideToolbar(false);\n\n\t\tif(hibMenu.getHideSliders()!=null){\n\t\t\tmenu.setHideSliders(hibMenu.getHideSliders().booleanValue());\n\t\t}\n\t\telse menu.setHideSliders(false);\n\t\t\n\t\tmenu.setStaticPage(hibMenu.getStaticPage());\n\t\tmenu.setExternalApplicationUrl(hibMenu.getExternalApplicationUrl());\n\t\t\n\t\t\n\t\t//set the dephts\n\t\t/*if(menu.getParentId()!=null){\n\t\t\tMenu parent=loadMenuByID(menu.getParentId());\n\t\t\tif(parent!=null){\n\t\t\t\tInteger depth=parent.getDepth();\n\t\t\t\tmenu.setDepth(new Integer(depth.intValue()+1));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tmenu.setDepth(new Integer(0));\n\t\t}*/\n\n\n\t\tList rolesList = new ArrayList();\n\t\tSet roles = hibMenu.getSbiMenuRoles(); // roles of menu in database\n\t\tIterator iterRoles = roles.iterator();\n\t\twhile(iterRoles.hasNext()) {\t\t\t// for each role retrieved in database\n\t\t\tSbiMenuRole hibMenuRole = (SbiMenuRole)iterRoles.next();\n\n\t\t\tSbiExtRoles hibRole =hibMenuRole.getSbiExtRoles();\n\n\t\t\tRoleDAOHibImpl roleDAO = new RoleDAOHibImpl();\n\t\t\tRole role = roleDAO.toRole(hibRole);\n\n\t\t\trolesList.add(role);\n\t\t}\n\n\t\tRole[] rolesD = new Role[rolesList.size()];\n\n\t\tfor (int i = 0; i < rolesList.size(); i++)\n\t\t\trolesD[i] = (Role) rolesList.get(i);\n\n\t\tmenu.setRoles(rolesD);\n\n\t\t//set children\n\t\ttry{\n\t\t\tList tmpLstChildren = (DAOFactory.getMenuDAO().getChildrenMenu(menu.getMenuId(), roleId));\n\t\t\tboolean hasCHildren = (tmpLstChildren.size()==0)?false:true;\n\t\t\tmenu.setLstChildren(tmpLstChildren);\n\t\t\tmenu.setHasChildren(hasCHildren);\n\t\t}catch (Exception ex){\n\t\t\tthrow new EMFUserError(EMFErrorSeverity.ERROR, 100);\n\t\t}\n\n\t\treturn menu;\n\t}",
"@RequestMapping(value=\"/menulist/{menuItemkey}\", method=RequestMethod.PUT)\r\n\tpublic @ResponseBody Object updateMenu(@PathVariable String menuItemkey,@RequestBody HubMenuModelV3 menu){\r\n\t\tObject responce=null;\r\n\t\tresponce=hubMenuDaoV3.updateMenuV3(menuItemkey,menu);\r\n\t\treturn responce;\r\n\t}",
"public void setMenu ( Object menu ) {\r\n\t\tgetStateHelper().put(PropertyKeys.menu, menu);\r\n\t\thandleAttribute(\"menu\", menu);\r\n\t}",
"private void createMenu() {\n\t\ttry {\n\t\t\tfor(String s : PizzaDB.getPizzeDB(this.menu).keySet()){\n\t\t\t\taddPizza(this.menu.get(s));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void viewMenu() {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\tmm.clear();\n\n\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\n\t\t\tString leftAlignFormat = \"| %-10s | %-37s | %-5s | %-12s | %n\";\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\n\t\t\t\n\t\t\tCollections.sort(mm); \n\t\t\tfor (AlacarteMenu item : mm) {\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tSystem.out.format(leftAlignFormat, item.getMenuName(), item.getMenuDesc(), item.getMenuPrice(),\n\t\t\t\t\t\titem.getMenuType());\n\t\t\t}\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (IOException e) {\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"JZLemurMenu createJZLemurMenu();",
"public SysMenu selectMenuById(Long menuId);",
"public synchronized void bind(ClientMenu cm)\r\n\t{\r\n\t\t// REMOVE menu / menu items, if they exist.\r\n\t\tJMenu menu = (JMenu) cm.getMenuItem(MESSAGE);\r\n\t\tif(menu != null)\r\n\t\t{\r\n\t\t\tmenu.removeAll();\r\n\t\t\tcm.getJMenuBar().remove(menu);\r\n\t\t\tcm.getJMenuBar().validate();\r\n\t\t}\r\n\t\t\r\n\t\t// create menu / items, based on handler settings.\r\n\t\t//\r\n\t\tif(pressChannel != null)\r\n\t\t{\r\n\t\t\t// create menu / menu items\r\n\t\t\tmenu = cm.makeMenu(MESSAGE, false);\r\n\t\t\tmenu.add(cm.makeMenuItem(MESSAGE_PRESS_WRITE));\r\n\t\t\tmenu.add(cm.makeMenuItem(MESSAGE_PRESS_VIEW));\r\n\t\t\tmenu.add(new JSeparator());\r\n\t\t\tmenu.add(cm.makeMenuItem(MESSAGE_PRESS_PROPERTIES));\r\n\t\t\t\r\n\t\t\t// set handlers\r\n\t\t\tcm.setActionMethod(MESSAGE_PRESS_WRITE, this, \"onMsgPressWrite\");\r\n\t\t\tcm.setActionMethod(MESSAGE_PRESS_VIEW, this, \"onMsgPressView\");\r\n\t\t\tcm.setActionMethod(MESSAGE_PRESS_PROPERTIES, this, \"onMsgPressProperties\");\r\n\t\t\t\r\n\t\t\t// add to JMenuBar & validate\r\n\t\t\tcm.getJMenuBar().add(menu, (cm.getJMenuBar().getMenuCount() - 2));\r\n\t\t\tcm.getJMenuBar().validate();\r\n\t\t}\r\n\t}",
"public MenuControlador(PainelMenu menu) {\n\t\tthis.menu = menu;\n\t}",
"public List<SysMenu> selectMenuList(SysMenu menu);",
"public void buildMenu() {\n mMenuItems = new ArrayList<>();\n mMenuItems.add(\"Drops\");\n mMenuItems.add(\"Friends\");\n mMenuItems.add(\"Places\");\n mMenuItems.add(\"Profile\");\n\n mMenuRV = findViewById(R.id.messenger_menu_rv);\n RecyclerView.LayoutManager menuLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\n MenuRecyclerViewAdapter menuAdapter = new MenuRecyclerViewAdapter(mMenuItems);\n mMenuRV.setLayoutManager(menuLayoutManager);\n mMenuRV.setAdapter(menuAdapter);\n menuAdapter.setOnItemClickListener(new MenuRecyclerViewAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(int position) {\n doMenuAction(position);\n }\n });\n }",
"@RequestMapping(value=\"/menulist/{menuItemkey}\", method=RequestMethod.GET)\r\n\tpublic @ResponseBody Object getMenu(@PathVariable String menuItemkey){\r\n\t\tObject responce=null;\r\n\t\tresponce=hubMenuDaoV3.getMenuV3(menuItemkey);\r\n\t\treturn responce;\r\n\t}",
"private void sendMainMenu()\n\t{\n\t\t\n\t\tString menu =\n\t\t\t\"\\r\\n\"+\n\t\t\t\"[0] List entities available for binding\\r\\n\"+\n\t\t\t\"[1] Search for a specific entity\\r\\n\"+\n\t\t\t\"[2] Bind to an entity\\r\\n\"+\n\t\t\t//lastMenu.buildMenuString()+\n\t\t \"Enter selection: \";\n\t\tsendOutput(menu, false);\n\t}",
"private void initializeMenu(){\n\t\troot = new TreeField(new TreeFieldCallback() {\n\t\t\t\n\t\t\tpublic void drawTreeItem(TreeField treeField, Graphics graphics, int node,\n\t\t\t\t\tint y, int width, int indent) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString text = treeField.getCookie(node).toString(); \n\t graphics.drawText(text, indent, y);\n\t\t\t}\n\t\t}, Field.FOCUSABLE){\n\t\t\tprotected boolean navigationClick(int status, int time) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\treturn super.navigationClick(status, time);\n\t\t\t}\n\t\t\t\n\t\t\tprotected boolean keyDown(int keycode, int time) {\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tif(keycode == 655360){\n\t\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn super.keyDown(keycode, time);\n\t\t\t}\n\t\t};\n\t\troot.setDefaultExpanded(false);\n\n\t\t//home\n\t\tMenuModel home = new MenuModel(\"Home\", MenuModel.HOME, true);\n\t\thome.setId(root.addChildNode(0, home));\n\t\t\n\t\tint lastRootChildId = home.getId();\n\t\t\n\t\t//menu tree\n\t\tif(Singleton.getInstance().getMenuTree() != null){\n\t\t\tJSONArray menuTree = Singleton.getInstance().getMenuTree();\n\t\t\tif(menuTree.length() > 0){\n\t\t\t\tfor (int i = 0; i < menuTree.length(); i++) {\n\t\t\t\t\tif(!menuTree.isNull(i)){\n\t\t\t\t\t\tJSONObject node;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnode = menuTree.getJSONObject(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//root menu tree (pria, wanita)\n\t\t\t\t\t\t\tboolean isChild = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString name = node.getString(\"name\");\n\t\t\t\t\t\t\tString url = node.getString(\"url\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMenuModel treeNode = new MenuModel(\n\t\t\t\t\t\t\t\t\tname, url, MenuModel.JSON_TREE_NODE, isChild);\n\t\t\t\t\t\t\ttreeNode.setId(root.addSiblingNode(lastRootChildId, treeNode));\n\t\t\t\t\t\t\tlastRootChildId = treeNode.getId();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif(!node.isNull(\"child\")){\n\t\t\t\t\t\t\t\t\tJSONArray childNodes = node.getJSONArray(\"child\");\n\t\t\t\t\t\t\t\t\tif(childNodes.length() > 0){\n\t\t\t\t\t\t\t\t\t\tfor (int j = childNodes.length() - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\t\t\t\tif(!childNodes.isNull(j)){\n\t\t\t\t\t\t\t\t\t\t\t\taddChildNode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttreeNode.getId(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchildNodes.getJSONObject(j));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif(Singleton.getInstance().getIsLogin()){\n\t\t\t//akun saya\n\t\t\tMenuModel myAccount = new MenuModel(\"Akun Saya\", MenuModel.MY_ACCOUNT, false);\n\t\t\tmyAccount.setId(root.addSiblingNode(lastRootChildId, myAccount));\n\t\t\t\n\t\t\tlastRootChildId = myAccount.getId();\n\t\t\t\n\t\t\t//akun saya->detail akun\n\t\t\tMenuModel profile = new MenuModel(\"Detail Akun\", MenuModel.PROFILE, true);\n\t\t\tprofile.setId(root.addChildNode(myAccount.getId(), profile));\n\t\t\t\n\t\t\t//akun saya->daftar pesanan\n\t\t\tMenuModel myOrderList = new MenuModel(\n\t\t\t\t\t\"Daftar Pesanan\", MenuModel.MY_ORDER, true);\n\t\t\tmyOrderList.setId(root.addSiblingNode(profile.getId(), myOrderList));\t\t\n\t\t\t\n\t\t\t//logout\n\t\t\tMenuModel logout = new MenuModel(\"Logout\", MenuModel.LOGOUT, true);\n\t\t\tlogout.setId(root.addSiblingNode(lastRootChildId, logout));\n\t\t\tlastRootChildId = logout.getId();\n\t\t} else{\n\t\t\t//login\n\t\t\tMenuModel login = new MenuModel(\"Login\", MenuModel.LOGIN, false);\n\t\t\tlogin.setId(root.addSiblingNode(lastRootChildId, login));\n\t\t\t\n\t\t\tlastRootChildId = login.getId();\n\t\t\t\n\t\t\t//login->login\n\t\t\tMenuModel loginMenu = new MenuModel(\"Login\", MenuModel.LOGIN_MENU, true);\n\t\t\tloginMenu.setId(root.addChildNode(login.getId(), loginMenu));\n\t\t\t\n\t\t\t//login->register\n\t\t\tMenuModel register = new MenuModel(\"Register\", MenuModel.REGISTER, true);\n\t\t\tregister.setId(root.addSiblingNode(loginMenu.getId(), register));\n\t\t}\n\t\t\n\t\tMenuUserModel menu = Singleton.getInstance().getMenu();\n\t\tif(menu != null){\n\t\t\t//sales\n\t\t\tif(menu.getMenuSalesOrder() || menu.isMenuSalesRetur()){\n\t\t\t\tMenuModel sales = new MenuModel(\"Sales\", MenuModel.SALES, false);\n\t\t\t\tsales.setId(root.addSiblingNode(lastRootChildId, sales));\n\t\t\t\tlastRootChildId = sales.getId();\n\t\t\t\t\n\t\t\t\t//sales retur\n\t\t\t\tif(menu.isMenuSalesRetur()){\n\t\t\t\t\tMenuModel salesRetur = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Retur\", MenuModel.SALES_RETUR, true);\n\t\t\t\t\tsalesRetur.setId(root.addChildNode(sales.getId(), salesRetur));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//sales order\n\t\t\t\tif(menu.getMenuSalesOrder()){\n\t\t\t\t\tMenuModel salesOrder = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Order\", MenuModel.SALES_ORDER, true);\n\t\t\t\t\tsalesOrder.setId(root.addChildNode(sales.getId(), salesOrder));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//cms product\n\t\t\tif(menu.getMenuCmsProduct() || menu.getMenuCmsProductGrosir()){\n\t\t\t\tMenuModel cmsProduct = new MenuModel(\n\t\t\t\t\t\t\"Produk\", MenuModel.CMS_PRODUCT, false);\n\t\t\t\tcmsProduct.setId(\n\t\t\t\t\t\troot.addSiblingNode(lastRootChildId, cmsProduct));\n\t\t\t\tlastRootChildId = cmsProduct.getId();\n\t\t\t\t\n\t\t\t\t//product retail\n\t\t\t\tif(menu.getMenuCmsProduct()){\n\t\t\t\t\tMenuModel productRetail = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Retail\", MenuModel.CMS_PRODUCT_RETAIL, true);\n\t\t\t\t\tproductRetail.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productRetail));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//product grosir\n\t\t\t\tif(menu.getMenuCmsProductGrosir()){\n\t\t\t\t\tMenuModel productGrosir = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Grosir\", MenuModel.CMS_PRODUCT_GROSIR, true);\n\t\t\t\t\tproductGrosir.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productGrosir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//service\n\t\tMenuModel service = new MenuModel(\"Layanan\", MenuModel.SERVICE, false);\n\t\tservice.setId(root.addSiblingNode(lastRootChildId, service));\n\t\tlastRootChildId = service.getId();\n\t\tVector serviceList = Singleton.getInstance().getServices();\n\t\ttry {\n\t\t\tfor (int i = serviceList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) serviceList.elementAt(i);\n\t\t\t\tMenuModel serviceMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(),\n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\tserviceMenu.setId(root.addChildNode(service.getId(), serviceMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\t\n\t\t//about\n\t\tMenuModel about = new MenuModel(\"Tentang Y2\", MenuModel.ABOUT, false);\n\t\tabout.setId(root.addSiblingNode(service.getId(), about));\n\t\tlastRootChildId = service.getId();\n\t\tVector aboutList = Singleton.getInstance().getAbouts();\n\t\ttry {\n\t\t\tfor (int i = aboutList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) aboutList.elementAt(i);\n\t\t\t\tMenuModel aboutMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(), \n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\taboutMenu.setId(root.addChildNode(service.getId(), aboutMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tcontainer.add(root);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Multicast TCP packet to all name servers in nameServerIds. This method excludes name server id in excludeNameServers | public static void multicastTCP(GNSNodeConfig gnsNodeConfig, Set nameServerIds, JSONObject json, int numRetry,
GNS.PortType portType, Set excludeNameServers) {
int tries;
for (Object id : nameServerIds) {
if (excludeNameServers != null && excludeNameServers.contains(id)) {
continue;
}
tries = 0;
do {
tries += 1;
try {
Socket socket = Packet.sendTCPPacket(gnsNodeConfig, json, (String) id, portType);
if (socket != null) {
socket.close();
}
break;
} catch (IOException e) {
GNS.getLogger().severe("Exception: socket closed by nameserver " + id);
e.printStackTrace();
}
} while (tries < numRetry);
}
} | [
"private void refreshServerList() {\n\t\tcurrentRequestId++;\n\t\tserverNames.clear();\n\t\tserverTable.clear();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\taddresses = client.discoverHosts(WifiHelper.UDP_PORT, 1000);\n\t\t\t\tint removed = 0;\n\t\t\t\tfor(int i = 0; i + removed < addresses.size(); i++) {\n\t\t\t\t\tsynchronized(client) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tclient.connect(1000, addresses.get(i - removed), WifiHelper.TCP_PORT, WifiHelper.UDP_PORT);\n\t\t\t\t\t\t\tclient.sendTCP(new NameRequest(currentRequestId, addresses.size()));\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tclient.wait(5000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\taddresses.remove(i);\n\t\t\t\t\t\t\tremoved++;\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}).start();\n\t}",
"public void setNameservers(String[] nameservers) {\n this.nameservers = nameservers;\n }",
"public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"private static void createNameServerList() {\n nameServerList = new ArrayList<>();\n nameServerList.add(\"198.41.0.4\");\n nameServerList.add(\"199.9.14.201\");\n nameServerList.add(\"192.33.4.12\");\n nameServerList.add(\"199.7.91.13\");\n nameServerList.add(\"192.203.230\");\n nameServerList.add(\"192.5.5.241\");\n nameServerList.add(\"192.112.36.4\");\n nameServerList.add(\"198.97.190.53\");\n nameServerList.add(\"192.36.148.17\");\n nameServerList.add(\"192.58.128.30\");\n nameServerList.add(\"193.0.14.129\");\n nameServerList.add(\"199.7.83.42\");\n nameServerList.add(\"202.12.27.33\");\n }",
"public void setNameServers(String[] nameservers) {\n\t\tif (nameservers != null) {\n\t\t\t_nameservers.clear();\n\t\t\tfor (int i = 0; i < nameservers.length; i++)\n\t\t\t\t_nameservers.add(nameservers[i]);\n\t\t}\n\t}",
"private static void multicast(String msg) {\n \tfor(int id : IPs.keySet()) {\n \t\ttry {\n \t\t\tunicast_send(id, msg);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t}\n }",
"public synchronized void broadcastServers(String msg, Connection senderConn) {\n\t\t// Broadcast to all connected servers.\n\t\tList<Connection> connServers = Control.getInstance().getConnections();\n\t\tfor(Connection sc : connServers) {\t\t\t\n\t\t\tif (sc.getType() == Connection.TYPE_SERVER && sc.getAuth() && sc.isOpen()) {\n\t\t\t\tBoolean isSender = (senderConn != null && sc.equals(senderConn));\n\t\t\t\t//// We don't want to send to the original sender\n\t\t\t\tif (!isSender) {\n\t\t\t\t\t//log.info(\"Msg broadcast to servers : \" + msg);\n\t\t\t\t\tSystem.out.println(\"I'm going to send a broadcast to only servers: \" + msg);\n\t\t\t\t\tsc.writeMsg(msg);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}",
"private void broadcastPlayers(String s){\n\t\tfor(Player p: playerList)\n\t\t p.sendMessage(s);\n\t}",
"@Override\n\tpublic void onMute(String clientName) {\n\t\t// TODO Auto-generated method stub\n\t\tlog.log(Level.INFO, \"Tiggered sendMute()\");\n\t\tIterator<User> iter = users.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\t// try {\n\t\t\tString name = clientName;\n\t\t\tUser client = iter.next();\n\t\t\tif (name.equals(client.getName())) {\n\t\t\t\tmuteName = client.getName();\n\t\t\t\tmuteClient = client;\n\t\t\t\tlog.log(Level.INFO, \"Passed name check\");\n\t\t\t}\n\t\t\t// } catch (ConcurrentModificationException e) {\n\t\t\t// log.log(Level.INFO, \"Caught ConcurrentModification\");\n\t\t\t// }\n\t\t}\n\t\treplaceClient(\"<font color=silver>\" + muteName + \"</font>\", muteClient);\n\t\tlog.log(Level.INFO, \"Reached replaceClient with \" + muteName + \" and \" + muteClient.getName());\n\t}",
"public void sendMulticast(String s){\n }",
"private void sendtoAllServerExceptSource(Map<String, Object> exe_result) {\r\n\t\t\tfor(ServerNode server : Server.servernodes.getCurrAllServer()){\r\n\t\t\t\tfor(Connection con : Server.connections){\r\n\t\t\t\t\tif(con.equal(server.getAddress(),server.getPort())) {\r\n\t\t\t\t\t\t//match the server node and the connection\r\n\t\t\t\t\t\tif(!con.equal(this.cAddress,this.cPort)) {\r\n\t\t\t\t\t\t\t//send to all servers except the source node\r\n\t\t\t\t\t\t\tcon.send(exe_result);\r\n\t\t\t\t\t\t\tLogger.info(\"A message has been sent to all servers except its source.\");\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}",
"private void sendToServers(DNSOutgoing out) throws IOException {\r\n out.finish();\r\n if (!out.isEmpty()) {\r\n \tVector serverIPs = getServerIPs();\r\n \t// Any of the available sockets can be used to send a packet.\r\n \t// The safest thing here is to use the first one (may be the only one available).\r\n \tDatagramSocket socket = (DatagramSocket)sockets.values().iterator().next();\r\n \tfor(Iterator i = serverIPs.iterator(); i.hasNext();) {\r\n \t\tString ip = (String)i.next();\r\n \t\tDatagramPacket packet = new DatagramPacket(out.getData(), out.getOff(), InetAddress.getByName(ip), Utils.SERVER_COM);\r\n \t\tsocket.send(packet);\r\n \t}\r\n }\r\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tvoid updateNames () {\n\t\tConnection[] connections = server.getConnections();\r\n\t\t\r\n\t\tArrayList<String> names = new ArrayList<>(connections.length);\r\n\t\tfor (int i = connections.length - 1; i >= 0; i--) {\r\n\t\t\tChatConnection connection = (ChatConnection)connections[i];\r\n\t\t\tnames.add(connection.name);\r\n\t\t}\r\n\t\t// Send the names to everyone.\r\n\t\tUpdateNames updateNames = new UpdateNames();\r\n\t\tupdateNames.names = (String[])names.toArray(new String[names.size()]);\r\n\t\tserver.sendToAll(updateNames, true);\r\n\t}",
"public String[] getNameservers() {\n return nameservers;\n }",
"public HashMap<InetSocketAddress, GameServer> requestServers(String filter) throws IOException {\n boolean finished = false;\n InetSocketAddress last = new InetSocketAddress(\"0.0.0.0\", 0);\n while (!finished) {\n // We send queries until the last IP read is 0.0.0.0 and port it 0. That is the Master Server's way of\n // telling us that the list is complete.\n\n // Send query to master server\n byte[] sendBuf = Requests.MASTER(Region.EVERYWHERE, last, filter + \"\\0\");\n DatagramPacket packet = new DatagramPacket(sendBuf, sendBuf.length, host);\n socket.send(packet);\n\n DatagramPacket recv = recieve(Requests.MASTER_RESPONSE);\n if (recv != null) {\n last = parseResponse(recv); // Save the last IP read\n if (last.equals(fin)) {\n finished = true;\n }\n }\n }\n return gameServers;\n }",
"@Override\n\tpublic void onUnmute(String clientName) {\n\t\t// TODO Auto-generated method stub\n\t\tlog.log(Level.INFO, \"Tiggered sendUnmute()\");\n\t\tIterator<User> iter = users.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\t// try {\n\t\t\tString name = \"<font color=silver>\" + clientName + \"</font>\";\n\t\t\tUser client = iter.next();\n\t\t\tif (name.equals(client.getName())) {\n\t\t\t\tunmuteName = clientName;\n\t\t\t\tunmuteClient = client;\n\t\t\t\tlog.log(Level.INFO, \"Passed name check\");\n\t\t\t}\n\t\t\t// } catch (ConcurrentModificationException e) {\n\t\t\t// log.log(Level.INFO, \"Caught ConcurrentModification\");\n\t\t\t// }\n\t\t}\n\t\treplaceClient(unmuteName, unmuteClient);\n\t\tlog.log(Level.INFO, \"Reached replaceClient with \" + unmuteName + \" and \" + unmuteClient.getName());\n\t}",
"public NameServer() {\n\thosts = new HashMap<String, String[]>();\n\t\n\ttry {\n\t // open selector\n\t selector = Selector.open();\n\t // open socket channel\n\t serverSocketChannel = ServerSocketChannel.open();\n\t // set the socket associated with this channel\n\t serverSocket = serverSocketChannel.socket();\n\t // set Blocking mode to non-blocking\n\t serverSocketChannel.configureBlocking(false);\n\t // bind portNum\n\t try {\n\t\tserverSocket.bind(new InetSocketAddress(portNum));\n\t } catch (Exception e) {\n\t\tSystem.err.println(\"Cannot listen on given port number \" + portNum);\n\t\tSystem.exit(1);\n\t }\n\t // registers this channel with the given selector, returning a selection key\n\t serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);\n\t // System.out.println(\"<TCPServer> Server is activated, listening on portNum: \"+ portNum);\n\t System.err.println(\"Name Server waiting for incoming connections ...\");\n\n\t while (selector.select() > 0) {\n\t\tfor (SelectionKey key : selector.selectedKeys()) {\n\t\t // test whether this key's channel is ready to accept a new socket connection\n\t\t if (key.isAcceptable()) {\n\t\t\t// accept the connection\n\t\t\tServerSocketChannel server = (ServerSocketChannel) key.channel();\n\t\t\tSocketChannel sc = server.accept();\n\t\t\tif (sc == null)\n\t\t\t continue;\n\t\t\t// System.out.println(\"Connection accepted from: \" + sc.getRemoteAddress());\n\t\t\t// set blocking mode of the channel\n\t\t\tsc.configureBlocking(false);\n\t\t\t// allocate buffer\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(1024);\n\t\t\t// set register status to READ\n\t\t\tsc.register(selector, SelectionKey.OP_READ, buffer);\n\t\t }\n\t\t // test whether this key's channel is ready for reading from Client\n\t\t else if (key.isReadable()) {\n\t\t\t// get allocated buffer with size 1024\n\t\t\tByteBuffer buffer = (ByteBuffer) key.attachment();\n\t\t\tSocketChannel sc = (SocketChannel) key.channel();\n\t\t\tint readBytes = 0;\n\t\t\tString message = null;\n\t\t\t// try to read bytes from the channel into the buffer\n\t\t\ttry {\n\t\t\t int ret;\n\t\t\t try {\n\t\t\t\twhile ((ret = sc.read(buffer)) > 0)\n\t\t\t\t readBytes += ret;\n\t\t\t } catch (Exception e) {\n\t\t\t\treadBytes = 0;\n\t\t\t } finally {\n\t\t\t\tbuffer.flip();\n\t\t\t }\n\t\t\t // finished reading, form message\n\t\t\t if (readBytes > 0) {\n\t\t\t\tmessage = Charset.forName(\"UTF-8\").decode(buffer).toString();\n\t\t\t\tSystem.out.println(message);\n\t\t\t\tbuffer = null;\n\t\t\t }\n\t\t\t} finally {\n\t\t\t if (buffer != null)\n\t\t\t\tbuffer.clear();\n\t\t\t}\n\t\t\t// react by Client's message\n\t\t\tif (readBytes > 0) {\n\t\t\t // System.out.println(\"Message from Client\" + sc.getRemoteAddress() + \": \" + message);\n\t\t\t // check if the message is a lookup or register query\n\t\t\t if (message.toLowerCase().trim().contains(\"exit\")) {\n\t\t\t\tsc.close();\n\t\t\t\tbreak;\n\t\t\t } else if (message.toLowerCase().trim().contains(\"lookup\") || message.toLowerCase().trim().contains(\"register\")) {\n\t\t\t\t// sc.register(key.selector(), SelectionKey.OP_WRITE, \"parsing\\n\");\n\t\t\t\tArrayList parsed = parseMessage(message);\n\t\t\t\tByteBuffer send = Charset.forName(\"UTF-8\").encode((String)parsed.get(0));\n\t\t\t\tSystem.out.println(sc.write(send));\n\t\t\t\t// sc.close();\n\t\t\t\t// buffer.flip();\n\t\t\t\t\n\t\t\t\t// if (parsed.get(0) == \"error\") {\n\t\t\t\t// // System.out.println(\"crashed\");\n\n\t\t\t\t// // create bytebuffer and send it\n\t\t\t\t// // ByteBuffer send = Charset.forName(\"UTF-8\").encode((String)parsed.get(0));\n\t\t\t\t// // System.out.println(send);\n\t\t\t\t// // sc.register(selector, SelectionKey.OP_WRITE);\n\t\t\t\t// // sc.write(send);\n\t\t\t\t// // // sc.register(key.selector(), SelectionKey.OP_WRITE, parsed.get(0));\n\t\t\t\t// sc.close();\n\t\t\t\t// break;\n\t\t\t\t// } else {\n\t\t\t\t// // parsing was successful, send the information back to the client\n\t\t\t\t// ByteBuffer send = Charset.forName(\"UTF-8\").encode((String)parsed.get(0));\n\t\t\t\t// sc.register(selector, SelectionKey.OP_READ, buffer);\n\t\t\t\t// System.out.println(parsed.get(0));\n\t\t\t\t// sc.write(send);\n\t\t\t\t// // sc.close();\n\t\t\t\t// }\n\t\t\t } else {\n\t\t\t\t// junk message is received, close collection\n\t\t\t\tsc.close();\n\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t }\n\t\t // test whether this key's channel is ready for sending to Client\n\t\t else if (key.isWritable()) {\n\t\t\tSocketChannel sc = (SocketChannel) key.channel();\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(1024);\n\t\t\tbuffer.put(((String) key.attachment()).getBytes());\n\t\t\tbuffer.flip();\n\t\t\tsc.write(buffer);\n\t\t\t// set register status to READ\n\t\t\tsc.register(key.selector(), SelectionKey.OP_READ, buffer);\n\t\t }\n\t\t}\n\t\tif (selector.isOpen()) {\n\t\t selector.selectedKeys().clear();\n\t\t} else {\n\t\t break;\n\t\t}\n\t }\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t} finally {\n\t if (serverSocketChannel != null) {\n\t\ttry {\n\t\t serverSocketChannel.close();\n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }",
"public void run() {\n try {\n\n // Create character streams for the socket.\n in = new BufferedReader(new InputStreamReader(\n socket.getInputStream()));\n out = new PrintWriter(socket.getOutputStream(), true);\n System.out.println(\"...\"+socket.getInetAddress());\n\n // Request a name from this client. Keep requesting until\n // a name is submitted that is not already used. Note that\n // checking for the existence of a name and adding the name\n // must be done while locking the set of names.\n while (true) {\n out.println(\"SUBMIT NAME\");\n name = in.readLine();\n \tString[] arr= name.split(\":\", 2);\n \tname= arr[1];\n if (name == null) {\n return;\n }\n if (!ip.contains(socket.getInetAddress())) {\n ip.add(socket.getInetAddress());\n }\n else\n {\n \tout.println(\"already opened once.\");\n \tcontinue;\n }\n synchronized (clientOut) {\n if (clientOut.get(name) == null) {\n client.put(count, name);\n id= count;\n break;\n }\n }\n }\n\n // Now that a successful name has been chosen, add the\n // socket's print writer to the set of all writers so\n // this client can receive broadcast messages.\n clientOut.put(name, out);\n out.println(\"NAMEACCEPTED\"+name);\n //adding online users to the new user.\n for (int i= 0;i < count;i++) {\n \tString str;\n\t\t\t\t\tif((str= (String)client.get(i)) != null)\n \t\tout.println(\"TAB\"+i+str);\n }\n \n //adding new user to all the users who are online.\n for (int i= 0;i < count;i++) {\n \tPrintWriter wrt;\n \tif((wrt= clientOut.get(client.get(i))) != null)\n \t\twrt.println(\"TAB\"+count+name);\n }\n count++;\n\n // Accept messages from this client and broadcast them.\n // Ignore other clients that cannot be broadcasted to.\n while (true) {\n \tString input= in.readLine();\n \tchar c1;\n \tint c2;\n \tString[] arr= input.split(\":\", 2);\n \tif(arr[0].equals(\"FILE\"))\n \t{\n \t\tString[] arr1= input.split(\":\", 3);\n \t\tPrintWriter p= clientOut.get(client.get(Integer.valueOf(arr1[1])));\n \t\tp.println(\"FILE:\"+id+\":\"+arr1[2]);\n \t\twhile((input= in.readLine()) != \"stop\")\n \t\t{\n \t\t\tp.println(input);\n \t\t\tp.flush();\n \t\t}\n \t\tp.println(\"stop\");\n \t\tp.flush();\n \t\tSystem.out.println(\"sent.........\");\n/* \t\twhile((c2= in.read()) != -1)\n \t\t{\n \t\t\tc1= (char) c2;\n \t\t\tp.print(c1);\n \t\t\tp.flush();\n \t\t\tSystem.out.print(c2);\n \t\t}\n \t\tSystem.out.println(c2+\".......\");\n \t\tp.print((char)-1);*/\n \t}\n \telse\n \t\tclientOut.get(client.get(Integer.valueOf(arr[0]))).println(\"MESSAGE:\"+id+\":\"+name+\":\"+arr[1]);\n }\n } catch (IOException e) {\n System.out.println(e);\n } finally {\n // This client is going down! Remove its name and its print\n // writer from the sets, and close its socket.\n \t//remove this client from every other client.(TAB)\n \tfor (int i= 0;i < count;i++) {\n \t\tPrintWriter wrt;\n\t\t\t\t\tif(i != id && (wrt= clientOut.get(client.get(i))) != null)\n \t\t\twrt.println(\"REMOVE\"+id);\n }\n\n if (name != null) {\n \tclient.remove(id);\n \tclientOut.remove(name);\n \tip.remove(socket.getInetAddress());\n }\n try {\n socket.close();\n } catch (IOException e) {\n }\n }\n }",
"public void sendToAllExcept(Message message, UUID id) {\n for (ServerService s : connected.values()) {\n if (!s.Id().get().equals(id)) {\n s.send(message);\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metadata attached to the incident. Top level values must be objects. | @javax.annotation.Nullable
@ApiModelProperty(example = "{\"jira\":{\"issue_id\":\"value\"}}", value = "Metadata attached to the incident. Top level values must be objects.")
public Object getMetadata() {
return metadata;
} | [
"Map<String, Object> getMetadata();",
"public String getMetaDataString() {\n\t\treturn this.metadata;\n\t}",
"ResourcePropertyMetaData<T> getMetaData();",
"@ApiModelProperty(required = true, value = \"List of metadata key-value pairs used by the consumer to associate meaningful metadata to the related virtualised resource.\")\n public MetaData getMetadata() {\n return metadata;\n }",
"BasicMetaData getBasicMetaData();",
"public Metadata getMetadata() { return metadata; }",
"public int getMetaDataInt() {\n\t\treturn this.metadataint;\n\t}",
"Map<String, String> getCustomMetadata();",
"public Map<String, Object> getMetaDataMap() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"type\", getType());\n map.put(\"date\", getDate());\n map.put(\"user\", getUser().toString());\n map.put(\"id\", getIdentifier());\n return map;\n }",
"private void createMetaData() {\n\n Map<String, Object> categories = getMetricCategories(); // Get current Metric Categories\n Iterator<String> iter = categories.keySet().iterator();\n while (iter.hasNext()) {\n String category = iter.next();\n @SuppressWarnings(\"unchecked\")\n Map<String, String> attributes = (Map<String, String>) categories.get(category);\n String valueMetrics = attributes.get(\"value_metrics\");\n if (valueMetrics != null) {\n Set<String> metrics = new HashSet<String>(Arrays.asList(valueMetrics.toLowerCase().replaceAll(SPACE, EMPTY_STRING).split(COMMA)));\n for (String s : metrics) {\n addMetricMeta(category + SEPARATOR + s, new MetricMeta(false));\n }\n\n }\n String counterMetrics = attributes.get(\"counter_metrics\");\n if (counterMetrics != null) {\n Set<String> metrics = new HashSet<String>(Arrays.asList(counterMetrics.toLowerCase().replaceAll(SPACE, EMPTY_STRING).split(COMMA)));\n for (String s : metrics) {\n addMetricMeta(category + SEPARATOR + s, new MetricMeta(true));\n }\n }\n }\n\n //Define overview metrics meta data\n addMetricMeta(\"overview/TOTAL_APP_COMMITS\", new MetricMeta(false, STATEMENTS_UNIT));\n addMetricMeta(\"overview/TOTAL_APP_ROLLBACKS\", new MetricMeta(false, STATEMENTS_UNIT));\n addMetricMeta(\"overview/ACT_COMPLETED_TOTAL\", new MetricMeta(false, ACTIVITIES_UNIT));\n addMetricMeta(\"overview/APP_RQSTS_COMPLETED_TOTAL\", new MetricMeta(false, REQUESTS_UNIT));\n addMetricMeta(\"overview/AVG_RQST_CPU_TIME\", new MetricMeta(false, TIME_UNIT));\n addMetricMeta(\"overview/ROUTINE_TIME_RQST_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/RQST_WAIT_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/ACT_WAIT_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/IO_WAIT_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/LOCK_WAIT_TIME_ PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/AGENT_WAIT_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/NETWORK_WAIT_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/SECTION_PROC_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/SECTION_SORT_PROC_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/COMPILE_PROC_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/TRANSACT_END_PROC_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/UTILS_PROC_TIME_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n addMetricMeta(\"overview/AVG_LOCK_WAITS_PER_ACT\", new MetricMeta(false, TIMES_UNIT));\n addMetricMeta(\"overview/AVG_LOCK_TIMEOUTS_PER_ACT\", new MetricMeta(false, TIMES_UNIT));\n addMetricMeta(\"overview/AVG_DEADLOCKS_PER_ACT\", new MetricMeta(false, DEFAULT_UNIT));\n addMetricMeta(\"overview/AVG_LOCK_ESCALS_PER_ACT\", new MetricMeta(false, TIMES_UNIT));\n addMetricMeta(\"overview/ROWS_READ_PER_ROWS_RETURNED\", new MetricMeta(false, DEFAULT_UNIT));\n addMetricMeta(\"overview/TOTAL_BP_HIT_RATIO_PERCENT\", new MetricMeta(false, PERCENTAGE_UNIT));\n \n //Define connection overview metrics meta data\n addMetricMeta(\"connection_overview/connections\", new MetricMeta(false, DEFAULT_UNIT));\n \n //Define current SQL overview metrics meta data\n addMetricMeta(\"sql_overview/SQL_statements\", new MetricMeta(false, DEFAULT_UNIT));\n \n }",
"public edu.ustb.sei.mde.morel.resource.morel.IMorelMetaInformation getMetaInformation();",
"public com.appscode.api.health.Metadata getMetadata() {\n return metadata_ == null ? com.appscode.api.health.Metadata.getDefaultInstance() : metadata_;\n }",
"Serializable getExtraMetaData();",
"public final MetadataInformation getMetadata() {\r\n\t\treturn metadata;\r\n\t}",
"Map<String, Object> getAllMetadata();",
"public String getIncidentDetails() {\n\t\treturn incidentDetails;\n\t}",
"public interface MetaDataValue\n extends MetaDataObject {\n\n /**\n * Get a String representation of this value.\n *\n * <p>\n * For simple types the value is returned as is e.g Boolean values are\n * represented by the strings \"true\" and \"false\"\n * </p>\n * <p>\n * For composite types an attempt is made to represent the value in as\n * sensible manner as is possible, no guarantee is made that it will be\n * possible to reconstruct the original value from the string\n * representation.\n * </p>\n * <p>\n * List types are returned space separated e.g \"item1 item2 item3\".\n * </p>\n * <p>\n * Structure types are returned as \"[fieldname1=value1] [fieldname2=value2]\"\n * where the values follow the rules above.\n * </p>\n *\n * @return an unmodifiable String value\n */\n public String getAsString();\n}",
"public abstract Map<String, String> getItemMetadata(String identifier);",
"Map<String, String> getInstanceMetadata();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the length of the Thumbnail. | public int getThumbnailLength() {
int retVal = 0;
Entry e = getTagValue(JPEGINTERCHANGEFORMATLENGTH, false);
if (e == null)
e = getTagValue(STRIPBYTECOUNTS, false);
if (e != null)
retVal = ((Integer) e.getValue(0)).intValue();
return retVal;
} | [
"public Integer getThumbnailWidth() {\n return this.thumbnailWidth;\n }",
"public int length() { return picture.length(); }",
"public int getThumbnailHeight ()\n {\n return ((SpinnerNumberModel) thumbnailHeight.getModel ()).getNumber ().intValue ();\n }",
"public long getArtworkSize();",
"public String getSize() {\n return fullPhoto.getSize();\n }",
"Metadata.Image.Size getSize();",
"public int getLargeur ()\n {\n return this.image.getWidth () ;\n }",
"public int width() \n {\n return this.picture.width();\n }",
"public int width() {\n return picture.width();\n }",
"public int height() \n {\n return this.picture.height();\n }",
"public int getThumbnailViewWidth() {\n if (mThumbnailViewManager != null) {\n return mThumbnailViewManager.getThumbnailViewWidth();\n } else {\n return 0;\n }\n }",
"public int width() {\n return picture.width();\n }",
"public int height() {\n return picture.height();\n }",
"public ImageSize getSize() {\n return size;\n }",
"public int width() {\n return picture().width();\n }",
"public int getWidth() {\n return fullPhoto.getWidth();\n }",
"public java.lang.Short getLength() {\n\t\treturn getValue(org.jooq.examples.mysql.sakila.tables.FilmList.FILM_LIST.LENGTH);\n\t}",
"public int height() {\n return picture.height();\n }",
"long getStorageLength();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of previousTrack method, of class MyStereo. | @Test
public void testPreviousTrack_StraightPlay(){
this.stereo.loadUSB();
assertEquals(this.stereo.currentTrackNumber(),1);
assertTrue("There should be 1000 or fewer tracks",this.stereo.totalTrackCount() <= 1000);
this.stereo.previousTrack();
assertEquals(this.stereo.currentTrackNumber(),this.stereo.totalTrackCount());
} | [
"@Override\r\n public void previousTrack() {\r\n if (isUSBLoaded && isPlaying) {\r\n if (enableStraightPlayMode) {\r\n this.current_track--;\r\n if (this.current_track < number_of_tracks) {\r\n this.current_track = number_of_tracks;\r\n }\r\n } else if (enableShufflePlayMode) {\r\n int bound = number_of_tracks;\r\n Random r = new Random();\r\n this.current_track = r.nextInt((bound) + 1);\r\n }\r\n\r\n }\r\n }",
"public void playPrevious() {\n if(mPosition > 0) {\n mPosition--;\n } else {\n mPosition = (--mPosition + mMyTracks.size()) % mMyTracks.size();\n }\n prepareTrack();\n }",
"private void previous() {\n if (position > 0) {\n Player.getInstance().stop();\n\n // Set a new position:w\n --position;\n\n ibSkipNextTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_next_track_on));\n\n try {\n Player.getInstance().play(tracks.get(position));\n } catch (IOException playerException) {\n playerException.printStackTrace();\n }\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_pause_track);\n setCover(Player.getInstance().getCover(tracks.get(position), this));\n\n tvTrack.setText(tracks.get(position).getName());\n tvTrackEndTime.setText(playerUtils.toMinutes(Player.getInstance().getTrackEndTime()));\n }\n\n if (position == 0) {\n setImageDrawable(ibSkipPreviousTrack, R.drawable.ic_skip_previous_track_off);\n }\n }",
"@SuppressWarnings(\"This method is unchecked and not running well.\")\n public void previous()\n {\n try\n {\n if (snapshot == null || snapshot.equals(currentPlaying))\n {\n playPrev();\n } else\n {\n play(snapshot);\n }\n\n } catch (Exception e)\n {\n// Warning warning = new Warning(e.toString());\n Warning.createWarningDialog(e);\n }\n }",
"@Test\r\n public void testCurrentTrackNumber(){\r\n assertEquals(this.stereo.currentTrackNumber(),0);\r\n\r\n this.stereo.loadUSB();\r\n\r\n assertEquals(this.stereo.currentTrackNumber(),1);\r\n }",
"@Test\n public void testPrevious() {\n System.out.println(\"previous\");\n EsoLangParser instance = null;\n EsoLangParser.PreviousContext expResult = null;\n EsoLangParser.PreviousContext result = instance.previous();\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 }",
"public boolean previousStep(int previousStep);",
"boolean previousStep();",
"public void testPrevNineSongs() {\n collection.nextNineSongs();\n assertTrue(collection.prevNineSongs());\n assertFalse(collection.prevNineSongs());\n }",
"@Test\r\n public void testNextTrack_StraightPlay(){\r\n this.stereo.loadUSB();\r\n\r\n assertEquals(this.stereo.currentTrackNumber(),1);\r\n assertTrue(\"There should be 1000 or fewer tracks\",this.stereo.totalTrackCount() <= 1000);\r\n\r\n // force the player to advance to the last track.\r\n for(int i = 1; i < this.stereo.totalTrackCount(); i++){\r\n this.stereo.nextTrack();\r\n }\r\n\r\n assertEquals(this.stereo.currentTrackNumber(),this.stereo.totalTrackCount());\r\n\r\n // advance past the last track\r\n this.stereo.nextTrack();\r\n\r\n assertEquals(this.stereo.currentTrackNumber(),1);\r\n }",
"public int getOldTrack() {\n return oldTrack;\n }",
"@Test\n public void testPrevious() throws Exception {\n setUpConnectedState(true, true);\n MediaController.TransportControls transportControls =\n BluetoothMediaBrowserService.getTransportControls();\n\n //Previous\n transportControls.skipToPrevious();\n verify(mAvrcpControllerService,\n timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)).sendPassThroughCommandNative(\n eq(mTestAddress), eq(AvrcpControllerService.PASS_THRU_CMD_ID_BACKWARD),\n eq(KEY_DOWN));\n verify(mAvrcpControllerService,\n timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)).sendPassThroughCommandNative(\n eq(mTestAddress), eq(AvrcpControllerService.PASS_THRU_CMD_ID_BACKWARD), eq(KEY_UP));\n }",
"private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }",
"public boolean hasPrevious();",
"public void prevFrame();",
"private int previousSong() {\n if (playListAdapter != null) {\n playListAdapter.clickPreviousNext(1);\n }\n serviceBound = false;\n player.stopMedia();\n if (currentSong > 0) {\n currentSong--;\n }\n return currentSong;\n }",
"public Chord getPreviousChordInVoice ()\r\n {\r\n return voice.getPreviousChord(this);\r\n }",
"public void playPreviousSong() {\r\n\t\tif (state != initialState) {\r\n\t\t\tcurrentTrackNumber--;\r\n\r\n\t\t\tif (currentTrackNumber < 0) {\r\n\t\t\t\tcurrentTrackNumber = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (player != null)\r\n\t\t\t\tplayer.stop();\r\n\r\n\t\t\tTrackBean newTrack = playlist.get(currentTrackNumber);\r\n\r\n\t\t\tplaySong(newTrack);\r\n\t\t}\r\n\t}",
"private void checkPreviousSquare(){\n\t\t\n\t\tif(!frontIsClear()){\n\t\t\tfaceBackwards();\n\t\t\tmove();\n\t\t\tif(!beepersPresent()){\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t\tputBeeper();\n\t\t\t} else {\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses given string representation of date. Allows for 2 formats, one for parsing user input in the format "d/M/yyyy" or "today". The second format is for parsing dates in the default LocalDate pattern from file. | static LocalDate parseDate(String date) throws DateTimeParseException {
if (date.equals("today")) {
return LocalDate.now();
} else if (date.equals("tomorrow")) {
return LocalDate.now().plus(1, ChronoUnit.DAYS);
} else {
try {
return LocalDate.parse(date, DateTimeFormatter.ofPattern("d/M/yyyy"));
} catch (DateTimeParseException e) {
return LocalDate.parse(date);
}
}
} | [
"static LocalDate dateCheck(){\n\t\tLocalDate formattedDate;\n\t\tformattedDate = null;\n\t\t\n\t\twhile (formattedDate==null) {\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Please enter a date(ie:2016/08/23)\");\n\t\t\tString userDate = input.nextLine();\n\t\t\tDateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(\"yyyy/MM/dd\");\n\t\t\ttry {\n\t\t\t\tformattedDate = LocalDate.parse(userDate, dateFormat);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Your date is invalid, try again.\");\n\t\t\t}\n\t\t}\n\t\treturn formattedDate;\t\t\n\t}",
"public static Date parseDateFromString(final String s)\n\t\t\tthrows ParseException {\n\n\t\tif (NullChecker.isEmpty(s)) {\n\t\t\treturn null;\n\t\t}\n\t\tDate date = null;\n\t\tSimpleDateFormat ofd = null;\n\t\ttry {\n\t\t\tofd = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss aa\");\n\t\t\tdate = ofd.parse(s);\n\t\t\treturn date;\n\t\t} catch (final ParseException ex) {\n\t\t}\n\t\tif (NullChecker.isEmpty(date)) {\n\t\t\ttry {\n\t\t\t\tofd = new SimpleDateFormat(\"MMM dd, yyyy\");\n\t\t\t\tdate = ofd.parse(s);\n\t\t\t\treturn date;\n\t\t\t} catch (final ParseException ex) {\n\t\t\t}\n\t\t}\n\t\tif (NullChecker.isEmpty(date)) {\n\t\t\ttry {\n\t\t\t\tofd = new SimpleDateFormat(\"MMM dd,yyyy\");\n\t\t\t\tdate = ofd.parse(s);\n\t\t\t\treturn date;\n\t\t\t} catch (final ParseException ex) {\n\t\t\t}\n\t\t}\n\t\tif (NullChecker.isEmpty(date)) {\n\t\t\ttry {\n\t\t\t\tofd = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\t\t\tdate = ofd.parse(s);\n\t\t\t\treturn date;\n\t\t\t} catch (final ParseException ex) {\n\t\t\t}\n\t\t}\n\t\tif (NullChecker.isEmpty(date)) {\n\t\t\ttry {\n\t\t\t\tofd = new SimpleDateFormat(\"MM/dd/yy\");\n\t\t\t\tdate = ofd.parse(s);\n\t\t\t\treturn date;\n\t\t\t} catch (final ParseException ex) {\n\t\t\t}\n\t\t}\n\t\tif (NullChecker.isEmpty(date)) {\n\t\t\ttry {\n\t\t\t\tofd = new SimpleDateFormat(\"MM/dd/yy\");\n\t\t\t\tdate = ofd.parse(s);\n\t\t\t\treturn date;\n\t\t\t} catch (final ParseException ex) {\n\t\t\t}\n\t\t}\n\t\tif (NullChecker.isEmpty(date)) {\n\t\t\tString tempS = s;\n\t\t\tif (tempS.length() > 8) {\n\t\t\t\ttempS = tempS.substring(0, 8);\n\t\t\t}\n\t\t\tofd = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\tdate = ofd.parse(tempS);\n\t\t}\n\t\treturn date;\n\t}",
"public static LocalDate parse(String dateStr) {\n String d = dateStr.substring(0, dateStr.indexOf('T'));\n LocalDate ld = null;\n try {\n ld = LocalDate.parse(d);\n } catch (Exception e) {\n System.err.println(\"Failed to parse datestring \" + dateStr + \" into a LocalDate!\");\n //e.printStackTrace();\n }\n // TODO: review what happens if format is invalid/LocalDate.parse fails - throw error, return null or both?\n return ld;\n }",
"@Override\n @VisibleForTesting\n protected Date parseDate(String date, String userPattern, String defaultPattern, Locale locale) {\n DateFormat format;\n String patternUsed = \"dd/MM/yyyy\";\n Locale localeUsed = locale;\n if (StringUtils.isNotEmpty(userPattern)) {\n patternUsed = userPattern;\n } else if (StringUtils.isNotEmpty(defaultPattern)) {\n patternUsed = defaultPattern;\n }\n if ( this.locale != null ) {\n localeUsed = this.locale;\n }\n\n format = new SimpleDateFormat(patternUsed, localeUsed);\n\n try {\n return format.parse(date);\n } catch (ParseException e) {\n if (getLogger() != null && getLogger().isWarnEnabled()) {\n getLogger().warn(\n \"skip ParseException: \" + e.getMessage() + \" during parsing date \" + date\n + \" with pattern \" + patternUsed + \" with Locale \"\n + localeUsed, e);\n }\n\n return null;\n }\n }",
"public static LocalDate readDate() throws DateTimeParseException {\r\n\t\tString einDatumStr = Console.readString();\r\n\t\tLocalDate einDatum = null; // (Jahr, Monat, Tag)\r\n\r\n\t\tif (\"\".equals(einDatumStr)) {\r\n\t\t\t// Keine Eingabe, daher null als Rueckgabe\r\n\t\t\treturn einDatum;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t// Format dd.MM.yyyy (tt.mm.jjjj) pruefen\r\n\t\t\teinDatum = LocalDate.parse(einDatumStr, DateTimeFormatter.ofPattern(\"dd.MM.yyyy\", Locale.GERMAN));\r\n\t\t} catch (DateTimeParseException ex1) {\r\n\t\t\ttry {\r\n\t\t\t\t// Format dd-MM-yyyy (tt-mm-jjjj) pruefen\r\n\t\t\t\teinDatum = LocalDate.parse(einDatumStr, DateTimeFormatter.ofPattern(\"dd-MM-yyyy\", Locale.GERMAN));\r\n\t\t\t} catch (DateTimeParseException ex2) {\r\n\t\t\t\t// Format dd/MM/yyyy (tt/mm/jjjj) pruefen\r\n\t\t\t\t// Ist dieses Format ebenfalls nicht vorhanden, dann wird\r\n\t\t\t\t// DateTimeParseException geworfen\r\n\t\t\t\teinDatum = LocalDate.parse(einDatumStr, DateTimeFormatter.ofPattern(\"dd/MM/yyyy\", Locale.GERMAN));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn einDatum;\r\n\t}",
"protected void guessDateFormat( String dateStr ) {\n if ( log.isDebug() ) {\n log.logDebug( BaseMessages.getString( PKG, \"MVSFileParser.DEBUG.Guess.Date\" ) );\n }\n String[] dateSplit = dateStr.split( \"/\" );\n String yrFmt = null;\n int yrPos = -1;\n int dayPos = -1;\n // quick look for either yyyy/xx/xx or xx/xx/yyyy\n for ( int i = 0; i < dateSplit.length; i++ ) {\n int aDigit = Integer.parseInt( dateSplit[i] );\n if ( dateSplit[i].length() == 4 ) {\n yrFmt = \"yyyy\";\n yrPos = i;\n } else if ( aDigit > 31 ) {\n // found 2-digit year\n yrFmt = \"yy\";\n yrPos = i;\n } else if ( aDigit > 12 ) {\n // definitely found a # <=31,\n dayPos = i;\n }\n }\n if ( yrFmt != null ) {\n StringBuilder fmt = new StringBuilder();\n if ( dayPos >= 0 ) {\n // OK, we know everything.\n String[] tmp = new String[3];\n tmp[yrPos] = yrFmt;\n tmp[dayPos] = \"dd\";\n for ( int i = 0; i < tmp.length; i++ ) {\n fmt.append( i > 0 ? \"/\" : \"\" );\n fmt.append( tmp[i] == null ? \"MM\" : tmp[i] );\n }\n if ( log.isDebug() ) {\n log.logDebug( BaseMessages.getString( PKG, \"MVSFileParser.DEBUG.Guess.Date.Obvious\" ) );\n }\n } else {\n // OK, we have something like 2010/01/01 - I can't\n // tell month from day. So, we'll guess. If it doesn't work on a later\n // date, we'll flip it (the alternate).\n\n StringBuilder altFmt = new StringBuilder();\n if ( yrPos == 0 ) {\n fmt.append( yrFmt ).append( \"/MM/dd\" );\n altFmt.append( yrFmt ).append( \"/dd/MM\" );\n } else {\n fmt.append( \"MM/dd/\" ).append( yrFmt );\n altFmt.append( \"dd/MM/\" ).append( yrFmt );\n }\n this.alternateFormatString = altFmt.toString();\n if ( log.isDebug() ) {\n log.logDebug( BaseMessages.getString( PKG, \"MVSFileParser.DEBUG.Guess.Date.Ambiguous\" ) );\n }\n }\n this.dateFormatString = fmt.toString();\n this.dateFormat = new SimpleDateFormat( dateFormatString );\n if ( log.isDebug() ) {\n log.logDebug( BaseMessages\n .getString( PKG, \"MVSFileParser.DEBUG.Guess.Date.Decided\", this.dateFormatString ) );\n }\n try {\n dateFormat.parse( dateStr );\n } catch ( ParseException ex ) {\n if ( log.isDebug() ) {\n log.logDebug( BaseMessages.getString( PKG, \"MVSFileParser.DEBUG.Guess.Date.Unparsable\", dateStr ) );\n }\n }\n } else {\n // looks ilke something like 01/02/05 - where's the year?\n if ( log.isDebug() ) {\n log.logDebug( BaseMessages.getString( PKG, \"MVSFileParser.DEBUG.Guess.Date.Year.Ambiguous\" ) );\n }\n return;\n }\n\n }",
"public LocalDate convertStringToLocalDate(String birthDateAsString) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d/MM/yyyy\");\n return LocalDate.parse(birthDateAsString, formatter);\n }",
"protected void guessDateFormat(String dateStr) {\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date\"));} //$NON-NLS-1$\n String[] dateSplit = dateStr.split(\"/\"); //$NON-NLS-1$\n String yrFmt = null;\n int yrPos = -1;\n int dayPos = -1;\n // quick look for either yyyy/xx/xx or xx/xx/yyyy\n for (int i=0; i<dateSplit.length; i++) {\n int aDigit = Integer.parseInt(dateSplit[i]); \n if (dateSplit[i].length() == 4) {\n yrFmt = \"yyyy\"; //$NON-NLS-1$\n yrPos = i;\n } else if (aDigit>31) {\n // found 2-digit year\n yrFmt = \"yy\"; //$NON-NLS-1$\n yrPos = i;\n } else if (aDigit > 12) {\n // definitely found a # <=31,\n dayPos = i;\n }\n }\n if (yrFmt != null) {\n StringBuffer fmt = new StringBuffer();\n if (dayPos >=0) {\n // OK, we know everything.\n String[] tmp = new String[3];\n tmp[yrPos] = yrFmt;\n tmp[dayPos] = \"dd\"; //$NON-NLS-1$\n for (int i=0; i<tmp.length; i++) {\n fmt.append(i>0?\"/\":\"\"); //$NON-NLS-1$ //$NON-NLS-2$\n fmt.append(tmp[i] == null ? \"MM\":tmp[i]); //$NON-NLS-1$\n }\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Obvious\"));} //$NON-NLS-1$\n } else {\n // OK, we have something like 2010/01/01 - I can't\n // tell month from day. So, we'll guess. If it doesn't work on a later\n // date, we'll flip it (the alternate).\n \n StringBuffer altFmt = new StringBuffer();\n if (yrPos == 0) {\n fmt.append(yrFmt).append(\"/MM/dd\"); //$NON-NLS-1$\n altFmt.append(yrFmt).append(\"/dd/MM\"); //$NON-NLS-1$\n } else {\n fmt.append(\"MM/dd/\").append(yrFmt); //$NON-NLS-1$\n altFmt.append(\"dd/MM/\").append(yrFmt); //$NON-NLS-1$\n }\n this.alternateFormatString = altFmt.toString();\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Ambiguous\"));} //$NON-NLS-1$\n }\n this.dateFormatString = fmt.toString();\n this.dateFormat = new SimpleDateFormat(dateFormatString);\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Decided\", this.dateFormatString));} //$NON-NLS-1$\n try {\n dateFormat.parse(dateStr);\n } catch (ParseException ex) {\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Unparsable\", dateStr));} //$NON-NLS-1$\n }\n } else {\n // looks ilke something like 01/02/05 - where's the year?\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Year.Ambiguous\"));} //$NON-NLS-1$\n return;\n }\n \n }",
"public interface TimeParser {\n /**\n * Parses given string representation of date.\n * Allows for 2 formats, one for parsing user input in the format \"d/M/yyyy\" or \"today\".\n * The second format is for parsing dates in the default LocalDate pattern from file.\n *\n * @param date String representation of date\n * @return LocalDate object representing the given date\n * @throws DateTimeParseException if no valid date format is given\n */\n static LocalDate parseDate(String date) throws DateTimeParseException {\n if (date.equals(\"today\")) {\n return LocalDate.now();\n } else if (date.equals(\"tomorrow\")) {\n return LocalDate.now().plus(1, ChronoUnit.DAYS);\n } else {\n try {\n return LocalDate.parse(date, DateTimeFormatter.ofPattern(\"d/M/yyyy\"));\n } catch (DateTimeParseException e) {\n return LocalDate.parse(date);\n }\n }\n }\n\n /**\n * Prints the date in the format \"d MMM yyyy\".\n * Called in the Deadline and Event classes when displaying to the user.\n *\n * @param date the LocalDate object to be printed\n * @return String representation \"d MMM yyyy\"\n */\n static String printDate(LocalDate date) {\n return date.format(DateTimeFormatter.ofPattern(\"d MMM yyyy\"));\n }\n}",
"private SimpleDate parseDate(String date)\n {\n SimpleDate result = parseDate_mmddyyyy(date,'/');\n if (result == null) {\n result = parseDate_mmddyyyy(date,'-');\n }\n return result;\n }",
"private static DateTime parseDate(String date) {\n DateTime parsedDate = null;\n for (DateTimeFormatter dtf : dateInputFormats) {\n try {\n parsedDate = dtf.withZoneUTC().parseDateTime(date);\n break; // throws exception if parse fails\n } catch (IllegalArgumentException ex) {\n // try again\n }\n }\n return parsedDate;\n }",
"public static LocalDate parseDate(String text) {\n if (StringUtils.isBlank(text)) {\n return null;\n }\n\n String[] parts = text.split(\" \");\n String dateText = parts[0];\n\n\n LocalDate date = null;\n\n if (\"today\".equals(dateText.trim())) {\n date = LocalDate.now();\n } else {\n date = LocalDate.parse(dateText);\n }\n\n\n if (parts.length == 1) {\n return date;\n } else {\n String sign = parts[1];\n String incrementNumber = parts[2];\n String incrementUnit = parts[3];\n\n TemporalUnit unitValue = null;\n Integer incrementNumberValue = Integer.valueOf(incrementNumber);\n switch (incrementUnit) {\n case (\"days\"):\n case (\"day\"): {\n unitValue = ChronoUnit.DAYS;\n break;\n }\n case (\"months\"):\n case (\"month\"): {\n unitValue = ChronoUnit.MONTHS;\n break;\n }\n case (\"weeks\"):\n case (\"week\"): {\n unitValue = ChronoUnit.WEEKS;\n break;\n }\n }\n\n if (\"+\".equals(sign.trim())) {\n date = date.plus(incrementNumberValue, unitValue);\n } else if (\"-\".equals(sign.trim())) {\n date = date.minus(incrementNumberValue, unitValue);\n } else throw new DateTimeException(\"Unknown sign for manipulating dates\");\n }\n\n\n return date;\n }",
"private static LocalDate readDateFromArguments(String dayString, String monthString, String yearString) {\n\t\tint day = 0, month = 0, year = 0 ;\n\t\ttry{\n\t\t\tday = Integer.parseInt(dayString);\n\t\t\tmonth = Integer.parseInt(monthString);\n\t\t\tyear = Integer.parseInt(yearString);\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"The dates should be in the format DD MM YY in integer numbers\");\n\t\t\texitArgumentError(); \n\t\t}\n\t\t\t\n\t\treturn LocalDate.of(year,month,day);\n\n\t}",
"private static LocalDate convertirFecha(String fecha)\n\t{\n\t\treturn LocalDate.parse(fecha, DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"));\n\t}",
"@Override\r\n public LocalDate unmarshal(String s) {\r\n return LocalDate.parse(s, dateTimeFormatter);\r\n }",
"private static Date parseDate(String dateValue, Collection<String> dateFormats,\n\t Date startDate) throws IllegalArgumentException {\n\n\tif (dateValue == null) {\n\t throw new IllegalArgumentException(\"dateValue is null\");\n\t}\n\tif (dateFormats == null) {\n\t dateFormats = DEFAULT_PATTERNS;\n\t}\n\tif (startDate == null) {\n\t startDate = DEFAULT_TWO_DIGIT_YEAR_START;\n\t}\n\t// trim single quotes around date if present\n\t// see issue #5279\n\tif (dateValue.length() > 1\n\t\t&& dateValue.startsWith(\"'\")\n\t\t&& dateValue.endsWith(\"'\")) {\n\t dateValue = dateValue.substring(1, dateValue.length() - 1);\n\t}\n\n\tSimpleDateFormat dateParser = null;\n\tIterator<String> formatIter = dateFormats.iterator();\n\n\twhile (formatIter.hasNext()) {\n\t String format = formatIter.next();\n\t if (dateParser == null) {\n\t\tdateParser = new SimpleDateFormat(format, Locale.US);\n\t\tdateParser.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tdateParser.set2DigitYearStart(startDate);\n\t } else {\n\t\tdateParser.applyPattern(format);\n\t }\n\t try {\n\t\treturn dateParser.parse(dateValue);\n\t } catch (ParseException pe) {\n\t\t// ignore this exception, we will try the next format\n\t }\n\t}\n\n\t// we were unable to parse the date\n\tthrow new IllegalArgumentException(\"Unable to parse the date \" + dateValue);\n }",
"Date parseDate(String str)\n {\n String months[] = {\"jan\",\"feb\",\"mar\",\"apr\",\"may\",\n \"jun\",\"jul\",\"aug\",\"sep\",\"oct\",\"nov\",\"dec\"};\n Date rtn;\n try {\n rtn = new Date();\n // month\n String mth = str.substring(0,str.indexOf(' '));\n for ( int i=0;i<months.length;i++ ) {\n if ( mth.toLowerCase().startsWith(months[i]) ) {\n rtn.setMonth(i);\n break;\n }\n }\n\n // day\n\n str = str.substring(str.indexOf(' ')+1);\n String day = str.substring(0,str.indexOf(','));\n rtn.setDate(Integer.parseInt(day));\n\n // Year\n\n str = str.substring(str.indexOf(',')+1).trim();\n String year = str.substring(0,str.indexOf(' '));\n rtn.setYear(Integer.parseInt(year)-1900);\n\n // Hour\n\n str = str.substring(str.indexOf(' ')+1).trim();\n String hour = str.substring(0,str.indexOf(':'));\n rtn.setHours(Integer.parseInt(hour));\n\n // Minute\n\n str = str.substring(str.indexOf(':')+1).trim();\n String minutes = str.substring(0,str.indexOf(' '));\n rtn.setMinutes(Integer.parseInt(minutes));\n rtn.setSeconds(0);\n\n // AM or PM\n str = str.substring(str.indexOf(' ')+1).trim();\n if ( str.toUpperCase().charAt(0)=='P' )\n rtn.setHours(rtn.getHours()+12);\n\n return rtn;\n } catch ( Exception e ) {\n return null;\n }\n }",
"public static String parseDate(String input) {\n String year = input.substring(0, 4);\n String month = input.substring(5, 7);\n String day = input.substring(8, 10);\n return year + \"-\" + month + \"-\" + day;\n }",
"private static LocalDate readDate() throws Exception {\n\t\treturn LocalDate.parse(In.readLine(), dateFormatter);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use RetrieveFileResponse.newBuilder() to construct. | private RetrieveFileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponseOrBuilder getRetrieveFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponseOrBuilder getRetriveFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponse getRetrieveFileResponse();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponse getRetriveFileResponse();",
"private RetrieveFileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileRequestOrBuilder getRetrieveFileRequestOrBuilder();",
"public Builder setRetrieveFile(edu.usfca.cs.dfs.StorageMessages.RetrieveFile value) {\n if (retrieveFileBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n retrieveFileBuilder_.setMessage(value);\n }\n msgCase_ = 2;\n return this;\n }",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileOrBuilder getRetrieveFileOrBuilder();",
"private RetrieveFile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileOrBuilder getRetrieveFileMsgOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.ListFileResponseOrBuilder getListFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileRequest getRetrieveFileRequest();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFile getRetrieveFile();",
"private ListFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"edu.usfca.cs.dfs.StorageMessages.ListFileResponse getListFileResponse();",
"private CreateFileResponse() {\n initFields();\n }",
"private OpenFileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFile getRetrieveFileMsg();",
"public DeleteFileResponse() {\r\n super(FunctionID.DELETE_FILE.toString());\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional double hfov = 9; &47; &92;brief Horizontal field of view in radians. | public Builder setHfov(double value) {
bitField0_ |= 0x00000100;
hfov_ = value;
onChanged();
return this;
} | [
"double getHfov();",
"public double getHfov() {\n return hfov_;\n }",
"public double getHfov() {\n return hfov_;\n }",
"public double getHorizontalFieldOfView ( ) {\r\n\t\tdouble fov = Double.valueOf(text_fov_width.getText()).doubleValue();\r\n\t\tif (((String)combo_unit.getSelectedItem()).equals(\"arcmin\"))\r\n\t\t\tfov /= 60.0;\r\n\t\tif (((String)combo_unit.getSelectedItem()).equals(\"arcsec\"))\r\n\t\t\tfov /= 3600.0;\r\n\t\treturn fov;\r\n\t}",
"boolean getScaleToHfov();",
"public void setFieldOfView ( double fov_width, double fov_height ) {\r\n\t\ttext_fov_width.setText(Format.formatDouble(fov_width, 6, 3).trim());\r\n\t\ttext_fov_height.setText(Format.formatDouble(fov_height, 6, 3).trim());\r\n\t\tcombo_unit.setSelectedIndex(0);\r\n\t}",
"boolean hasScaleToHfov();",
"public void setFrustumPerspective( float fovY, float aspect, float near, float far );",
"public boolean getScaleToHfov() {\n return scaleToHfov_;\n }",
"public float getFrustumNear();",
"public void setFrustumNear( float frustumNear );",
"public void setFrustum( float near, float far, float left, float right,\n float top, float bottom );",
"private double calculateHeight() {\r\n\t\t// FOV = tan(h)\r\n\t\tdouble height = Math.atan(Math.toRadians(fov));\r\n\t\treturn height;\r\n\t}",
"float getCameraCentreY();",
"public void setFrustumBottom( float frustumBottom );",
"public abstract Frustum getViewFrustum();",
"public Builder setScaleToHfov(boolean value) {\n bitField0_ |= 0x00000040;\n scaleToHfov_ = value;\n onChanged();\n return this;\n }",
"private double calculateFieldOfView(double focalDistanceInFeet, double angleOfViewInDegrees){\n double fieldOfViewInFeet;\n double angleOfViewInRadians = angleOfViewInDegrees / RADIANS_TO_DEGREES_SCALAR;\n\n fieldOfViewInFeet = ((2.0 * focalDistanceInFeet) *\n (Math.tan(angleOfViewInRadians / 2.0)));\n\n return fieldOfViewInFeet;\n }",
"public void setFrustumTop( float frustumTop );"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method sets computerTry drawn by computer. | public void setComputerTry(ArrayList<Integer> computerTry) {
this.computerTry = computerTry;
} | [
"private void setComputerChoice() {\n\t\tcomputerChoice = POSSIBLE_CHOICE[randomNumber];\n\t}",
"public void rpsLogic(int player, int computer)\n {\n outcome.setForeground(Color.black);\n if(player==computer) {\n outcome.setText(\"Tie\");\n //tie\n }\n else\n {\n if(player==0 && computer==2 || player==1 && computer==0\n ||player==2 && computer==1)\n {\n /*possible wins:\n * 1. rock vs scissors\n * 2. paper vs rock\n * 3. scissors vs paper*/\n win++;\n score.setText(win + \"/\" + loss);\n outcome.setText(\"You Win!\");\n if(win == 2)\n {\n outcome.setForeground(Color.blue);\n outcome.setText(\"2/3 Win. Congratz you won!\");\n score.setText(2 + \"/\" + loss);\n //reset game\n win = 0;\n loss = 0;\n\n }\n else\n {\n //do nothing, game continues\n\n }\n }\n else if(player==0 && computer==1 || player==1 && computer==2\n || player==2 && computer==0\n )\n {\n /*possible loss:\n * 1. rock vs paper\n * 2. paper vs scissors\n * 3. scissors vs rock*/\n loss++;\n outcome.setText(\"You lost\");\n score.setText(win + \"/\" + loss);\n if(loss == 2)\n {\n outcome.setForeground(Color.red);\n outcome.setText(\"2/3 Losses. Better luck next time!\");\n score.setText(win + \"/\" + 2);\n win = 0;\n loss = 0;\n\n }\n else\n {\n //do nothing, game continues\n }\n }\n\n }\n }",
"public void XScissor(Pokemon opponent, boolean isComputer)\r\n {\r\n window.addToTextBox(\"Scyther used X-Scissor!\");\r\n damage = 80;\r\n accuracy = 100;\r\n abilityType = \"Bug\";\r\n useAbility(opponent, damage, accuracy, abilityType, isComputer);\r\n }",
"public int checkingColors(ArrayList<Integer> computerTry) {\n this.computerTry = computerTry;\n colorCounter = 0;\n for (int i = 0; i < 4; i++) {\n\n if (gameCode.contains(computerTry.get(i))) {\n colorCounter++;\n }\n }\n\n return colorCounter;\n }",
"public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }",
"public void computerPlay() {\n System.out.print(\"Computer places O at \");\n \n int numRows = board.getNumRows();\n int numCols = board.getNumCols();\n \n for (int row = 0; row < numRows ; row++){\n \tfor (int col = 0; col <numCols ; col++)\n \tif (board.isAvailable(row, col)) {\n \t\tboard.mark(row, col, COMPUTER_ID);\n \t\tif(board.win(row, col)) {\n \t\t\tcurrRow = row;\n \t\t\tcurrCol = col;\n \t\t\t\n \t\t\tSystem.out.println(row + \" \" + col);\n \t\t\t\n \t\t\treturn;\n \t\t}\n \t\telse\n \t\t\tboard.mark(row, col, ' ');\n \t}\n }\n \n //If we take an empty cell leads to win,\n //then we take that empty cell.\n\n for (int row = 0; row < numRows ; row++){\n \tfor (int col = 0; col <numCols ; col++)\n \tif (board.isAvailable(row, col)) {\n \t\tboard.mark(row, col, HUMAN_ID);\n \t\tif(board.win(row, col)) {\n \t\t\tcurrRow = row;\n \t\t\tcurrCol = col;\n \t\t\t\n \t\t\tSystem.out.println(row + \" \" + col);\n \t\t\tboard.mark(row, col, COMPUTER_ID);\n \t\t\treturn;\n \t\t}\n \t\telse\n \t\t\tboard.mark(row, col, ' ');\n \t}\n } \n \n for (int row = 0; row < numRows; row++){\n \tfor (int col= 0; col < numCols; col++)\n \t\tif (board.isAvailable(row, col)) {\n \t\t\tboard.mark(row, col, COMPUTER_ID);\n \t\t\tSystem.out.println(row + \" \" + col);\n currRow = row;\n currCol = col;\n return; //once we find the first available item, return.\n \t\t}\n }\n\n \n }",
"private void computerTurn()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\tint row = r.nextInt(GRID_SIZE);\n\t\t\tint column = r.nextInt(GRID_SIZE);\n\t\t\tSystem.out.println(\"Computer shoot the rocket to \" + (char) (row + 'A') + \"\" + (column +1));\n\t\t\tShooting b = shoot(board[row][column]);\n\t\t\tshootResult (b,board[row][column]);\n\t\t\tprintingWholeBoard();\n\t\t\thumanTurnTrue = true;\n\t\t\tbreak;\n\t\t}\t\t\n\t}",
"static void playHumanVsComputerHard() {\n board = new Board();\n boardGUI = new BoardGUI(board);\n computerPlayer = new AI(COMPUTER_HARD, board, boardGUI);\n opponent = COMPUTER_HARD;\n currentPlayer = RED;\n additionalAttack = false;\n selected = false;\n selectedPiece = null;\n\n displayText(\"Your move.\");\n boardGUI.getWindow().show();\n }",
"private void computerPlayerTurn(String computerPlayer){\r\n\t\tview.computerTurn(computerPlayer);\r\n\t\t//TESTING:\r\n\t\tview.displayHand(model.getCurHandRepresentation(), computerPlayer);\r\n\t\t\r\n\t\t//must pick from stock, cannot pick from discard\r\n\t\tString pickedCard = model.pickCardFromStock();\r\n\t\t\r\n\t\t//cannot end round yet. keep playing until user wants to knock\r\n\t\t//choose a card to discard\r\n\t\tif(pickedCard!=null){\r\n\t\t\t//TESTING:\r\n\t\t\tview.displayChosenCard(computerPlayer, pickedCard);\r\n\r\n\t\t\tString card = model.computerMapToDiscard();\r\n\t\t\tview.computerDiscard(card, computerPlayer);\t\r\n\t\t}\r\n\t\t\r\n\t\t//TESTING:\r\n\t\t//view.displayHand(model.getCurHandRepresentation(), computerPlayer);\r\n\t}",
"void setComputer(Computer computer);",
"private void computerTurn() {\r\n\t\tPoint index = randomIndex();\r\n\t\tSETslot((int)index.getX(), (int)index.getY(), randomValue());\r\n\t}",
"public void brakeFailureStatus() {\n \tthis.brakeFailureActive = this.trainModelGUI.brakeFailStatus();\n }",
"public void setDrawDecision(){\n\t\t\n\t\tdouble percentOfMax = cardValue/21.0; // How close the value is to 21\n\t\t\n\t\t// While the \n\t\tif(cardValue < 21){\n\t\t\t// The higher the user gets to 21, the lesser chance there is of him/her drawing another card\n\t\t\tdrawAgain = (Math.random()) > percentOfMax? true: false;\n\t\t}\n\t\telse{\n\t\t\tisBusted = true; // The player is now busted in the current round\n\t\t\tdrawAgain = false;\n\t\t}\n\t}",
"public static void RockPaper(){\n\n\t\t// Store user choice as generated option\n\t\tint userNum = getRandomNum();\n\t\t\n\t\t// Store computer choice as generated option\n\t\tint compNum = getRandomNum();\n\t\t\n\t\t// Determine which option was selected for user\n\t\tString userOption = whichRPS(userNum);\n\t\t\n\t\t// Determine which option was selected for computer\n\t\tString compOption = whichRPS(compNum);\n\t\t\n\t // Display user choice and computer choice\n\t System.out.println(\"You played \"+ userOption+\", and the computer played \"+ compOption);\n\t \n\t // Determine results of game\n\t \n\t // If user and computer choices are the same \n\t if (userNum == compNum) {\n\t\t System.out.println(\"It was a tie.\");\n\t } \n\t \n\t // Rock1 > Scissors3\n\t if (compNum==1 && userNum==3) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Scissors3 > Paper2\n\t if (compNum==3 && userNum==2) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Paper2 > Rock1\n\t if (compNum==2 && userNum==1) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Or else the user won\n\t else{\n\t System.out.println(\"You won.\");\n\t }\n\t return;\n\t}",
"@Override\n public void setGameOver() {\n gameOver = true;\n moveCurrentPieceDownward.cancel();\n //obfuscated\n //obfuscated\n settingsDialog.toFront();\n }",
"private void feedback_output(){\r\n\t\tif(up){controller_computer.gui_computer.PressedBorderUp();}\r\n\t\tif(down){controller_computer.gui_computer.PressedBorderDown();}\r\n\t\tif(right){controller_computer.gui_computer.PressedBorderRight();}\r\n\t\tif(left){controller_computer.gui_computer.PressedBorderLeft();}\r\n\t}",
"public void setComputerPlayer(ComputerPlayer computer) {\r\n\t\tai = computer;\r\n\t\tsuper.setComputerPlayer();\r\n\t\tsetPlayerName(ai.getName() + \"_\" + getPlayerNum());\r\n\t}",
"public void setComputerLevel(Integer computerLevel) {\n this.computerLevel = computerLevel;\n }",
"private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'respp' field. | public java.lang.CharSequence getRespp() {
return respp;
} | [
"public java.lang.CharSequence getRespp() {\n return respp;\n }",
"public com.example.DNSLog.Builder setRespp(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.respp = value;\n fieldSetFlags()[4] = true;\n return this;\n }",
"public void setRespp(java.lang.CharSequence value) {\n this.respp = value;\n }",
"public boolean hasRespp() {\n return fieldSetFlags()[4];\n }",
"public String getRespCode() {\n return respCode;\n }",
"public String getRespcode() {\n\t\treturn respcode;\n\t}",
"public String getJobResp() {\n return (String)getAttributeInternal(JOBRESP);\n }",
"public String getCorrentResponseValue() {\n return correntResponseValue;\n }",
"public java.lang.CharSequence getResph() {\n return resph;\n }",
"public java.lang.CharSequence getResph() {\n return resph;\n }",
"public String getResponseText() {\n\t\treturn (String) get_Value(\"ResponseText\");\n\t}",
"public KafkaResponseParam getResponse() {\n if (responseBuilder_ == null) {\n return response_;\n } else {\n return responseBuilder_.getMessage();\n }\n }",
"public PacketResponse getResponse() {\n \t\tPacketResponse pr = new PacketResponse(payload);\n \t\treturn pr;\n \t}",
"public java.lang.String getPswAnswer() {\n java.lang.Object ref = pswAnswer_;\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 if (bs.isValidUtf8()) {\n pswAnswer_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"net.iGap.proto.ProtoResponse.Response getResponse();",
"public String getPolicyResponseMessage();",
"public KafkaResponseParam getResponse() {\n return response_;\n }",
"public String getResponse() {\n return response;\n }",
"public java.lang.Integer getRespiration () {\n\t\treturn respiration;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field317' field. | public void setField317(java.lang.CharSequence value) {
this.field317 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField317(java.lang.CharSequence value) {\n validate(fields()[317], value);\n this.field317 = value;\n fieldSetFlags()[317] = true;\n return this; \n }",
"public void setField319(java.lang.CharSequence value) {\n this.field319 = value;\n }",
"public void setField316(java.lang.CharSequence value) {\n this.field316 = value;\n }",
"public void setField318(java.lang.CharSequence value) {\n this.field318 = value;\n }",
"public void setField315(java.lang.CharSequence value) {\n this.field315 = value;\n }",
"public void setField309(java.lang.CharSequence value) {\n this.field309 = value;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField319(java.lang.CharSequence value) {\n validate(fields()[319], value);\n this.field319 = value;\n fieldSetFlags()[319] = true;\n return this; \n }",
"public void setField349(java.lang.CharSequence value) {\n this.field349 = value;\n }",
"public void setField313(java.lang.CharSequence value) {\n this.field313 = value;\n }",
"public void setField336(java.lang.CharSequence value) {\n this.field336 = value;\n }",
"public void setField327(java.lang.CharSequence value) {\n this.field327 = value;\n }",
"public void setField307(java.lang.CharSequence value) {\n this.field307 = value;\n }",
"public void setField296(java.lang.CharSequence value) {\n this.field296 = value;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField309(java.lang.CharSequence value) {\n validate(fields()[309], value);\n this.field309 = value;\n fieldSetFlags()[309] = true;\n return this; \n }",
"public void setField832(java.lang.CharSequence value) {\n this.field832 = value;\n }",
"public void setField217(java.lang.CharSequence value) {\n this.field217 = value;\n }",
"public void setField278(java.lang.CharSequence value) {\n this.field278 = value;\n }",
"public void setField297(java.lang.CharSequence value) {\n this.field297 = value;\n }",
"public void setField332(java.lang.CharSequence value) {\n this.field332 = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
drawImageFill draws the specified image into the specified graphics in the container | public static boolean drawImageFill(Image displayImage, Graphics g, Container container)
{
//calculate position and size to draw image with proper aspect ratio
int[] drawCoords = getLetterBoxCoords(displayImage, container);
//draw image
return g.drawImage(displayImage, drawCoords[0], drawCoords[1], drawCoords[2], drawCoords[3], SliderColor.clear, container);
} | [
"public boolean drawFill(Graphics g, Container container)\n {\n \treturn drawImageFill(imageRaw, g, container);\n }",
"public void fillImageWithColor(Color color);",
"public static boolean drawImageFillImage(Image displayImage, BufferedImage canvasImage)\n {\t \n\t return drawImageFillImage(displayImage, canvasImage, null);\n }",
"GraphicFill( Graphic graphic ) {\n setGraphic( graphic );\n }",
"public static boolean drawImageFillImage(Image displayImage, BufferedImage canvasImage, Color backColor)\n {\t \n\t //calculate position and size to draw image with proper aspect ratio\n\t int[] drawCoords = getLetterBoxCoords(displayImage.getWidth(null), displayImage.getHeight(null), canvasImage.getWidth(), canvasImage.getHeight());\n\t \n\t Graphics2D canvasGraphics = canvasImage.createGraphics();\n\t \n\t //fill in the image\n\t if (backColor != null)\n\t {\n\t\t canvasGraphics.setPaint(backColor);\n\t\t canvasGraphics.fillRect(0, 0, canvasImage.getWidth(), canvasImage.getHeight());\n\t }\n\t \n\t //draw image\n\t return canvasGraphics.drawImage(displayImage, drawCoords[0], drawCoords[1], drawCoords[2], drawCoords[3], SliderColor.clear, null);\n }",
"public abstract void drawFill();",
"public void drawImage(Image image, int x, int y, RecolorStyle style) {\n\t\tnativeDrawImage(image, x, y, (style != null ? style : RecolorStyle.NO).value);\n\t}",
"@Override\n public void fill() {\n graphicsEnvironmentImpl.fill(canvas);\n }",
"private void drawImage(){\n Integer resourceId = imageId.get(this.name);\n if (resourceId != null) {\n drawAbstract(resourceId);\n } else {\n drawNone();\n }\n }",
"void drawImage(Rectangle2D rect, Image image);",
"@Test\n\tpublic void testDrawImage() {\n\t\tfinal FImage im1 = new FImage(100, 100);\n\t\tfinal FImage im2 = new FImage(11, 11);\n\n\t\tfor (int y = -20; y < 120; y++) {\n\t\t\tfor (int x = -20; x < 120; x++) {\n\t\t\t\tim1.drawImage(im2, x, y);\n\t\t\t}\n\t\t}\n\t}",
"private void resetFill(Graphics2D graphic) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"reseting the graphics\");\n }\n \n graphic.setComposite(DEFAULT_COMPOSITE);\n }",
"public void drawImage(ImageResource imageResource, float destinationX, float destinationY);",
"public void draw(Graphics graphics, Color color);",
"protected abstract void inpaint(int x, int y, IMAGE image);",
"public void drawImage(float x, float y, float width, float height,\n\t\t\tColor color);",
"public boolean drawImage(Image img, int x, int y, int width, int height,\r\n\t\t\tColor bgcolor, ImageObserver observer)\r\n\t{\r\n\t\t// System.out.println(\"drawImage\");\r\n\t\treturn false;\r\n\t}",
"public void drawMasterCoderImage(){\n\n this.masterCoderImage.draw();\n\n }",
"public void drawImage(ImageResource imageResource, float destinationX, float destinationY, float destinationWidth, float destinationHeight,\n float sourceX, float sourceY, float sourceWidth, float sourceHeight);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field1030' field. doc for field1030 | public java.lang.CharSequence getField1030() {
return field1030;
} | [
"public java.lang.CharSequence getField1030() {\n return field1030;\n }",
"public java.lang.CharSequence getField30() {\n return field30;\n }",
"public java.lang.CharSequence getField30() {\n return field30;\n }",
"java.lang.String getField1030();",
"java.lang.String getField1530();",
"public java.lang.CharSequence getField1033() {\n return field1033;\n }",
"java.lang.String getField1060();",
"java.lang.String getField1230();",
"public java.lang.CharSequence getField1033() {\n return field1033;\n }",
"public void setField1030(java.lang.CharSequence value) {\n this.field1030 = value;\n }",
"java.lang.String getField1630();",
"public java.lang.CharSequence getField10() {\n return field10;\n }",
"public java.lang.CharSequence getField1029() {\n return field1029;\n }",
"public java.lang.CharSequence getField10() {\n return field10;\n }",
"java.lang.String getField1830();",
"java.lang.String getField1730();",
"public java.lang.CharSequence getField1034() {\n return field1034;\n }",
"public java.lang.CharSequence getField1029() {\n return field1029;\n }",
"java.lang.String getField1930();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the prefernces service. | public void setPreferncesService(IPreferencesService preferncesService) {
this.preferncesService = preferncesService;
} | [
"private void setService(Service service) {\n this.service = service;\n }",
"public void setService(Service service)\n {\n this.service = service;\n }",
"void setService(java.lang.String service);",
"public IPreferencesService getPreferncesService() {\n\n return preferncesService;\n }",
"public void setPersonService(PersonService service)\n {\n fPersonService = service;\n }",
"void setServiceName(String serviceName);",
"public abstract void setServiceType(String serviceType);",
"void setClassOfService(ClassOfService serviceClass);",
"public void setService(CentralSystemServiceFactory service) {\n\t\tthis.service = service;\n\t}",
"public void setServiceLevelDependency() {\n m_isServiceLevelRequirement = true;\n setBundleContext(new PolicyServiceContext(m_handler.getInstanceManager()\n .getGlobalContext(), m_handler.getInstanceManager()\n .getLocalServiceContext(), PolicyServiceContext.LOCAL));\n }",
"public abstract void setServiceName(String serviceName);",
"public void setServices( Service[] services )\n {\n this.services = services;\n }",
"protected void setComposerService(ComposerService composer) {\n this.composerService = composer;\n }",
"public void setServices(ArrayList<Service> services){\n\t\tthis.services = services;\n\t}",
"public void setStatusService(StatusService statusService) {\r\n this.statusService = statusService;\r\n }",
"private void setService(Class<?> serviceName, ServiceReference<?> serviceReference, String serviceFilter) {\n ensureNotActive();\n if (serviceName == null) {\n m_trackedServiceName = Object.class;\n }\n else {\n m_trackedServiceName = serviceName;\n }\n if (serviceFilter != null) {\n m_trackedServiceFilterUnmodified = serviceFilter;\n if (serviceName == null) {\n m_trackedServiceFilter = serviceFilter;\n }\n else {\n \tm_trackedServiceFilter = \"(&(\" + Constants.OBJECTCLASS + \"=\" + serviceName.getName() + \")\" + serviceFilter + \")\"; \t\t\t\n }\n }\n else {\n m_trackedServiceFilterUnmodified = null;\n m_trackedServiceFilter = null;\n }\n if (serviceReference != null) {\n m_trackedServiceReference = serviceReference;\n if (serviceFilter != null) {\n throw new IllegalArgumentException(\"Cannot specify both a filter and a service reference.\");\n }\n m_trackedServiceReferenceId = (Long) m_trackedServiceReference.getProperty(Constants.SERVICE_ID);\n }\n else {\n m_trackedServiceReference = null;\n }\n }",
"public void setService(PlaylistBusinessInterface service) {\n\t\tthis.service = service;\n\t}",
"protected void setDictionaryService(DictionaryService dictionaryService) {\n this.dictionaryService = dictionaryService;\n }",
"public void setHorarioService(HorarioService horarioService) {\n this.horarioService = horarioService;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
allow result whose title is empty. | public BaiduEngine allowEmptyTitle(boolean allowEmptyTitle) {
this.allowEmptyTitle = allowEmptyTitle;
return this;
} | [
"public void testInvalidTitleEmpty() {\n\t\tassertFalse(Item.isTitleValid(\"\"));\n\t\tSystem.out.println(\"Title failure. No title entered. testInvalidTitleEmpty()\\n\");\n\t\t\n\t}",
"public void verifySearchResultIsEmpty() {\r\n\r\n if (title_list.size() == 0) {\r\n System.out.println(\"Verified that search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n Assert.assertTrue(true);\r\n } else {\r\n System.out.println(\"Not verified that search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"False.\", LogAs.FAILED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));\r\n }\r\n }",
"private void checkTitle() {\n\t\tif (title == null) {\n\t\t\tinvalidArgs.add(MESSAGE_INVALID_TITLE);\n\t\t}\n\t}",
"public void ifSearchResultIsEmptyResultPageDisplayed() {\r\n if (title_list.size() == 0) {\r\n\r\n String structure_displayed = breadcrumbs_box.getText();\r\n String[] splited_structure_displayed = structure_displayed.split(\">\");\r\n String[] splited_third_structure_displayed = splited_structure_displayed[3].trim().split(\" \");\r\n String resultNumber = splited_third_structure_displayed[0];\r\n\r\n if (Integer.parseInt(resultNumber) == 0) {\r\n System.out.println(\"Verified that search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n Assert.assertTrue(true);\r\n } else {\r\n System.out.println(\"search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"false.\", LogAs.FAILED, null);\r\n Assert.assertTrue(false);\r\n }\r\n }\r\n\r\n }",
"public void titleResult() {\n resultTitle.shouldHave(text(RESULT_TITLE));\n }",
"public void validateTitle(String title){\n boolean isValid = title != null && !title.isEmpty();\n setTitleValid(isValid);\n }",
"public boolean empty() {\r\n if (text.equals(\"\") ||\r\n MoreString.indexOfIgnoreCase(text, \"<title>404 Not Found\") >= 0)\r\n return true;\r\n return false;\r\n }",
"public M cstTitleNull(){if(this.get(\"cstTitleNot\")==null)this.put(\"cstTitleNot\", \"\");this.put(\"cstTitle\", null);return this;}",
"boolean isNilTitle();",
"public M csolTitleNull(){if(this.get(\"csolTitleNot\")==null)this.put(\"csolTitleNot\", \"\");this.put(\"csolTitle\", null);return this;}",
"private List<String> ExtractTitle(JSONObject queryResult){\n try {\n List<String> title_list = new ArrayList<String>();\n JSONArray titlejsArray = queryResult.getJSONObject(\"query\").getJSONArray(\"search\"); //Specific to the format of the JSON\n if(titlejsArray.length()==0){ //Return empty list if empty results\n return new ArrayList<String>();\n } else{\n for(int i=0;i<titlejsArray.length();i++){\n title_list.add(titlejsArray.getJSONObject(i).getString(\"title\"));\n }\n return title_list;\n }\n } catch (JSONException e) { //Could occur if the API messes up\n Toast.makeText(getApplicationContext(), R.string.error_fetch, Toast.LENGTH_LONG).show();\n return new ArrayList<String>();\n }\n }",
"public void setPlaceHolderNoResults() {\n setPlaceholder(new Label(\"No results for query.\"));\n }",
"public void setTitleNoFormatting(String titleNoFormatting) {\n\t\tthis.titleNoFormatting = titleNoFormatting;\n\t}",
"public void assertNotTitle(final String title);",
"public boolean isSetTitle() {\n return this.title != null;\n }",
"public void removeAllTitle() {\r\n\t\tBase.removeAll(this.model, this.getResource(), TITLE);\r\n\t}",
"private boolean validTitle(String targetTitle) {\n Query q = new Query(\"Location\").setFilter(new FilterPredicate(\"title\", FilterOperator.EQUAL,\n targetTitle));\n int numOfSameEntities = ds.prepare(q).countEntities();\n return (numOfSameEntities == 0);\n }",
"public void testInvalidTitle() {\n\t\tassertFalse(Item.isTitleValid(\"pop1corn\"));\n\t\tSystem.out.println(\"Title failure. Invalid characters encountered. testInvalidTitle()\\n\");\n\t\t\n\t}",
"private static Boolean isValidTitle(String title) {\n\t\tif(Util.isNullOrEmpty(title)) {\n\t\t\treturn Boolean.FALSE;\n\t\t}\n\t\t\n\t\tfor(String ignoredTitle : ignoredTitles) {\n\t\t\tif(title.toLowerCase().contains(ignoredTitle.toLowerCase())) {\n\t\t\t\treturn Boolean.FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Boolean.TRUE;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of the user's saved schools, along with the date it was saved | public ArrayList<String> viewSavedSchools(String username)
{
return this.userCtrl.viewSavedSchools(username);
} | [
"public ArrayList<UserSavedSchool> viewSavedSchools() {\n\t\tthis.sfCon.viewSavedSchools();\n\t\tsuper.UFCon = UFCon;\n\t\treturn this.sfCon.viewSavedSchools();\n\t}",
"public static ArrayList<String> viewSavedSchools(String username){\r\n\t\tArrayList<String> schools = dBCont.viewSavedSchools(username);\r\n\t\treturn schools;\r\n\t}",
"public ArrayList<University> viewSavedSchools(){\n\t\treturn null;\n\t}",
"public ArrayList<UserSavedSchool> saveSchool(String school) {\n\t\tthis.sfCon.setAccount(this.UFCon.getAccount());\n\t\tthis.sfCon.saveSchool(school);\n\t\treturn sfCon.viewSavedSchools();\n\t}",
"public List<String> getSchools() {\n\t\treturn this.schools;\n\t}",
"public String findAllSchools() {\r\n\t\tDBCollection dbCollection = getDB().getCollection(\"Schools\");\r\n\t\tDBCursor dbCursor = dbCollection.find();\r\n\t\tStringBuffer out = new StringBuffer (\"[\");\r\n\t\twhile (dbCursor.hasNext()) {\r\n\t\t\tout.append(dbCursor.next());\r\n\t\t\tif (dbCursor.hasNext()) {\r\n\t\t\t\tout.append(\",\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tout.append(\"]\");\r\n\t\tSystem.out.println(out.toString());\r\n\t\treturn out.toString();\r\n\t}",
"public static ArrayList<School> getSchools(){\r\n\t\treturn schoolsArray;\r\n\t}",
"public static String [] getAllSchools() throws ServletException{\n ArrayList<String> schools = new ArrayList<String>();\n try{\n Connection con = DBAccess.getConnection();\n String statement = \"SELECT DISTINCT * FROM school;\";\n PreparedStatement ps = con.prepareStatement(statement);\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n School currentSchool = new School(rs);\n schools.add(currentSchool.getSchoolName());\n }\n }\n catch(Exception e){\n throw new ServletException(\"lookUp Problem \", e);\n }\n String [] finalSchools = new String[schools.size()];\n finalSchools = schools.toArray(finalSchools);\n return finalSchools;\n }",
"public void viewAllSchools(){\r\n\t\tDatabaseController.getAllSchools();\r\n\t}",
"private static ArrayList<String> getSchools() {\n //getting the schools name from schools.txt\n BufferedReader reader = null;\n ArrayList<String> schools = new ArrayList<>();\n try {\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(SCHOOLS_FILE)));\n String newSchool = reader.readLine().trim();\n while (!newSchool.equals(\"\")) {\n schools.add(newSchool);\n newSchool = reader.readLine();\n }\n } catch (RuntimeException | IOException e) {\n //use the defaults\n } finally {\n try {\n if (reader != null) reader.close();\n } catch (IOException e) {\n System.out.println(\"Can't close file \" + SCHOOLS_FILE);\n }\n }\n return schools;\n }",
"public ArrayList<String> viewSavedSchoolDetails(String school) {\n\t\tthis.sfCon.viewSavedSchoolDetails(school);\n\t\treturn this.sfCon.viewSavedSchoolDetails(school);\n\t}",
"@Query(allowFiltering = true)\r\n\tList<SchoolsData> findByUser(final String user);",
"public Date getStartSchool() {\n return startSchool;\n }",
"public List<WorkspaceUser> getSavers() {\n\t\treturn savers;\n\t}",
"public String viewUserSavedStatistics(String school) {\n\t\tthis.sfCon.viewUserSavedStatistics(school);\n\t\treturn this.sfCon.viewUserSavedStatistics(school);\n\t}",
"public List<CompleteInfo> getCompleteInfo(Date schDate);",
"public String getSchool() {\n return school;\n }",
"public String getSchool() {\n\t\treturn this.school;\n\t}",
"public String getSchoolName() {\n return schoolName;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load an AnyMoteDevice object from disk based on its unique MAC address. Returns null if this object did not exist. | public AnyMoteDevice get(String macAddress) {
SharedPreferences prefs = getPrefs();
String raw = prefs.getString(macAddress, "");
if (raw.equals("")) {
return null;
}
return AnyMoteDevice.fromString(raw);
} | [
"public synchronized MonitoringDevice getByMacAddress(String macAddress)\n\t{\n\t\tInteger id = this.indexByMac.get(macAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}",
"private Device loadDevice() {\n //Initialise object with the content saved in shared pref file.\n SharedPreferences sharedPreferences = getSharedPreferences();\n return new Device()\n .setApiSpaceId(sharedPreferences.getString(KEY_API_SPACE_ID, null))\n .setAppVer(sharedPreferences.getInt(KEY_APP_VER, -1))\n .setInstanceId(sharedPreferences.getString(KEY_INSTANCE_ID, null))\n .setPushToken(sharedPreferences.getString(KEY_PUSH_TOKEN, null))\n .setDeviceId(sharedPreferences.getString(KEY_DEVICE_ID, null));\n }",
"public Automobile readAutoFromDisk()\r\n\t{\r\n\t\ttry (ObjectInputStream out = new ObjectInputStream(new FileInputStream(\"FordZTW.dat\") ) )\r\n\t\t{\r\n\t\t\treturn (Automobile) out.readObject();\r\n\t\t}\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"An IOException is caught :\" + e.getMessage());\r\n\t\t}\r\n\t\tcatch (ClassNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"An IOException is caught :\" + e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static String getMacAddress() {\r\n\t\ttry {\r\n\t\t\treturn loadFileAsString(\"/sys/class/net/eth0/address\")\r\n\t\t\t\t\t.toUpperCase().substring(0, 17);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public static UserDevice load ( String idDevice ) throws EntityNotFoundException {\n return GenericEntity.load( UserDevice.class, idDevice );\n }",
"public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n if (device.getPartName() != null) {\n return device;\n }\n\n if (!device.readDeviceFromCompactFile(path)) {\n return null;\n } else {\n return device;\n }\n }",
"public MeasureStation loadMeasureStationByMac(String macAddress) throws NoResultException, NonUniqueResultException;",
"private void loadStoredDevices() {\n // Load the devices in from the file, and attempt to connect to them.\n ArrayList<BluetoothDevice> readArray = (ArrayList<BluetoothDevice>) LocalPersistence.readObjectFromFile(context, Connection_File);\n\n // If any devices are found, attempt to connect to them\n if (readArray != null) {\n if (readArray.get(0) != null) {\n // If there was a stored front wheel, assign it to the stored device variable\n mFrontStoredDevice = readArray.get(0);\n }\n\n if (readArray.get(1) != null) {\n // If there was a stored rear wheel, assign it to the stored device variable\n mRearStoredDevice = readArray.get(1);\n }\n\n }\n }",
"private Device loadSingleDevice(int deviceId) throws UnknownDeviceException{\r\n try {\r\n Map<String,Object> deviceData = new HashMap<>();\r\n deviceData.put(\"id\", deviceId);\r\n Device device = createDeviceByResult(this.connection.getJsonHTTPRPC(\"DeviceService.getDevice\", deviceData, \"DeviceService.getDevice\"));\r\n devicesList.add(device);\r\n return device;\r\n } catch (PCCEntityDataHandlerException ex) {\r\n Logger.getLogger(DeviceService.class.getName()).log(Level.SEVERE, \"Device with id \"+deviceId+\" not found\");\r\n throw new UnknownDeviceException(\"Device with id \" + deviceId + \" not found\");\r\n }\r\n }",
"public static User load(String name) {\n String path = context.getFilesDir() + \"/\" + name + \".dat\";\n User u;\n try {\n ObjectInputStream ois = new ObjectInputStream(new FileInputStream(path));\n u = (User) ois.readObject();\n ois.close();\n }catch(ClassNotFoundException | IOException e){\n return null;\n }\n return u;\n }",
"public SmartHomeDevice getCustomDevice(String id);",
"@GetMapping(\"/mac/{mac}\")\n public ResponseEntity<Device> getByMAC(@PathVariable String mac){\n Device macDevice = deviceService.findDeviceByMAC(mac);\n System.out.println(mac);\n if(macDevice == null){\n throw new DeviceNotFoundException(\"No se ha encontrado el dispositivo\");\n }\n return new ResponseEntity<Device>(macDevice, HttpStatus.OK);\n }",
"private String loadUuid()\n {\n File file = new File(root, UUID_FILE);\n if (file.exists())\n {\n try\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n return reader.readLine();\n }\n catch (IOException ioe)\n {\n return DEFAULT_UUID;\n }\n }\n return DEFAULT_UUID;\n }",
"public OmemoDevice getOwnDevice() {\n return new OmemoDevice(getOwnJid(), getDeviceId());\n }",
"public ZigbeeOO getZiebeeOOByMac(String mac);",
"public Device getById(String id) {\n\n try {\n return deviceRepository.findOne(id);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public <T> T deserialize() {\n try {\n FileInputStream fInput = new FileInputStream(path);\n ObjectInputStream oInput = new ObjectInputStream(fInput);\n return (T) oInput.readObject();\n } catch (java.io.IOException | ClassNotFoundException | ClassCastException e) {\n return null;\n }\n }",
"public Optional<Device> getDeviceByMachineCode(String machineCode) {\n\t\tOptional<Device> device = deviceRepository.findDeviceByMachineCode(machineCode);\n\t\t//could not find device by machine code\n\t\tif(!device.isPresent()) {\n\t\t\tthrow new MachineCodeNotFoundException();\n\t\t}\t\t\n\t\treturn device;\n\t}",
"public static SmartHome getInstance() {\n if (smartHomeInstance == null) {\n //TODO At first, create new Instance and write to file(?), then load it\n //Check if first time (read file?), if yes return null!\n //Load Smarthome from file?\n smartHomeInstance = new SmartHome(\"MyTestSmartHome\", 1, \"https://testHome.com\");\n //TODO Load data (rooms, devices) from db\n\n }\n return smartHomeInstance;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Results of the domain name search. repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; | java.util.List<com.google.cloud.domains.v1alpha2.RegisterParameters>
getRegisterParametersList(); | [
"com.google.cloud.domains.v1beta1.RegisterParameters getRegisterParameters();",
"com.google.cloud.domains.v1beta1.RegisterParametersOrBuilder getRegisterParametersOrBuilder();",
"com.google.cloud.domains.v1alpha2.RegisterParameters getRegisterParameters(int index);",
"java.util.List<? extends com.google.cloud.domains.v1alpha2.RegisterParametersOrBuilder> \n getRegisterParametersOrBuilderList();",
"com.google.cloud.domains.v1alpha2.RegisterParametersOrBuilder getRegisterParametersOrBuilder(\n int index);",
"String getSearchDomainName();",
"public static void search() {\n\t\tList<Domain> domains = DomainService.findAll();\n\t\t\n\t\tlogger.info(\"{} domains selected to search\", domains.size());\n\t\t\n\t\tMap<String, Integer> sourceMap = getSourceMap();\n\t\tString currentDomain = \"\";\n\t\t\n\t\tMap<String, SearchResult> resultMap = new HashMap<String, SearchResult>();\n\t\t\n\t\tfor (Domain domain : domains) {\n\t\t\tcurrentDomain = domain.getName();\n\t\t\t\n\t\t\tlogger.info(\"{} domain searching started\", currentDomain);\n\t\t\t\n\t\t\t// The last search time prevents getting the same articles which were already retrieved at the last search\n\t\t\tString lastSearch = MongoService.getLastSearchTime(currentDomain);\t\t\t\n\t\t\tMongoService.setLastSearchTime(currentDomain, DatetimeUtil.getUTCDatetime());\n\t\t\t\n\t\t\tlogger.info(\"{} domain last searched {}\", currentDomain, lastSearch);\n\t\t\t\n\t\t\tList<String> domainKeywords = domain.getKeywords();\n\t\t\tList<Source> sources = domain.getSources();\n\t\t\t\n\t\t\tList<String> sourceNames = new ArrayList<String>();\n\t\t\tfor (Source source : sources) {\n\t\t\t\tsourceNames.add(source.getDomain());\n\t\t\t}\n\t\t\t\n\t\t\tList<Topic> topics = domain.getTopics();\n\t\t\t\n\t\t\t// If the domain contains any topic, get the topic keywords and merge them with the domain keywords. \n\t\t\tif (topics.size() > 0) {\n\t\t\t\tfor (Topic topic : topics) {\n\t\t\t\t\tList<String> topicKeywords = topic.getKeywords();\n\t\t\t\t\t\n\t\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, topicKeywords);\n\t\t\t\t\t\n\t\t\t\t\tfor (String id : ids) {\n\t\t\t\t\t\tif (resultMap.containsKey(id)) {\n\t\t\t\t\t\t\tSearchResult result = resultMap.get(id);\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSearchResult result;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tresultMap.put(id, result);\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\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, null);\n\t\t\t\t\n\t\t\t\tfor (String id : ids) {\n\t\t\t\t\tSearchResult result;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (Map.Entry<String, SearchResult> entry : resultMap.entrySet())\n\t\t\t{\n\t\t\t\tlogger.info(\" {} : {}\", entry.getValue().getArticle().getTitle(), entry.getValue().getArticle().getUrl());\n\t\t\t}\n\t\t}\n\t\t\n\t\tinsertArticles(resultMap);\n\t}",
"public String marriageRegisterSearchInit() {\n // commonUtil.populateDynamicListsWithAllOption(districtList, dsDivisionList, mrDivisionList, user, language);\n populateBasicLists();\n stateList = StateUtil.getStateByLanguage(language);\n // dsDivisionList = dsDivisionDAO.getAllDSDivisionNames(districtId, language, user);\n // mrDivisionList = mrDivisionDAO.getMRDivisionNames(dsDivisionId, language, user);\n pageNo += 1;\n return marriageRegisterSearchResult();\n }",
"DomainAvailability checkDomainAvailability(CheckDomainAvailabilityParameter parameters);",
"private void checkSearchDomain() {\n final HttpHelper.GetRequest request = new HttpHelper.GetRequest(DOMAIN_CHECK_URL);\n\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void ... params) {\n if (DBG) Log.d(TAG, \"Starting request to /searchdomaincheck\");\n String domain;\n try {\n domain = mHttpHelper.get(request);\n } catch (Exception e) {\n if (DBG) Log.d(TAG, \"Request to /searchdomaincheck failed : \" + e);\n // Swallow any exceptions thrown by the HTTP helper, in\n // this rare case, we just use the default URL.\n domain = getDefaultBaseDomain();\n\n return null;\n }\n\n if (DBG) Log.d(TAG, \"Request to /searchdomaincheck succeeded\");\n setSearchBaseDomain(domain);\n\n return null;\n }\n }.execute();\n }",
"public BloombergSearchRequestBuilder(String domain) {\n this.domain = domain;\n }",
"public void registrarPreguntaRespuesta() throws SolrServerException, IOException{\n \tregistrarBaseDatosRedis(); //Registra en la base de datos.\n \tregistrarEnWatson(); // Entrena el servicio de watson.\n }",
"public void receiveResultgetDomains(\n com.seatwave.api.v2.DiscoveryAPIStub.GetDomainsResponse result\n ) {\n }",
"List<String> queryUniqueDomains(Long from, Long to);",
"HistoryQuery domainLike(String... domain);",
"public abstract List<String> search(Map<String,String> constraints);",
"void registerLeanSearchRequest(BiFunction<RequestContext, Long, List<Description>> resolver, int rtti, String classname);",
"public void addDomainToScan(String domainToScan) {\n\t\tdomainsToScan.add(domainToScan);\n\t}",
"@Override\n\t\t\t\tprotected Map<String, String> getParams() {\n\t\t\t\t\tMap<String, String> params = new HashMap<String, String>();\n\t\t\t\t\tparams.put(\"tag\", \"register\");\n\t\t\t\t\tparams.put(\"name\", name);\n\t\t\t\t\tparams.put(\"email\", email);\n\t\t\t\t\tparams.put(\"password\", password);\n\n\t\t\t\t\treturn params;\n\t\t\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column INNODB_FOREIGN_COLS.REF_COL_NAME | public void setREF_COL_NAME(String REF_COL_NAME) {
this.REF_COL_NAME = REF_COL_NAME == null ? null : REF_COL_NAME.trim();
} | [
"com.blackntan.dbmssync.xsd.dbSchemaV1.CtFkColumnRef addNewColumnReference();",
"public String getREF_COL_NAME() {\n return REF_COL_NAME;\n }",
"public void setRefName(java.lang.String refName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFNAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFNAME$0);\n }\n target.setStringValue(refName);\n }\n }",
"void setColumnReferenceArray(com.blackntan.dbmssync.xsd.dbSchemaV1.CtFkColumnRef[] columnReferenceArray);",
"void setReferencesTableName(java.lang.String referencesTableName);",
"void setColumnReferenceArray(int i, com.blackntan.dbmssync.xsd.dbSchemaV1.CtFkColumnRef columnReference);",
"public void xsetRefName(org.apache.xmlbeans.XmlString refName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFNAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(REFNAME$0);\n }\n target.set(refName);\n }\n }",
"private void updateFKColumns(DynaBean bean, String fkName, Identity identity)\n {\n Table sourceTable = ((SqlDynaClass)bean.getDynaClass()).getTable();\n Table targetTable = identity.getTable();\n ForeignKey fk = null;\n\n for (int idx = 0; idx < sourceTable.getForeignKeyCount(); idx++)\n {\n ForeignKey curFk = sourceTable.getForeignKey(idx);\n\n if (curFk.getForeignTableName().equalsIgnoreCase(targetTable.getName()))\n {\n if (fkName.equals(getFKName(sourceTable, curFk)))\n {\n fk = curFk;\n break;\n }\n }\n }\n if (fk != null)\n {\n for (int idx = 0; idx < fk.getReferenceCount(); idx++)\n {\n Reference curRef = fk.getReference(idx);\n Column sourceColumn = curRef.getLocalColumn();\n Column targetColumn = curRef.getForeignColumn();\n\n bean.set(sourceColumn.getName(), identity.getColumnValue(targetColumn.getName()));\n }\n }\n }",
"@Override\n public void updateReference(String rootTableName, ODataEntry rootTableKeys, String navigationTable,\n ODataEntry navigationTableKeys) throws ODataServiceFault {\n throw new ODataServiceFault(\"MongoDB datasources do not support references.\");\n }",
"void setRef(java.lang.String ref);",
"void setFK(FK fk) {\n\t\t\tthis.fk = fk;\n\t\t\ttxtTableName.setText(fk.getTable().getName());\n\t\t\ttxtFKName.setText(fk.getName());\n\t\t\tStringBuffer columns = new StringBuffer();\n\t\t\tStringBuffer refcolumns = new StringBuffer();\n\t\t\tfor (Entry<String, String> entry : fk.getColumns().entrySet()) {\n\t\t\t\tif (columns.length() > 0) {\n\t\t\t\t\tcolumns.append(',');\n\t\t\t\t\trefcolumns.append(',');\n\t\t\t\t}\n\t\t\t\tcolumns.append(entry.getKey());\n\t\t\t\trefcolumns.append(entry.getValue());\n\t\t\t}\n\t\t\ttxtTableColumns.setText(columns.toString());\n\t\t\ttxtRefTableName.setText(fk.getReferencedTableName());\n\t\t\ttxtRefTableColumns.setText(refcolumns.toString());\n\t\t\tcboUpdateAction.select(fk.getUpdateRule());\n\t\t\tcboDeleteAction.select(fk.getDeleteRule());\n\t\t\t//\t\t\tcboCacheObjAction.setText(fk.getOnCacheObject() == null ? \"\"\n\t\t\t//\t\t\t\t\t: fk.getOnCacheObject());\n\t\t}",
"com.blackntan.dbmssync.xsd.dbSchemaV1.CtFkColumnRef insertNewColumnReference(int i);",
"public void setSelfReferencingColumnName(String selfReferencingColumnName) {\n this.selfReferencingColumnName = selfReferencingColumnName;\n }",
"public ColumnNameReference getReferencedColumn();",
"void setRef(int parameterIndex, Ref x) throws SQLException;",
"public abstract void addForeignKey(Column c, String refTable,\n\t\t\tString refColumn);",
"public void setPclRef(java.lang.String pclRef)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PCLREF$54);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PCLREF$54);\r\n }\r\n target.setStringValue(pclRef);\r\n }\r\n }",
"protected void addReferencedColumnNamesPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_AddForeignKeyConstraintType_referencedColumnNames_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_AddForeignKeyConstraintType_referencedColumnNames_feature\", \"_UI_AddForeignKeyConstraintType_type\"),\n\t\t\t\t DbchangelogPackage.eINSTANCE.getAddForeignKeyConstraintType_ReferencedColumnNames(),\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"public void setIdRef(long idRef) {\n\t\tthis.idRef = idRef;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for previously generated word collection. | public String getCurrentWordCollection() {
if ( wordVector.isEmpty() ) {
return getRandomWordCollection();
}
return wordVectorToString();
} | [
"public String getRandomWordCollection() {\n\n if ( wordVector.isEmpty() == false ) {\n wordVector.clear();\n }\n\n for (int i=0; i<collectionLength; i++) {\n wordVector.addElement(getRandomWord());\n }\n\n return wordVectorToString();\n }",
"public List<Word> getWords();",
"public ArrayList <String> getWordList () {\r\n return words;\r\n }",
"public Set<String> words() {\n return currentWords;\n }",
"public List<String> getWords() {\n return words;\n }",
"public WordArray getWordArray() { return wordArray; }",
"public WordClass getWordClass()\n {\n return wordClass;\n }",
"@NonNull\n public List<IdentifiedText> getWords() {\n return Immutable.of(words);\n }",
"Collection<Word> words(Thing thing);",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"public ArrayList<String> getWordList() {\n\t\treturn wordList;\n\t}",
"public HashSet<String> getDict(){\n\t\treturn setOfWords;\n\t}",
"public Set<String> getWordSet() {\n return Collections.unmodifiableSet(index.keySet());\n }",
"public Resource getWordsLocation() {\n return wordsLocation;\n }",
"public Set<String> words() {\n return this.changingDictionary;\n }",
"public String getWord()\n\t{\n\t\treturn word;\n\t}",
"@Override\n\tpublic List<String> displayDocument() {\n\t\treturn words;\n\t}",
"java.lang.String getCollection();",
"public Set<String> getBigWords() {\n return bigWords;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private void rotateRight(IAVLNode root) receive current node rotate tree to right side, according to algorithm learned in class return nothing | private void rotateRight(IAVLNode root) {
IAVLNode tmpRoot = root;
IAVLNode tmpLeft = root.getLeft();
tmpLeft.setParent(tmpRoot.getParent());
if(!this.getRoot().equals(tmpRoot)){ // if input node isn't root update his parent
IAVLNode parent = tmpRoot.getParent();
if(tmpRoot.equals(parent.getLeft())) {
parent.setLeft(tmpLeft);
}else {
parent.setRight(tmpLeft);
}
tmpRoot.setParent(tmpLeft);
}else {this.root = tmpLeft;} // if input node is root update the tree root
tmpRoot.setLeft(tmpLeft.getRight());
tmpLeft.getRight().setParent(root);
tmpLeft.setRight(tmpRoot);
tmpRoot.setParent(tmpLeft);
demote(root);
root.setSize(root.getLeft().getSize() + root.getRight().getSize() + 1);
} | [
"private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}",
"protected Node < E > rotateRight(Node < E > root) {\n Node < E > temp = root.left;\n root.left = temp.right;\n temp.right = root;\n return temp;\n }",
"TreeNodeAVL rightRotate(TreeNodeAVL z){\n TreeNodeAVL node1=z.left;\n TreeNodeAVL node2=node1.right;\n\n //perform rotation\n node1.right=z;\n z.left=node2;\n\n //update heights\n z.height=Math.max(height(z.left),height(z.right))+1;\n node1.height=Math.max(height(node1.left),height(node1.right))+1;\n\n //return the new node\n return node1;\n\n }",
"private void rightRotate(RBNode node)\r\n {\r\n\t RBNode leftNode = node.left;\r\n\t // if the node we are rotating is the root\r\n\t // change the root to be its left child\r\n\t if(node == root)\r\n\t {\r\n\t\t root = leftNode;\r\n\t }\r\n\t replaceNodes(node, leftNode);\r\n\t makeLeftChild(node, leftNode.right);\r\n\t makeRightChild(leftNode, node);\r\n }",
"private void rightRotation() {\n\t\tE elem = getData();\n\t\tBalancedBinarySearchTree<E> t = getLeft();\n\t\tsetData(t.getData());\n\t\tsetLeft(t.getLeft());\n\t\tt.setData(elem);\n\t\tt.setLeft(t.getRight());\n\t\tt.setRight(getRight());\n\t\tsetRight(t);\n\t\tt.computeHeight();\n\t\tcomputeHeight();\n\t}",
"private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}",
"private static Node rotate(Node root) {\n\n if (root.balance == 2) {\n\n if (root.right.balance == 1) {\n root = rotateLeft(root);\n } else if (root.right.balance == -1) {\n root = rotateRightLeft(root);\n }\n\n } else if (root.balance == -2) {\n\n if (root.left.balance == -1) {\n root = rotateRight(root);\n } else if (root.left.balance == 1) {\n root = rotateLeftRight(root);\n }\n\n }\n\n return root;\n }",
"public Node<T> rightRotate(Node<T> main) {\n\t Node<T> branch = main.left;\n\t Node<T> leaf = branch.right;\n\t \n\t // Perform rotation\n\t branch.right = main;\n\t main.left = leaf;\n\t \n\t // Update heights\n\t main.ht = max(height(main.left), height(main.right)) + 1;\n\t branch.ht = max(height(branch.left), height(branch.right)) + 1;\n\t \n\t // Return new root\n\t return branch;\n\t }",
"private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}",
"private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.right=z;\r\n\t a.left=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.right=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.left=c;\r\n\t z.rank=z.rank-2;\r\n\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }",
"private void rotateRightDel (WAVLNode z) {\n\t WAVLNode x = z.left;\r\n\t WAVLNode d = x.right;\r\n\t x.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=x;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=x;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=x;\r\n\t }\r\n\t x.right = z;\r\n\t x.rank++;\r\n\t z.parent=x;\r\n\t z.left = d;\r\n\t z.rank--;\r\n\t if(d.rank>=0) {\r\n\t\t d.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.right.sizen+d.sizen+1;\r\n\t x.sizen = z.sizen+x.left.sizen+1;\r\n }",
"private void rightRotate(RedBlackTree T, Node y) {\n Node x = y.left;\n y.left = x.right;\n\n if (x.right != T.nil) {\n x.right.parent = y;\n }\n x.parent = y.parent;\n if (y.parent == T.nil) {\n T.root = x;\n } else if (y.parent.left == y) {\n y.parent.left = x;\n } else {\n y.parent.right = x;\n }\n x.right = y;\n y.parent = x;\n }",
"public SourcesHomovoc.AVLNode2 adjustTreeByRotation(SourcesHomovoc.AVLNode2 keyNode) {\n int t_55;\n boolean t_65;\n boolean t_67;\n SourcesHomovoc.AVLNode2 var_23_newKeyNode = ((SourcesHomovoc.AVLNode2)(null));\n\n t_55 = keyNode.getBalanceFactor();\n int var_24_bf_keyNode = t_55;\n\n t_65 = var_24_bf_keyNode == 2;\n\n if (t_65) {\n {\n {\n {\n {\n {\n int t_57;\n boolean t_58;\n SourcesHomovoc.AVLNode2 t_59;\n\n t_57 = keyNode.SourcesHomovoc_AVLNode2_left.getBalanceFactor();\n t_58 = t_57 == -1;\n\n if (t_58) {\n {\n {\n {\n {\n {\n SourcesHomovoc.AVLNode2 t_56;\n\n t_56 = keyNode.SourcesHomovoc_AVLNode2_left.rotateLeft();\n SourcesHomovoc.AVLNode2 var_25_node = t_56;\n\n keyNode.setLeft(var_25_node);\n }\n }\n }\n }\n }\n }\n t_59 = keyNode.rotateRight();\n var_23_newKeyNode = t_59;\n }\n }\n }\n }\n }\n } else {\n {\n {\n {\n {\n {\n boolean t_64;\n\n t_64 = var_24_bf_keyNode == -2;\n if (t_64) {\n {\n {\n {\n {\n {\n int t_61;\n boolean t_62;\n SourcesHomovoc.AVLNode2 t_63;\n\n t_61 = keyNode.SourcesHomovoc_AVLNode2_right.getBalanceFactor();\n t_62 = t_61 == 1;\n\n if (t_62) {\n {\n {\n {\n {\n {\n SourcesHomovoc.AVLNode2 t_60;\n\n t_60 = keyNode.SourcesHomovoc_AVLNode2_right.rotateLeft();\n SourcesHomovoc.AVLNode2 var_26_node = t_60;\n\n keyNode.setRight(var_26_node);\n }\n }\n }\n }\n }\n }\n t_63 = keyNode.rotateLeft();\n var_23_newKeyNode = t_63;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n t_67 = keyNode.SourcesHomovoc_AVLNode2_parent == null;\n if (t_67) {\n {\n {\n {\n {\n {\n this.SourcesHomovoc_AVLTree2_root = var_23_newKeyNode;\n this.SourcesHomovoc_AVLTree2_root.SourcesHomovoc_AVLNode2_parent = ((SourcesHomovoc.AVLNode2)(null));\n }\n }\n }\n }\n }\n } else {\n {\n {\n {\n {\n {\n boolean t_66;\n\n t_66 = keyNode == keyNode.SourcesHomovoc_AVLNode2_parent.SourcesHomovoc_AVLNode2_left;\n\n if (t_66) {\n {\n {\n {\n {\n {\n keyNode.SourcesHomovoc_AVLNode2_parent.setLeft(var_23_newKeyNode);\n }\n }\n }\n }\n }\n } else {\n {\n {\n {\n {\n {\n keyNode.SourcesHomovoc_AVLNode2_parent.setRight(var_23_newKeyNode);\n }\n }\n }\n }\n }\n }\n var_23_newKeyNode.SourcesHomovoc_AVLNode2_parent.adjustHeight();\n }\n }\n }\n }\n }\n }\n\n return var_23_newKeyNode;\n }",
"protected TreeNode rotateRight(TreeNode tNode)\n {\n TreeNode left = tNode.getLeft();\n TreeNode leftright = left.getRight();\n\n tNode.setLeft(leftright);\n left.setRight(tNode);\n\n return left;\n }",
"Node rightRotate(Node x)\n\t{\n\t\tNode y=x.left;\n\t\tNode T2=y.right;\n\t\t\n\t\t//rotate\n\t\t\n\t\ty.right=x;\n\t\tx.left=T2;\n\t\t\n\t\t//update heights\n\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\n\t\t// new root\n\t\treturn y;\n\t}",
"private Node<E> rotateRight(Node<E> a) {\n Node<E> b = a.left;\n b.parent = a.parent;\n\n a.left = b.right;\n\n if (a.left != null) {\n a.left.parent = a;\n }\n\n b.right = a;\n a.parent = b;\n\n if (b.parent != null) {\n if (b.parent.right == a) {\n b.parent.right = b;\n } else {\n b.parent.left = b;\n }\n }\n\n setBalance(a, b);\n\n return b;\n }",
"private AVLNode<E> rebalanceRight(AVLNode<E> localRoot) {\r\n // Obtain reference to right child.\r\n AVLNode<E> rightChild = (AVLNode<E>) localRoot.right;\r\n // See whether right-left heavy.\r\n if (rightChild.balance < AVLNode.BALANCED) {\r\n // Obtain reference to right-left child.\r\n AVLNode<E> rightLeftChild = (AVLNode<E>) rightChild.left;\r\n // Adjust the balances to be their new values after\r\n // the rotations are performed.\r\n if (rightLeftChild.balance < AVLNode.BALANCED) { // if balance is left heavy\r\n rightChild.balance = AVLNode.RIGHT_HEAVY;\r\n rightLeftChild.balance = AVLNode.BALANCED;\r\n localRoot.balance = AVLNode.BALANCED;\r\n } else if (rightLeftChild.balance > AVLNode.BALANCED) { //if balance is right heavy\r\n rightChild.balance = AVLNode.BALANCED;\r\n rightLeftChild.balance = AVLNode.BALANCED;\r\n localRoot.balance = AVLNode.LEFT_HEAVY;\r\n } else { // if node is balanced\r\n rightChild.balance = AVLNode.BALANCED;\r\n localRoot.balance = AVLNode.BALANCED;\r\n }\r\n // After rotation\r\n increase = false;\r\n decrease = true;\r\n // Perform right rotation.\r\n localRoot.right = rotateRight(rightChild);\r\n } else { //Right-Right case\r\n rightChild.balance = AVLNode.BALANCED;\r\n localRoot.balance = AVLNode.BALANCED;\r\n\r\n // After rotation\r\n increase = false;\r\n decrease = true;\r\n }\r\n // Now rotate the local root left.\r\n return (AVLNode<E>) rotateLeft(localRoot);\r\n }",
"private TreeNode<T> rotateRight(TreeNode<T> n) {\n TreeNode<T> m = n.leftChild;\n TreeNode<T> tempOrphan = m.rightChild;\n m.rightChild = n;\n n.leftChild = tempOrphan;\n recalculateHeight(n);\n recalculateHeight(m);\n return m;\n }",
"Node rightRotate(Node y) { \n\t Node x = y.left; \n\t Node T2 = x.right; \n\t \n\t // Perform rotation \n\t x.right = y; \n\t y.left = T2; \n\t \n\t // Update heights \n\t y.height = max(height(y.left), height(y.right)) + 1; \n\t x.height = max(height(x.left), height(x.right)) + 1; \n\t \n\t // Return new root \n\t return x; \n\t }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use IntervalOfInteger.newBuilder() to construct. | private IntervalOfInteger(Builder builder) {
super(builder);
} | [
"public abstract IntegerInterval getInterval(int[] interval);",
"IntervalExpression createIntervalExpression();",
"public IntegerInterval getInterval(int value) {\n\t\n\treturn this.getInterval(new int[]{value, value});\n }",
"IntervalType createIntervalType();",
"public Interval() { }",
"private Interval(Builder builder) {\n super(builder);\n }",
"public final AggregateFunction<T> createIntervalFunction() {\r\n return new GenericInterval<T>(type, true, true);\r\n }",
"public IntervalPatternTransformer(int interval)\r\n {\r\n this.interval = interval;\r\n }",
"IntervalThing createIntervalThing();",
"public IntegerInterval interval(int index) {\n\t\n\treturn _factory.getInterval(_intervals[index]);\n }",
"public Interval getIntType() { return this.interval; }",
"public void setInterimInterval(long interval);",
"IntegerValue createIntegerValue();",
"public IntegerSequence(List<IntegerInterval> intervals, IntegerSequenceFactory factory) {\n\t\n\t_factory = factory;\n\n\t_intervals = new int[intervals.size()][2];\n\t\n\tIntegerInterval prev = null;\n\tfor (int iInterval = 0; iInterval < intervals.size(); iInterval++) {\n\t IntegerInterval interval = intervals.get(iInterval);\n\t _intervals[iInterval][0] = interval.start();\n\t _intervals[iInterval][1] = interval.end();\n\t if (prev != null) {\n\t\tif (prev.end() >= interval.start()) {\n\t\t throw new java.lang.IllegalArgumentException(\"Adjacent or overlapping intervals [\" + prev.start() + \"-\" + prev.end() + \"] and [\" + interval.start() + \"-\" + interval.end() + \"].\");\n\t\t} else if (interval.start() == (prev.end() + 1)) {\n\t\t throw new java.lang.IllegalArgumentException(\"Adjacent or overlapping intervals [\" + prev.start() + \"-\" + prev.end() + \"] and [\" + interval.start() + \"-\" + interval.end() + \"].\");\n\t\t}\n\t }\n\t\t\n\t prev = interval;\n\t}\n }",
"public Interval toInterval() {\r\n return new Interval(getStartMillis(), getEndMillis(), getChronology());\r\n }",
"IntegerLiteral createIntegerLiteral();",
"private IntervalOfReal(Builder builder) {\n super(builder);\n }",
"private Interval newInterval (ParamElement param)\n {\n if (param == null)\n return null;\n\n Interval interval = new Interval();\n String[] values = param.getValue().split( IOConstants.LIST_SEPARATOR_PATTERN );\n String ucd = param.getUcd();\n String unit = param.getUnit();\n \n \n interval.setMin (new DoubleParam (values[0], \"\", ucd, unit));\n interval.setMax (new DoubleParam (values[1], \"\", ucd, unit));\n\n return interval;\n }",
"public IntegerSequence(int[][] intervals, IntegerSequenceFactory factory) {\n\t\n\t_factory = factory;\n\t\n\tif (intervals.length > 0) {\n\t int[] prev = null;\n\t int intervalCount = 0;\n\t for (int[] interval : intervals) {\n\t\tif (interval.length != 2) {\n\t\t throw new java.lang.IllegalArgumentException(\"TimeInterval expects an array of length 2 instead of \" + interval.length);\n\t\t} else if (interval[0] > interval[1]) {\n\t\t throw new java.lang.IllegalArgumentException(\"TimeInterval [\" + interval[0] + \"-\" + interval[1] + \"] is invalid.\");\n\t\t}\n\t\tif (prev != null) {\n\t\t if (prev[1] >= interval[0]) {\n\t\t\tthrow new java.lang.IllegalArgumentException(\"Adjacent or overlapping intervals [\" + prev[0] + \"-\" + prev[1] + \"] and [\" + interval[0] + \"-\" + interval[1] + \"].\");\n\t\t }\n\t\t if (interval[0] > (prev[1] + 1)) {\n\t\t\tintervalCount++;\n\t\t }\n\t\t} else {\n\t\t intervalCount++;\n\t\t}\n\t\tprev = interval;\n\t }\n\t _intervals = this.copyIntervals(intervals, intervalCount);\n\t} else {\n\t _intervals = new int[0][];\n\t}\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ship of the cruise | public Ship getShip() {
return ship;
} | [
"public Ship getShip() {\r\n\t\treturn ship;\r\n\t}",
"public String getShip() {\n return ship.toString();\n }",
"public Ship getShip() {\n\t\treturn mShip;\n\t}",
"public Ship getMainShip() { return interactor.getMainShip();}",
"public Ship getShip ()\n {\n return playerShip;\n }",
"public String getShipPoint() {\r\n return shipPoint;\r\n }",
"public Image getShip() { return this.ship; }",
"Shipment getShipment();",
"@Basic\n public Ship getSource(){\n return this.source;\n }",
"public Point getShipLocation(){\r\n\t\treturn shipLocation;\r\n\t}",
"public String getShipSn() {\r\n return shipSn;\r\n }",
"public Ship getShip(int shipId) {\n for (Ship ship : lineShips) {\n if (ship.getId() == shipId) {\n return ship;\n }\n }\n for (Ship ship : lShips) {\n if (ship.getId() == shipId) {\n return ship;\n }\n }\n for (Ship ship : uShips) {\n if (ship.getId() == shipId) {\n return ship;\n }\n\n }\n return null;\n }",
"public String getShipChannel() {\r\n return shipChannel;\r\n }",
"private Spaceship getTheSpaceship() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tif(object instanceof Spaceship)\n\t\t\t\treturn (Spaceship) object;\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getShipType(){ //get type of ship\n\t\treturn \"Battleship\"; //return ship type as string\n\t}",
"public LiveData<ShipWithContainer> getShip() {\n return mObservableShip;\n }",
"public Ship loadShip() {\n DbResponse d = db.select(DbTables.SHIP);\n Ship ship = null;\n\n try {\n if (d.r != null) {\n ResultSet rs = d.r;\n ship = new Ship(ShipType.values()[rs.getInt(\"ship_type\")], rs.getInt(\"fuel\"));\n ship.setWeaponSlots(rs.getInt(\"weapon\"));\n ship.setGadgetSlots(rs.getInt(\"gadget\"));\n ship.setShieldSlots(rs.getInt(\"shield\"));\n d.r.close();\n d.s.close();\n d.c.close();\n }\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n\n return ship;\n }",
"public String getShipType() {\n return shipType;\n }",
"public double getShipRadius(Ship ship){\n return ship.getRadius();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Container's getter for LatinSeeProvider. | public SeeProviderImpl getLatinSeeProvider() {
return (SeeProviderImpl)findViewObject("LatinSeeProvider");
} | [
"public MainSeeProviderImpl getLatinMainSeeProvider() {\n return (MainSeeProviderImpl)findViewObject(\"LatinMainSeeProvider\");\n }",
"public ViewObjectImpl getLatinMainSeeAlsoProvider() {\n return (ViewObjectImpl)findViewObject(\"LatinMainSeeAlsoProvider\");\n }",
"public ViewObjectImpl getLatinSeeAlsoProviderVo() {\n return (ViewObjectImpl)findViewObject(\"LatinSeeAlsoProviderVo\");\n }",
"public SeeSubjectVoImpl getLatinSeeSubjectVo() {\n return (SeeSubjectVoImpl)findViewObject(\"LatinSeeSubjectVo\");\n }",
"public ViewObjectImpl getLatinSeeUniformTitle() {\n return (ViewObjectImpl)findViewObject(\"LatinSeeUniformTitle\");\n }",
"public ViewObjectImpl getSeeProvider1() {\n return (ViewObjectImpl)findViewObject(\"SeeProvider1\");\n }",
"public ProviderName provider() {\n return this.provider;\n }",
"public static URI getProvider(){\n\t\treturn providers.peek();\n\t}",
"ProviderDescription getProviderDescription();",
"public String getProviderName();",
"public interface Provider {\n /**\n * Returns lookup associated with the object.\n * @return fully initialized lookup instance provided by this object\n */\n Lookup getLookup();\n }",
"String getEdfaContainer();",
"public ViewObjectImpl getLatinMainSeeUniformTitle() {\n return (ViewObjectImpl)findViewObject(\"LatinMainSeeUniformTitle\");\n }",
"String getEnglish();",
"Reference getProviderReference();",
"String getLocalization();",
"org.bolg_developers.bolg.Stamina getStamina();",
"public ViewObjectImpl getProviderKind() {\n return (ViewObjectImpl)findViewObject(\"ProviderKind\");\n }",
"@Override\n\tpublic String findCountry(){\n\t\treturn \"Canada\";\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits